From 338bd99d6797dcf0dc4ea6765891422af49a383c Mon Sep 17 00:00:00 2001 From: Eunseok Choi Date: Thu, 25 May 2017 12:33:54 +0900 Subject: [PATCH] [COMMON] thermal: samsung: remove CONFIG_EXYNOS_THERMAL_DEBUG Change-Id: Icb817575c8c5fcf1179457cdf74149c1e5d7f24e Signed-off-by: Eunseok Choi --- drivers/thermal/samsung/Kconfig | 7 ----- drivers/thermal/samsung/exynos_acpm_tmu.c | 37 ----------------------- drivers/thermal/samsung/exynos_tmu.c | 14 --------- 3 files changed, 58 deletions(-) diff --git a/drivers/thermal/samsung/Kconfig b/drivers/thermal/samsung/Kconfig index a98e060a59b1..0706ea57d6be 100644 --- a/drivers/thermal/samsung/Kconfig +++ b/drivers/thermal/samsung/Kconfig @@ -16,10 +16,3 @@ config EXYNOS_ACPM_THERMAL help This feature supports ACPM TMU plug-in for Exynos thermal driver. -config EXYNOS_THERMAL_DEBUG - bool - prompt "Exynos thermal debug support" - depends on DEBUG_FS - depends on EXYNOS_THERMAL - help - Create debugfs for debugging exynos thermal diff --git a/drivers/thermal/samsung/exynos_acpm_tmu.c b/drivers/thermal/samsung/exynos_acpm_tmu.c index 0e6bdb7e82c4..916a9d994e5a 100644 --- a/drivers/thermal/samsung/exynos_acpm_tmu.c +++ b/drivers/thermal/samsung/exynos_acpm_tmu.c @@ -34,7 +34,6 @@ static bool cold_comp; static unsigned int acpm_tmu_ch_num, acpm_tmu_size; -#ifdef CONFIG_EXYNOS_THERMAL_DEBUG static bool acpm_tmu_test_mode; static bool acpm_tmu_log; @@ -61,8 +60,6 @@ void exynos_acpm_tmu_log(bool mode) } \ } while (0) -#endif - #define acpm_ipc_err_check() \ do { \ if (ret < 0) { \ @@ -80,9 +77,7 @@ int exynos_acpm_tmu_set_init(struct acpm_tmu_cap *cap) struct ipc_config config; union tmu_ipc_message message; int ret; -#ifdef CONFIG_EXYNOS_THERMAL_DEBUG unsigned long long before, after, latency; -#endif memset(&message, 0, sizeof(message)); @@ -92,14 +87,10 @@ int exynos_acpm_tmu_set_init(struct acpm_tmu_cap *cap) config.response = true; config.indirection = false; -#ifdef CONFIG_EXYNOS_THERMAL_DEBUG before = sched_clock(); -#endif ret = acpm_ipc_send_data(acpm_tmu_ch_num, &config); -#ifdef CONFIG_EXYNOS_THERMAL_DEBUG after = sched_clock(); latency = after - before; -#endif acpm_ipc_err_check(); acpm_ipc_latency_check(); @@ -125,16 +116,12 @@ int exynos_acpm_tmu_set_read_temp(int tz, int *cur_temp) struct ipc_config config; union tmu_ipc_message message; int ret; -#ifdef CONFIG_EXYNOS_THERMAL_DEBUG unsigned long long before, after, latency; -#endif *cur_temp = 0; -#ifdef CONFIG_EXYNOS_THERMAL_DEBUG if (acpm_tmu_test_mode) return -1; -#endif memset(&message, 0, sizeof(message)); @@ -145,20 +132,15 @@ int exynos_acpm_tmu_set_read_temp(int tz, int *cur_temp) config.response = true; config.indirection = false; -#ifdef CONFIG_EXYNOS_THERMAL_DEBUG before = sched_clock(); -#endif ret = acpm_ipc_send_data(acpm_tmu_ch_num, &config); -#ifdef CONFIG_EXYNOS_THERMAL_DEBUG after = sched_clock(); latency = after - before; -#endif acpm_ipc_err_check(); acpm_ipc_latency_check(); memcpy(message.data, config.cmd, sizeof(message.data)); -#ifdef CONFIG_EXYNOS_THERMAL_DEBUG if (acpm_tmu_log) { pr_info("[acpm_tmu] data 0:0x%08x 1:0x%08x 2:0x%08x 3:0x%08x\n", message.data[0], @@ -166,7 +148,6 @@ int exynos_acpm_tmu_set_read_temp(int tz, int *cur_temp) message.data[2], message.data[3]); } -#endif cold_comp = message.resp.cold; *cur_temp = message.resp.temp; @@ -182,9 +163,7 @@ int exynos_acpm_tmu_set_suspend(void) struct ipc_config config; union tmu_ipc_message message; int ret; -#ifdef CONFIG_EXYNOS_THERMAL_DEBUG unsigned long long before, after, latency; -#endif memset(&message, 0, sizeof(message)); @@ -194,20 +173,15 @@ int exynos_acpm_tmu_set_suspend(void) config.response = true; config.indirection = false; -#ifdef CONFIG_EXYNOS_THERMAL_DEBUG before = sched_clock(); -#endif ret = acpm_ipc_send_data(acpm_tmu_ch_num, &config); -#ifdef CONFIG_EXYNOS_THERMAL_DEBUG after = sched_clock(); latency = after - before; -#endif acpm_ipc_err_check(); acpm_ipc_latency_check(); memcpy(message.data, config.cmd, sizeof(message.data)); -#ifdef CONFIG_EXYNOS_THERMAL_DEBUG if (acpm_tmu_log) { pr_info("[acpm_tmu] data 0:0x%08x 1:0x%08x 2:0x%08x 3:0x%08x\n", message.data[0], @@ -215,7 +189,6 @@ int exynos_acpm_tmu_set_suspend(void) message.data[2], message.data[3]); } -#endif cold_comp = message.resp.cold; @@ -230,9 +203,7 @@ int exynos_acpm_tmu_set_cp_call(void) struct ipc_config config; union tmu_ipc_message message; int ret; -#ifdef CONFIG_EXYNOS_THERMAL_DEBUG unsigned long long before, after, latency; -#endif memset(&message, 0, sizeof(message)); @@ -242,20 +213,15 @@ int exynos_acpm_tmu_set_cp_call(void) config.response = true; config.indirection = false; -#ifdef CONFIG_EXYNOS_THERMAL_DEBUG before = sched_clock(); -#endif ret = acpm_ipc_send_data(acpm_tmu_ch_num, &config); -#ifdef CONFIG_EXYNOS_THERMAL_DEBUG after = sched_clock(); latency = after - before; -#endif acpm_ipc_err_check(); acpm_ipc_latency_check(); memcpy(&message.data, config.cmd, sizeof(message.data)); -#ifdef CONFIG_EXYNOS_THERMAL_DEBUG if (acpm_tmu_log) { pr_info("[acpm_tmu] data 0:0x%08x 1:0x%08x 2:0x%08x 3:0x%08x\n", message.data[0], @@ -263,7 +229,6 @@ int exynos_acpm_tmu_set_cp_call(void) message.data[2], message.data[3]); } -#endif return 0; } @@ -295,7 +260,6 @@ int exynos_acpm_tmu_set_resume(void) acpm_ipc_latency_check(); memcpy(&message.data, config.cmd, sizeof(message.data)); -#ifdef CONFIG_EXYNOS_THERMAL_DEBUG if (acpm_tmu_log) { pr_info("[acpm_tmu] data 0:0x%08x 1:0x%08x 2:0x%08x 3:0x%08x\n", message.data[0], @@ -303,7 +267,6 @@ int exynos_acpm_tmu_set_resume(void) message.data[2], message.data[3]); } -#endif return 0; } diff --git a/drivers/thermal/samsung/exynos_tmu.c b/drivers/thermal/samsung/exynos_tmu.c index 00295011dfba..acebe3a4f3bf 100644 --- a/drivers/thermal/samsung/exynos_tmu.c +++ b/drivers/thermal/samsung/exynos_tmu.c @@ -1029,11 +1029,6 @@ static int exynos9810_tmu_initialize(struct platform_device *pdev) rising_threshold &= ~(EXYNOS_TMU_TEMP_MASK << bit_off); rising_threshold |= threshold_code << bit_off; writel(rising_threshold, data->base + reg_off); -#ifdef TMU_DEBUG - pr_info("[TMU%d:%d:%d] addr 0x%04x bit-shift %d rise 0x%08x code 0x%x temp %d\n", - data->id, sensor, i, reg_off, bit_off, - rising_threshold, threshold_code, temp); -#endif /* Set 9-bit temperature code for falling threshold levels */ threshold_code = temp_to_code_with_sensorinfo(data, temp_hist, &data->sensor_info[count]); @@ -1041,12 +1036,6 @@ static int exynos9810_tmu_initialize(struct platform_device *pdev) falling_threshold &= ~(EXYNOS_TMU_TEMP_MASK << bit_off); falling_threshold |= threshold_code << bit_off; writel(falling_threshold, data->base + reg_off + 0x10); -#ifdef TMU_DEBUG - pr_info("[TMU%d:%d:%d] addr 0x%04x bit-shift %d fall 0x%08x code 0x%x hyst %d\n", - data->id, sensor, i, reg_off + 0x10, bit_off, - falling_threshold, threshold_code, temp_hist); -#endif - interrupt_count++; } count++; @@ -2331,7 +2320,6 @@ static struct platform_driver exynos_tmu_driver = { module_platform_driver(exynos_tmu_driver); -#ifdef CONFIG_EXYNOS_THERMAL_DEBUG #ifdef CONFIG_EXYNOS_ACPM_THERMAL static void exynos_acpm_tmu_test_cp_call(bool mode) { @@ -2422,12 +2410,10 @@ static int exynos_thermal_create_debugfs(void) #ifdef CONFIG_EXYNOS_ACPM_THERMAL debugfs_create_file("test_cp_call", 0x200, debugfs_root, NULL, &test_cp_call_ops); debugfs_create_file("acpm_tmu_log", 0x200, debugfs_root, NULL, &acpm_tmu_log_ops); - pr_info("Created exynos thermal debugfs\n"); #endif return 0; } arch_initcall(exynos_thermal_create_debugfs); -#endif MODULE_DESCRIPTION("EXYNOS TMU Driver"); MODULE_AUTHOR("Donggeun Kim "); -- 2.20.1