aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/thermal
diff options
context:
space:
mode:
authorBartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>2014-11-13 10:01:00 -0500
committerEduardo Valentin <edubezval@gmail.com>2014-11-20 09:52:39 -0500
commitbfb2b88c79df839779586e0247456bd79882b145 (patch)
tree6e301ae49413e8890a6318f885f4c610234740bb /drivers/thermal
parent32f9520569ed6bf75673063b8b1c4f2e46a75c48 (diff)
thermal: exynos: remove needless test_mux_addr_shift abstraction
reg->test_mux_addr_shift is used only if pdata->test_mux is non-zero. pdata->test_mux is defined only on Exynos3250 and Exynos4412 (other SoC types don't even have pdata->test_mux entry assigned in their struct exynos_tmu_registers instances) so the abstraction is not needed and can be removed. There should be no functional changes caused by this patch. Cc: Amit Daniel Kachhap <amit.daniel@samsung.com> Cc: Lukasz Majewski <l.majewski@samsung.com> Cc: Eduardo Valentin <edubezval@gmail.com> Cc: Zhang Rui <rui.zhang@intel.com> Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com> Acked-by: Kyungmin Park <kyungmin.park@samsung.com> Tested-by: Lukasz Majewski <l.majewski@samsung.com> Signed-off-by: Eduardo Valentin <edubezval@gmail.com>
Diffstat (limited to 'drivers/thermal')
-rw-r--r--drivers/thermal/samsung/exynos_tmu.c2
-rw-r--r--drivers/thermal/samsung/exynos_tmu.h2
-rw-r--r--drivers/thermal/samsung/exynos_tmu_data.c2
3 files changed, 1 insertions, 5 deletions
diff --git a/drivers/thermal/samsung/exynos_tmu.c b/drivers/thermal/samsung/exynos_tmu.c
index 160e7fa5e1bc..c8d6cdde272c 100644
--- a/drivers/thermal/samsung/exynos_tmu.c
+++ b/drivers/thermal/samsung/exynos_tmu.c
@@ -295,7 +295,7 @@ static void exynos_tmu_control(struct platform_device *pdev, bool on)
295 con = readl(data->base + reg->tmu_ctrl); 295 con = readl(data->base + reg->tmu_ctrl);
296 296
297 if (pdata->test_mux) 297 if (pdata->test_mux)
298 con |= (pdata->test_mux << reg->test_mux_addr_shift); 298 con |= (pdata->test_mux << EXYNOS4412_MUX_ADDR_SHIFT);
299 299
300 con &= ~(EXYNOS_TMU_REF_VOLTAGE_MASK << EXYNOS_TMU_REF_VOLTAGE_SHIFT); 300 con &= ~(EXYNOS_TMU_REF_VOLTAGE_MASK << EXYNOS_TMU_REF_VOLTAGE_SHIFT);
301 con |= pdata->reference_voltage << EXYNOS_TMU_REF_VOLTAGE_SHIFT; 301 con |= pdata->reference_voltage << EXYNOS_TMU_REF_VOLTAGE_SHIFT;
diff --git a/drivers/thermal/samsung/exynos_tmu.h b/drivers/thermal/samsung/exynos_tmu.h
index cee81a1de8e3..0fb10d158471 100644
--- a/drivers/thermal/samsung/exynos_tmu.h
+++ b/drivers/thermal/samsung/exynos_tmu.h
@@ -77,7 +77,6 @@ enum soc_type {
77 * bitfields. The register validity, offsets and bitfield values may vary 77 * bitfields. The register validity, offsets and bitfield values may vary
78 * slightly across different exynos SOC's. 78 * slightly across different exynos SOC's.
79 * @tmu_ctrl: TMU main controller register. 79 * @tmu_ctrl: TMU main controller register.
80 * @test_mux_addr_shift: shift bits of test mux address.
81 * @therm_trip_mode_shift: shift bits of tripping mode in tmu_ctrl register. 80 * @therm_trip_mode_shift: shift bits of tripping mode in tmu_ctrl register.
82 * @therm_trip_mode_mask: mask bits of tripping mode in tmu_ctrl register. 81 * @therm_trip_mode_mask: mask bits of tripping mode in tmu_ctrl register.
83 * @therm_trip_en_shift: shift bits of tripping enable in tmu_ctrl register. 82 * @therm_trip_en_shift: shift bits of tripping enable in tmu_ctrl register.
@@ -103,7 +102,6 @@ enum soc_type {
103 */ 102 */
104struct exynos_tmu_registers { 103struct exynos_tmu_registers {
105 u32 tmu_ctrl; 104 u32 tmu_ctrl;
106 u32 test_mux_addr_shift;
107 u32 therm_trip_mode_shift; 105 u32 therm_trip_mode_shift;
108 u32 therm_trip_mode_mask; 106 u32 therm_trip_mode_mask;
109 u32 therm_trip_en_shift; 107 u32 therm_trip_en_shift;
diff --git a/drivers/thermal/samsung/exynos_tmu_data.c b/drivers/thermal/samsung/exynos_tmu_data.c
index d4b9a68e803d..4ca1283f1afb 100644
--- a/drivers/thermal/samsung/exynos_tmu_data.c
+++ b/drivers/thermal/samsung/exynos_tmu_data.c
@@ -83,7 +83,6 @@ struct exynos_tmu_init_data const exynos4210_default_tmu_data = {
83#if defined(CONFIG_SOC_EXYNOS3250) 83#if defined(CONFIG_SOC_EXYNOS3250)
84static const struct exynos_tmu_registers exynos3250_tmu_registers = { 84static const struct exynos_tmu_registers exynos3250_tmu_registers = {
85 .tmu_ctrl = EXYNOS_TMU_REG_CONTROL, 85 .tmu_ctrl = EXYNOS_TMU_REG_CONTROL,
86 .test_mux_addr_shift = EXYNOS4412_MUX_ADDR_SHIFT,
87 .therm_trip_mode_shift = EXYNOS_TMU_TRIP_MODE_SHIFT, 86 .therm_trip_mode_shift = EXYNOS_TMU_TRIP_MODE_SHIFT,
88 .therm_trip_mode_mask = EXYNOS_TMU_TRIP_MODE_MASK, 87 .therm_trip_mode_mask = EXYNOS_TMU_TRIP_MODE_MASK,
89 .therm_trip_en_shift = EXYNOS_TMU_THERM_TRIP_EN_SHIFT, 88 .therm_trip_en_shift = EXYNOS_TMU_THERM_TRIP_EN_SHIFT,
@@ -159,7 +158,6 @@ struct exynos_tmu_init_data const exynos3250_default_tmu_data = {
159#if defined(CONFIG_SOC_EXYNOS4412) || defined(CONFIG_SOC_EXYNOS5250) 158#if defined(CONFIG_SOC_EXYNOS4412) || defined(CONFIG_SOC_EXYNOS5250)
160static const struct exynos_tmu_registers exynos4412_tmu_registers = { 159static const struct exynos_tmu_registers exynos4412_tmu_registers = {
161 .tmu_ctrl = EXYNOS_TMU_REG_CONTROL, 160 .tmu_ctrl = EXYNOS_TMU_REG_CONTROL,
162 .test_mux_addr_shift = EXYNOS4412_MUX_ADDR_SHIFT,
163 .therm_trip_mode_shift = EXYNOS_TMU_TRIP_MODE_SHIFT, 161 .therm_trip_mode_shift = EXYNOS_TMU_TRIP_MODE_SHIFT,
164 .therm_trip_mode_mask = EXYNOS_TMU_TRIP_MODE_MASK, 162 .therm_trip_mode_mask = EXYNOS_TMU_TRIP_MODE_MASK,
165 .therm_trip_en_shift = EXYNOS_TMU_THERM_TRIP_EN_SHIFT, 163 .therm_trip_en_shift = EXYNOS_TMU_THERM_TRIP_EN_SHIFT,