From: Eunseok Choi Date: Wed, 24 May 2017 15:28:47 +0000 (+0900) Subject: [COMMON] thermal: add macros to support soc dependencies X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=ac8d5e57f1f247b29311ce8abfced2af878f337d;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git [COMMON] thermal: add macros to support soc dependencies Change-Id: I455a9f4c02402cd1ae6808354b9450333ab68f92 Signed-off-by: Eunseok Choi --- diff --git a/drivers/thermal/cpu_cooling.c b/drivers/thermal/cpu_cooling.c index f285b37ca7b2..1082738973bb 100644 --- a/drivers/thermal/cpu_cooling.c +++ b/drivers/thermal/cpu_cooling.c @@ -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}; diff --git a/drivers/thermal/gpu_cooling.c b/drivers/thermal/gpu_cooling.c index 25b07fe420a2..3f88c4240e53 100644 --- a/drivers/thermal/gpu_cooling.c +++ b/drivers/thermal/gpu_cooling.c @@ -40,6 +40,8 @@ #include #elif defined(CONFIG_SOC_EXYNOS7872) #include +#elif defined(CONFIG_SOC_EXYNOS9810) +#include #endif /** diff --git a/drivers/thermal/samsung/exynos_tmu.c b/drivers/thermal/samsung/exynos_tmu.c index 34b4f70f8c19..d314878f3481 100644 --- a/drivers/thermal/samsung/exynos_tmu.c +++ b/drivers/thermal/samsung/exynos_tmu.c @@ -161,11 +161,19 @@ #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