[COMMON] thermal: add macros to support soc dependencies
authorEunseok Choi <es10.choi@samsung.com>
Wed, 24 May 2017 15:28:47 +0000 (00:28 +0900)
committerChungwoo Park <cww.park@samsung.com>
Mon, 21 May 2018 08:18:50 +0000 (17:18 +0900)
Change-Id: I455a9f4c02402cd1ae6808354b9450333ab68f92
Signed-off-by: Eunseok Choi <es10.choi@samsung.com>
drivers/thermal/cpu_cooling.c
drivers/thermal/gpu_cooling.c
drivers/thermal/samsung/exynos_tmu.c

index f285b37ca7b26f79f8e88a21fd0f78bce06f3b32..1082738973bb3a75fa7215d3aa0ffa57c1e98e42 100644 (file)
@@ -249,8 +249,13 @@ static int update_freq_table(struct cpufreq_cooling_device *cpufreq_cdev,
 static int build_static_power_table(struct cpufreq_cooling_device *cpufreq_cdev)
 {
        int i, j;
+#if defined(CONFIG_SOC_EXYNOS9810)
        int ratio = cal_asv_get_ids_info(ACPM_DVFS_CPUCL1);
        int asv_group = cal_asv_get_grp(ACPM_DVFS_CPUCL1);
+#else
+       int ratio = cal_asv_get_ids_info(ACPM_DVFS_CPUCL0);
+       int asv_group = cal_asv_get_grp(ACPM_DVFS_CPUCL0);
+#endif
        void *gen_block;
        struct ect_gen_param_table *volt_temp_param, *asv_param;
        int ratio_table[16] = { 0, 18, 22, 27, 33, 40, 49, 60, 73, 89, 108, 131, 159, 194, 232, 250};
index 25b07fe420a288fc2ff089458900d3c2b854a064..3f88c4240e53c1c539cb440bbac0ed59c39a44cf 100644 (file)
@@ -40,6 +40,8 @@
 #include <dt-bindings/clock/exynos8895.h>
 #elif defined(CONFIG_SOC_EXYNOS7872)
 #include <dt-bindings/clock/exynos7872.h>
+#elif defined(CONFIG_SOC_EXYNOS9810)
+#include <dt-bindings/clock/exynos9810.h>
 #endif
 
 /**
index 34b4f70f8c19cde91b2baa17371ae0a557d3a702..d314878f3481a3e8203dde85bc15ff3c58a7747d 100644 (file)
 #define EXYNOS_TMU_TEM1456X_SENSE_VALUE                (0x0A28)
 
 #define EXYNOS_TMU_NUM_PROBE_SHIFT             (16)
+#if defined(CONFIG_SOC_EXYNOS9810)
 #define EXYNOS_TMU_NUM_PROBE_MASK              (0xf)
+#else
+#define EXYNOS_TMU_NUM_PROBE_MASK              (0x7)
+#endif
 #define EXYNOS_TMU_LPI_MODE_SHIFT              (10)
 #define EXYNOS_TMU_LPI_MODE_MASK               (1)
 
+#if defined(CONFIG_SOC_EXYNOS9810)
 #define TOTAL_SENSORS          16
+#else
+#define TOTAL_SENSORS          8
+#endif
 #define DEFAULT_BALANCE_OFFSET 20
 
 #ifdef CONFIG_EXYNOS_ACPM_THERMAL