[COMMON] thermal: samsung: remove CONFIG_EXYNOS_THERMAL_DEBUG
authorEunseok Choi <es10.choi@samsung.com>
Thu, 25 May 2017 03:33:54 +0000 (12:33 +0900)
committerChungwoo Park <cww.park@samsung.com>
Mon, 21 May 2018 08:18:52 +0000 (17:18 +0900)
Change-Id: Icb817575c8c5fcf1179457cdf74149c1e5d7f24e
Signed-off-by: Eunseok Choi <es10.choi@samsung.com>
drivers/thermal/samsung/Kconfig
drivers/thermal/samsung/exynos_acpm_tmu.c
drivers/thermal/samsung/exynos_tmu.c

index a98e060a59b14a4834b3f78986034f6135f2573a..0706ea57d6be72a06b2785e2a8d40327fe2ad8d3 100644 (file)
@@ -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
index 0e6bdb7e82c4e7e16782d1e47110ef943e0c8f20..916a9d994e5a8e787e6783313d4957cb78f72d48 100644 (file)
@@ -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;
 }
index 00295011dfbab618b18394c9b4e6085d85bd3d34..acebe3a4f3bf89804bfbe9eb0f8586a1842ec407 100644 (file)
@@ -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 <dg77.kim@samsung.com>");