From: Jeonghoon Jang Date: Mon, 25 Mar 2019 08:19:38 +0000 (+0900) Subject: [RAMEN9610-13834] Revert "[RAMEN9610-11554][9610] soc: samsung: cal-if: Added cal_pri... X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=f09fe741d85f8d1f22a2d1ddb46c13492bc5b99c;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git [RAMEN9610-13834] Revert "[RAMEN9610-11554][9610] soc: samsung: cal-if: Added cal_print_wakeup_reason." This reverts commit 17f55953d5f4226b8ccae46009455c8ada078f44. Change-Id: Id4f6333957949c70b9c550cdb539df5b14dcc86f --- diff --git a/drivers/soc/samsung/cal-if/exynos9610/cal_data.c b/drivers/soc/samsung/cal-if/exynos9610/cal_data.c index 36992cf4e3e0..33dd24a4e6b0 100644 --- a/drivers/soc/samsung/cal-if/exynos9610/cal_data.c +++ b/drivers/soc/samsung/cal-if/exynos9610/cal_data.c @@ -291,46 +291,3 @@ void exynos9610_cal_data_init(void) } void (*cal_data_init)(void) = exynos9610_cal_data_init; - -struct cal_wkup_reason wkup_reason[] = { - { "INT_MBOX_CP2AP_S", (1 << 29) }, - { "APM_CPU", (1 << 27) }, - { "INT_MBOX_GNSS2AP", (1 << 26) }, - { "CP_ACTIVE", (1 << 25) }, - { "INT_MBOX_CP2AP", (1 << 24) }, - { "GNSS_ACTIVE", (1 << 23) }, - { "GNSS_RESET_REQ", (1 << 22) }, - { "GNSS_WAKEUP_REQ", (1 << 21) }, - { "CP_RESET_REQ", (1 << 20) }, - { "INT_MBOX_APM2AP", (1 << 19) }, - { "INT_MBOX_SHUB2AP", (1 << 18) }, - { "INT_MBOX_WLBT2AP", (1 << 17) }, - { "USBDRD20", (1 << 16) }, - { "CP_SCAN_DUMP_REQ", (1 << 15) }, - { "TIMER", (1 << 14) }, - { "USB_REWA", (1 << 13) }, - { "CMGP_EINT", (1 << 12) }, - { "MMC2", (1 << 11) }, - { "MMC0", (1 << 9) }, - { "WLBT_ACTIVE", (1 << 6) }, - { "WLBT_RESET_REQ", (1 << 5) }, - { "TRTC_TICK", (1 << 4) }, - { "TRTC_ALARM", (1 << 3) }, - { "RTC_TICK", (1 << 2) }, - { "RTC_ALARM", (1 << 1) }, - { "EINT", (1 << 0) }, -}; - -char *exynos9610_cal_print_wakeup_reason(unsigned int wakeup_stat) -{ - int i; - char *ret = "UNKNOWN"; - - for (i = 0; i < ARRAY_SIZE(wkup_reason); i++) { - if (wakeup_stat & wkup_reason[i].bit_field) - ret = wkup_reason[i].name; - } - - return ret; -} -char *(*cal_print_wakeup_reason)(unsigned int wakeup_stat) = exynos9610_cal_print_wakeup_reason; diff --git a/drivers/soc/samsung/cal-if/pmucal_common.h b/drivers/soc/samsung/cal-if/pmucal_common.h index 8ad0c1267be2..13ff91b82178 100644 --- a/drivers/soc/samsung/cal-if/pmucal_common.h +++ b/drivers/soc/samsung/cal-if/pmucal_common.h @@ -78,8 +78,4 @@ struct pmucal_seq { } #endif -struct cal_wkup_reason { - char name[20]; - u32 bit_field; -}; #endif diff --git a/drivers/soc/samsung/exynos-pm.c b/drivers/soc/samsung/exynos-pm.c index 80e536825c92..d59920a32015 100644 --- a/drivers/soc/samsung/exynos-pm.c +++ b/drivers/soc/samsung/exynos-pm.c @@ -128,7 +128,6 @@ static void exynos_show_wakeup_registers(unsigned int wakeup_stat) pr_info("0x%02x ", __raw_readl(EXYNOS_EINT_PEND(pm_info->eint_base, i))); } -extern char *(*cal_print_wakeup_reason)(unsigned int wakeup_stat); static void exynos_show_wakeup_reason(bool sleep_abort) { unsigned int wakeup_stat; @@ -152,20 +151,13 @@ static void exynos_show_wakeup_reason(bool sleep_abort) exynos_pmu_read(EXYNOS_PMU_WAKEUP_STAT, &wakeup_stat); exynos_show_wakeup_registers(wakeup_stat); - if (cal_print_wakeup_reason) { - pr_info("%s Resume caused by %s\n", EXYNOS_PM_PREFIX, - cal_print_wakeup_reason(wakeup_stat)); - if (wakeup_stat & WAKEUP_STAT_EINT) - exynos_show_wakeup_reason_eint(); - } else { - if (wakeup_stat & WAKEUP_STAT_RTC_ALARM) - pr_info("%s Resume caused by RTC alarm\n", EXYNOS_PM_PREFIX); - else if (wakeup_stat & WAKEUP_STAT_EINT) - exynos_show_wakeup_reason_eint(); - else - pr_info("%s Resume caused by wakeup_stat 0x%08x\n", - EXYNOS_PM_PREFIX, wakeup_stat); - } + if (wakeup_stat & WAKEUP_STAT_RTC_ALARM) + pr_info("%s Resume caused by RTC alarm\n", EXYNOS_PM_PREFIX); + else if (wakeup_stat & WAKEUP_STAT_EINT) + exynos_show_wakeup_reason_eint(); + else + pr_info("%s Resume caused by wakeup_stat 0x%08x\n", + EXYNOS_PM_PREFIX, wakeup_stat); } #ifdef CONFIG_CPU_IDLE