Commit 77a37a92 authored by Bartlomiej Zolnierkiewicz's avatar Bartlomiej Zolnierkiewicz Committed by Eduardo Valentin

thermal: exynos: remove needless therm_trip_en_shift abstraction

reg->therm_trip_en_shift is used only in exynos_tmu_initialize()
and not accessed on Exynos4210 (also reg->therm_trip_en_shift is
not even assigned in exynos4210_tmu_registers but it is assigned
to identical value for all other SoC types) so the register
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: default avatarBartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
Acked-by: default avatarKyungmin Park <kyungmin.park@samsung.com>
Tested-by: default avatarLukasz Majewski <l.majewski@samsung.com>
Signed-off-by: default avatarEduardo Valentin <edubezval@gmail.com>
parent b9504a6a
...@@ -266,7 +266,7 @@ static int exynos_tmu_initialize(struct platform_device *pdev) ...@@ -266,7 +266,7 @@ static int exynos_tmu_initialize(struct platform_device *pdev)
data->base + reg->threshold_th2); data->base + reg->threshold_th2);
} }
con = readl(data->base + reg->tmu_ctrl); con = readl(data->base + reg->tmu_ctrl);
con |= (1 << reg->therm_trip_en_shift); con |= (1 << EXYNOS_TMU_THERM_TRIP_EN_SHIFT);
writel(con, data->base + reg->tmu_ctrl); writel(con, data->base + reg->tmu_ctrl);
} }
} }
......
...@@ -77,7 +77,6 @@ enum soc_type { ...@@ -77,7 +77,6 @@ enum soc_type {
* bitfields. The register validity, offsets and bitfield values may vary * bitfields. The register validity, offsets and bitfield values may vary
* slightly across different exynos SOC's. * slightly across different exynos SOC's.
* @tmu_ctrl: TMU main controller register. * @tmu_ctrl: TMU main controller register.
* @therm_trip_en_shift: shift bits of tripping enable in tmu_ctrl register.
* @tmu_cur_temp: register containing the current temperature of the TMU. * @tmu_cur_temp: register containing the current temperature of the TMU.
* @threshold_th0: Register containing first set of rising levels. * @threshold_th0: Register containing first set of rising levels.
* @threshold_th1: Register containing second set of rising levels. * @threshold_th1: Register containing second set of rising levels.
...@@ -100,7 +99,6 @@ enum soc_type { ...@@ -100,7 +99,6 @@ enum soc_type {
*/ */
struct exynos_tmu_registers { struct exynos_tmu_registers {
u32 tmu_ctrl; u32 tmu_ctrl;
u32 therm_trip_en_shift;
u32 tmu_cur_temp; u32 tmu_cur_temp;
......
...@@ -83,7 +83,6 @@ struct exynos_tmu_init_data const exynos4210_default_tmu_data = { ...@@ -83,7 +83,6 @@ struct exynos_tmu_init_data const exynos4210_default_tmu_data = {
#if defined(CONFIG_SOC_EXYNOS3250) #if defined(CONFIG_SOC_EXYNOS3250)
static const struct exynos_tmu_registers exynos3250_tmu_registers = { static const struct exynos_tmu_registers exynos3250_tmu_registers = {
.tmu_ctrl = EXYNOS_TMU_REG_CONTROL, .tmu_ctrl = EXYNOS_TMU_REG_CONTROL,
.therm_trip_en_shift = EXYNOS_TMU_THERM_TRIP_EN_SHIFT,
.tmu_cur_temp = EXYNOS_TMU_REG_CURRENT_TEMP, .tmu_cur_temp = EXYNOS_TMU_REG_CURRENT_TEMP,
.threshold_th0 = EXYNOS_THD_TEMP_RISE, .threshold_th0 = EXYNOS_THD_TEMP_RISE,
.threshold_th1 = EXYNOS_THD_TEMP_FALL, .threshold_th1 = EXYNOS_THD_TEMP_FALL,
...@@ -156,7 +155,6 @@ struct exynos_tmu_init_data const exynos3250_default_tmu_data = { ...@@ -156,7 +155,6 @@ struct exynos_tmu_init_data const exynos3250_default_tmu_data = {
#if defined(CONFIG_SOC_EXYNOS4412) || defined(CONFIG_SOC_EXYNOS5250) #if defined(CONFIG_SOC_EXYNOS4412) || defined(CONFIG_SOC_EXYNOS5250)
static const struct exynos_tmu_registers exynos4412_tmu_registers = { static const struct exynos_tmu_registers exynos4412_tmu_registers = {
.tmu_ctrl = EXYNOS_TMU_REG_CONTROL, .tmu_ctrl = EXYNOS_TMU_REG_CONTROL,
.therm_trip_en_shift = EXYNOS_TMU_THERM_TRIP_EN_SHIFT,
.tmu_cur_temp = EXYNOS_TMU_REG_CURRENT_TEMP, .tmu_cur_temp = EXYNOS_TMU_REG_CURRENT_TEMP,
.threshold_th0 = EXYNOS_THD_TEMP_RISE, .threshold_th0 = EXYNOS_THD_TEMP_RISE,
.threshold_th1 = EXYNOS_THD_TEMP_FALL, .threshold_th1 = EXYNOS_THD_TEMP_FALL,
...@@ -242,7 +240,6 @@ struct exynos_tmu_init_data const exynos5250_default_tmu_data = { ...@@ -242,7 +240,6 @@ struct exynos_tmu_init_data const exynos5250_default_tmu_data = {
#if defined(CONFIG_SOC_EXYNOS5260) #if defined(CONFIG_SOC_EXYNOS5260)
static const struct exynos_tmu_registers exynos5260_tmu_registers = { static const struct exynos_tmu_registers exynos5260_tmu_registers = {
.tmu_ctrl = EXYNOS_TMU_REG_CONTROL, .tmu_ctrl = EXYNOS_TMU_REG_CONTROL,
.therm_trip_en_shift = EXYNOS_TMU_THERM_TRIP_EN_SHIFT,
.tmu_cur_temp = EXYNOS_TMU_REG_CURRENT_TEMP, .tmu_cur_temp = EXYNOS_TMU_REG_CURRENT_TEMP,
.threshold_th0 = EXYNOS_THD_TEMP_RISE, .threshold_th0 = EXYNOS_THD_TEMP_RISE,
.threshold_th1 = EXYNOS_THD_TEMP_FALL, .threshold_th1 = EXYNOS_THD_TEMP_FALL,
...@@ -317,7 +314,6 @@ struct exynos_tmu_init_data const exynos5260_default_tmu_data = { ...@@ -317,7 +314,6 @@ struct exynos_tmu_init_data const exynos5260_default_tmu_data = {
#if defined(CONFIG_SOC_EXYNOS5420) #if defined(CONFIG_SOC_EXYNOS5420)
static const struct exynos_tmu_registers exynos5420_tmu_registers = { static const struct exynos_tmu_registers exynos5420_tmu_registers = {
.tmu_ctrl = EXYNOS_TMU_REG_CONTROL, .tmu_ctrl = EXYNOS_TMU_REG_CONTROL,
.therm_trip_en_shift = EXYNOS_TMU_THERM_TRIP_EN_SHIFT,
.tmu_cur_temp = EXYNOS_TMU_REG_CURRENT_TEMP, .tmu_cur_temp = EXYNOS_TMU_REG_CURRENT_TEMP,
.threshold_th0 = EXYNOS_THD_TEMP_RISE, .threshold_th0 = EXYNOS_THD_TEMP_RISE,
.threshold_th1 = EXYNOS_THD_TEMP_FALL, .threshold_th1 = EXYNOS_THD_TEMP_FALL,
...@@ -400,7 +396,6 @@ struct exynos_tmu_init_data const exynos5420_default_tmu_data = { ...@@ -400,7 +396,6 @@ struct exynos_tmu_init_data const exynos5420_default_tmu_data = {
#if defined(CONFIG_SOC_EXYNOS5440) #if defined(CONFIG_SOC_EXYNOS5440)
static const struct exynos_tmu_registers exynos5440_tmu_registers = { static const struct exynos_tmu_registers exynos5440_tmu_registers = {
.tmu_ctrl = EXYNOS5440_TMU_S0_7_CTRL, .tmu_ctrl = EXYNOS5440_TMU_S0_7_CTRL,
.therm_trip_en_shift = EXYNOS_TMU_THERM_TRIP_EN_SHIFT,
.tmu_cur_temp = EXYNOS5440_TMU_S0_7_TEMP, .tmu_cur_temp = EXYNOS5440_TMU_S0_7_TEMP,
.threshold_th0 = EXYNOS5440_TMU_S0_7_TH0, .threshold_th0 = EXYNOS5440_TMU_S0_7_TH0,
.threshold_th1 = EXYNOS5440_TMU_S0_7_TH1, .threshold_th1 = EXYNOS5440_TMU_S0_7_TH1,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment