From 788deeff1356ef8aa3181b13a49fd64d934e6580 Mon Sep 17 00:00:00 2001 From: Eunseok Choi Date: Mon, 22 Jan 2018 20:18:25 +0900 Subject: [PATCH] Revert "[9810] thermal: samsung: skip CP cold temp margin during suspend" This reverts commit ac636d9077bc4751da4961009df7664722824d24. Change-Id: Ia474ab1545b46072af0e5f722c662832eb7b43ab Signed-off-by: Eunseok Choi --- drivers/thermal/samsung/exynos_acpm_tmu.c | 6 +--- drivers/thermal/samsung/exynos_acpm_tmu.h | 2 +- drivers/thermal/samsung/exynos_tmu.c | 34 ++--------------------- 3 files changed, 5 insertions(+), 37 deletions(-) diff --git a/drivers/thermal/samsung/exynos_acpm_tmu.c b/drivers/thermal/samsung/exynos_acpm_tmu.c index df62b800eea5..e03707a59858 100644 --- a/drivers/thermal/samsung/exynos_acpm_tmu.c +++ b/drivers/thermal/samsung/exynos_acpm_tmu.c @@ -155,7 +155,7 @@ int exynos_acpm_tmu_set_read_temp(int tz, int *temp, int *stat) /* * TMU_IPC_AP_SUSPEND */ -int exynos_acpm_tmu_set_suspend(int flag) +int exynos_acpm_tmu_set_suspend(void) { struct ipc_config config; union tmu_ipc_message message; @@ -165,7 +165,6 @@ int exynos_acpm_tmu_set_suspend(int flag) memset(&message, 0, sizeof(message)); message.req.type = TMU_IPC_AP_SUSPEND; - message.req.rsvd = flag; config.cmd = message.data; config.response = true; @@ -264,9 +263,6 @@ int exynos_acpm_tmu_set_resume(void) message.data[3]); } - pr_info("%s: acpm irq %d cold cnt %d stat %d\n", - __func__, message.resp.rsvd2, message.resp.rsvd, message.resp.stat); - return 0; } diff --git a/drivers/thermal/samsung/exynos_acpm_tmu.h b/drivers/thermal/samsung/exynos_acpm_tmu.h index 8d56742d3de7..99607087c150 100644 --- a/drivers/thermal/samsung/exynos_acpm_tmu.h +++ b/drivers/thermal/samsung/exynos_acpm_tmu.h @@ -109,7 +109,7 @@ struct acpm_tmu_cap { int exynos_acpm_tmu_set_init(struct acpm_tmu_cap *cap); int exynos_acpm_tmu_set_read_temp(int tz, int *temp, int *stat); -int exynos_acpm_tmu_set_suspend(int flag); +int exynos_acpm_tmu_set_suspend(void); int exynos_acpm_tmu_set_cp_call(void); int exynos_acpm_tmu_set_resume(void); int exynos_acpm_tmu_ipc_dump(int no, unsigned int dump[]); diff --git a/drivers/thermal/samsung/exynos_tmu.c b/drivers/thermal/samsung/exynos_tmu.c index a5d8cdae9e0c..1664042f4cb7 100644 --- a/drivers/thermal/samsung/exynos_tmu.c +++ b/drivers/thermal/samsung/exynos_tmu.c @@ -58,9 +58,6 @@ #include "exynos_acpm_tmu.h" #include "soc/samsung/exynos-pmu.h" #endif -#ifdef CONFIG_SOC_EXYNOS9810 -#include "linux/mcu_ipc.h" -#endif /* Exynos generic registers */ #define EXYNOS_TMU_REG_TRIMINFO7_0(p) (((p) - 0) * 4) @@ -195,28 +192,8 @@ static bool is_aud_on(void) exynos_pmu_read(PMUREG_AUD_STATUS, &val); - pr_info("%s AUD_STATUS %d\n", __func__, val); - return ((val & 0xf) == 0xf); } - -#ifdef CONFIG_SOC_EXYNOS9810 -#define CP_MBOX_NUM 3 -#define CP_MBOX_MASK 1 -#define CP_MBOX_SHIFT 25 -static bool is_cp_net_conn(void) -{ - unsigned int val; - - val = mbox_extract_value(MCU_CP, CP_MBOX_NUM, CP_MBOX_MASK, CP_MBOX_SHIFT); - - pr_info("%s CP mobx value %d\n", __func__, val); - - return !!val; -} -#else -#define is_cp_net_conn() false -#endif #else static bool suspended; static DEFINE_MUTEX (thermal_suspend_lock); @@ -1563,7 +1540,6 @@ static int exynos_tmu_suspend(struct device *dev) #ifdef CONFIG_EXYNOS_ACPM_THERMAL struct platform_device *pdev = to_platform_device(dev); struct exynos_tmu_data *data = platform_get_drvdata(pdev); - int cp_state; suspended_count++; disable_irq(data->irq); @@ -1572,14 +1548,13 @@ static int exynos_tmu_suspend(struct device *dev) if (cp_call_mode) { if (suspended_count == num_of_devices) { exynos_acpm_tmu_set_cp_call(); - pr_info("%s: TMU suspend w/ AUD-on\n", __func__); + pr_info("%s: TMU suspend w/ AUD-on complete\n", __func__); } } else { exynos_tmu_control(pdev, false); if (suspended_count == num_of_devices) { - cp_state = is_cp_net_conn(); - exynos_acpm_tmu_set_suspend(cp_state); - pr_info("%s: TMU suspend w/ cp_state %d\n", __func__, cp_state); + exynos_acpm_tmu_set_suspend(); + pr_info("%s: TMU suspend complete\n", __func__); } } #else @@ -1606,9 +1581,6 @@ static int exynos_tmu_resume(struct device *dev) exynos_acpm_tmu_set_read_temp(data->tzd->id, &temp, &stat); - pr_info("%s: thermal zone %d temp %d stat %d\n", - __func__, data->tzd->id, temp, stat); - enable_irq(data->irq); suspended_count--; -- 2.20.1