aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>2014-07-31 13:10:59 -0400
committerEduardo Valentin <edubezval@gmail.com>2014-11-02 22:02:47 -0500
commite841971628fa355358ea6c5b0595eed0a6202595 (patch)
treea5542c5aff18c0afec278c20dd8c45cbc146553e
parentcac7f2429872d3733dc3f9915857b1691da2eb2f (diff)
thermal: exynos: remove unused struct exynos_tmu_registers entries
Remove unused / write-only entries from struct exynos_tmu_registers. Then remove unused defines while at it. We don't keep the unused/untested features in the kernel just in case that some future hardware might need it. Such code has a real maintainance cost (all other code changes have to take the dead code into account) and usually makes future changes more difficult, not easier (i.e. recent additions of Exynos5420 SoC and Exynos5260 SoC thermal support has not made use of any of the driver's currently unused/untested features, moreover the recently added code is more complex than needed because of the existing dead code). Also all removed dead code is still accessible in the kernel git repository and can be easily brought back if/when needed. There should be no functional changes caused by this patch. Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com> Acked-by: Kyungmin Park <kyungmin.park@samsung.com> Tested-by: Amit Daniel Kachhap <amit.daniel@samsung.com> Signed-off-by: Eduardo Valentin <edubezval@gmail.com>
-rw-r--r--drivers/thermal/samsung/exynos_tmu.h40
-rw-r--r--drivers/thermal/samsung/exynos_tmu_data.c5
-rw-r--r--drivers/thermal/samsung/exynos_tmu_data.h29
3 files changed, 1 insertions, 73 deletions
diff --git a/drivers/thermal/samsung/exynos_tmu.h b/drivers/thermal/samsung/exynos_tmu.h
index 1b4a6444ea61..44ca6337e945 100644
--- a/drivers/thermal/samsung/exynos_tmu.h
+++ b/drivers/thermal/samsung/exynos_tmu.h
@@ -85,8 +85,6 @@ enum soc_type {
85 * @triminfo_25_shift: shift bit of the 25 C trim value in triminfo_data reg. 85 * @triminfo_25_shift: shift bit of the 25 C trim value in triminfo_data reg.
86 * @triminfo_85_shift: shift bit of the 85 C trim value in triminfo_data reg. 86 * @triminfo_85_shift: shift bit of the 85 C trim value in triminfo_data reg.
87 * @triminfo_ctrl: trim info controller register. 87 * @triminfo_ctrl: trim info controller register.
88 * @triminfo_reload_shift: shift of triminfo reload enable bit in triminfo_ctrl
89 reg.
90 * @tmu_ctrl: TMU main controller register. 88 * @tmu_ctrl: TMU main controller register.
91 * @test_mux_addr_shift: shift bits of test mux address. 89 * @test_mux_addr_shift: shift bits of test mux address.
92 * @buf_vref_sel_shift: shift bits of reference voltage in tmu_ctrl register. 90 * @buf_vref_sel_shift: shift bits of reference voltage in tmu_ctrl register.
@@ -101,27 +99,13 @@ enum soc_type {
101 register. 99 register.
102 * @calib_mode_mask: mask bits of calibration mode value in tmu_ctrl 100 * @calib_mode_mask: mask bits of calibration mode value in tmu_ctrl
103 register. 101 register.
104 * @therm_trip_tq_en_shift: shift bits of thermal trip enable by TQ pin in
105 tmu_ctrl register.
106 * @core_en_shift: shift bits of TMU core enable bit in tmu_ctrl register. 102 * @core_en_shift: shift bits of TMU core enable bit in tmu_ctrl register.
107 * @tmu_status: register drescribing the TMU status. 103 * @tmu_status: register drescribing the TMU status.
108 * @tmu_cur_temp: register containing the current temperature of the TMU. 104 * @tmu_cur_temp: register containing the current temperature of the TMU.
109 * @tmu_cur_temp_shift: shift bits of current temp value in tmu_cur_temp
110 register.
111 * @threshold_temp: register containing the base threshold level. 105 * @threshold_temp: register containing the base threshold level.
112 * @threshold_th0: Register containing first set of rising levels. 106 * @threshold_th0: Register containing first set of rising levels.
113 * @threshold_th0_l0_shift: shift bits of level0 threshold temperature.
114 * @threshold_th0_l1_shift: shift bits of level1 threshold temperature.
115 * @threshold_th0_l2_shift: shift bits of level2 threshold temperature.
116 * @threshold_th0_l3_shift: shift bits of level3 threshold temperature.
117 * @threshold_th1: Register containing second set of rising levels. 107 * @threshold_th1: Register containing second set of rising levels.
118 * @threshold_th1_l0_shift: shift bits of level0 threshold temperature.
119 * @threshold_th1_l1_shift: shift bits of level1 threshold temperature.
120 * @threshold_th1_l2_shift: shift bits of level2 threshold temperature.
121 * @threshold_th1_l3_shift: shift bits of level3 threshold temperature.
122 * @threshold_th2: Register containing third set of rising levels. 108 * @threshold_th2: Register containing third set of rising levels.
123 * @threshold_th2_l0_shift: shift bits of level0 threshold temperature.
124 * @threshold_th3: Register containing fourth set of rising levels.
125 * @threshold_th3_l0_shift: shift bits of level0 threshold temperature. 109 * @threshold_th3_l0_shift: shift bits of level0 threshold temperature.
126 * @tmu_inten: register containing the different threshold interrupt 110 * @tmu_inten: register containing the different threshold interrupt
127 enable bits. 111 enable bits.
@@ -130,9 +114,6 @@ enum soc_type {
130 * @inten_rise2_shift: shift bits of rising 2 interrupt bits. 114 * @inten_rise2_shift: shift bits of rising 2 interrupt bits.
131 * @inten_rise3_shift: shift bits of rising 3 interrupt bits. 115 * @inten_rise3_shift: shift bits of rising 3 interrupt bits.
132 * @inten_fall0_shift: shift bits of falling 0 interrupt bits. 116 * @inten_fall0_shift: shift bits of falling 0 interrupt bits.
133 * @inten_fall1_shift: shift bits of falling 1 interrupt bits.
134 * @inten_fall2_shift: shift bits of falling 2 interrupt bits.
135 * @inten_fall3_shift: shift bits of falling 3 interrupt bits.
136 * @tmu_intstat: Register containing the interrupt status values. 117 * @tmu_intstat: Register containing the interrupt status values.
137 * @tmu_intclear: Register for clearing the raised interrupt status. 118 * @tmu_intclear: Register for clearing the raised interrupt status.
138 * @intclr_fall_shift: shift bits for interrupt clear fall 0 119 * @intclr_fall_shift: shift bits for interrupt clear fall 0
@@ -142,7 +123,6 @@ enum soc_type {
142 * @emul_con: TMU emulation controller register. 123 * @emul_con: TMU emulation controller register.
143 * @emul_temp_shift: shift bits of emulation temperature. 124 * @emul_temp_shift: shift bits of emulation temperature.
144 * @emul_time_shift: shift bits of emulation time. 125 * @emul_time_shift: shift bits of emulation time.
145 * @emul_time_mask: mask bits of emulation time.
146 * @tmu_irqstatus: register to find which TMU generated interrupts. 126 * @tmu_irqstatus: register to find which TMU generated interrupts.
147 * @tmu_pmin: register to get/set the Pmin value. 127 * @tmu_pmin: register to get/set the Pmin value.
148 */ 128 */
@@ -153,7 +133,6 @@ struct exynos_tmu_registers {
153 133
154 u32 triminfo_ctrl; 134 u32 triminfo_ctrl;
155 u32 triminfo_ctrl1; 135 u32 triminfo_ctrl1;
156 u32 triminfo_reload_shift;
157 136
158 u32 tmu_ctrl; 137 u32 tmu_ctrl;
159 u32 test_mux_addr_shift; 138 u32 test_mux_addr_shift;
@@ -166,32 +145,17 @@ struct exynos_tmu_registers {
166 u32 buf_slope_sel_mask; 145 u32 buf_slope_sel_mask;
167 u32 calib_mode_shift; 146 u32 calib_mode_shift;
168 u32 calib_mode_mask; 147 u32 calib_mode_mask;
169 u32 therm_trip_tq_en_shift;
170 u32 core_en_shift; 148 u32 core_en_shift;
171 149
172 u32 tmu_status; 150 u32 tmu_status;
173 151
174 u32 tmu_cur_temp; 152 u32 tmu_cur_temp;
175 u32 tmu_cur_temp_shift;
176 153
177 u32 threshold_temp; 154 u32 threshold_temp;
178 155
179 u32 threshold_th0; 156 u32 threshold_th0;
180 u32 threshold_th0_l0_shift;
181 u32 threshold_th0_l1_shift;
182 u32 threshold_th0_l2_shift;
183 u32 threshold_th0_l3_shift;
184
185 u32 threshold_th1; 157 u32 threshold_th1;
186 u32 threshold_th1_l0_shift;
187 u32 threshold_th1_l1_shift;
188 u32 threshold_th1_l2_shift;
189 u32 threshold_th1_l3_shift;
190
191 u32 threshold_th2; 158 u32 threshold_th2;
192 u32 threshold_th2_l0_shift;
193
194 u32 threshold_th3;
195 u32 threshold_th3_l0_shift; 159 u32 threshold_th3_l0_shift;
196 160
197 u32 tmu_inten; 161 u32 tmu_inten;
@@ -200,9 +164,6 @@ struct exynos_tmu_registers {
200 u32 inten_rise2_shift; 164 u32 inten_rise2_shift;
201 u32 inten_rise3_shift; 165 u32 inten_rise3_shift;
202 u32 inten_fall0_shift; 166 u32 inten_fall0_shift;
203 u32 inten_fall1_shift;
204 u32 inten_fall2_shift;
205 u32 inten_fall3_shift;
206 167
207 u32 tmu_intstat; 168 u32 tmu_intstat;
208 169
@@ -215,7 +176,6 @@ struct exynos_tmu_registers {
215 u32 emul_con; 176 u32 emul_con;
216 u32 emul_temp_shift; 177 u32 emul_temp_shift;
217 u32 emul_time_shift; 178 u32 emul_time_shift;
218 u32 emul_time_mask;
219 179
220 u32 tmu_irqstatus; 180 u32 tmu_irqstatus;
221 u32 tmu_pmin; 181 u32 tmu_pmin;
diff --git a/drivers/thermal/samsung/exynos_tmu_data.c b/drivers/thermal/samsung/exynos_tmu_data.c
index aa8e0dee2055..d5cdfe524a3a 100644
--- a/drivers/thermal/samsung/exynos_tmu_data.c
+++ b/drivers/thermal/samsung/exynos_tmu_data.c
@@ -123,7 +123,6 @@ static const struct exynos_tmu_registers exynos3250_tmu_registers = {
123 .emul_con = EXYNOS_EMUL_CON, 123 .emul_con = EXYNOS_EMUL_CON,
124 .emul_temp_shift = EXYNOS_EMUL_DATA_SHIFT, 124 .emul_temp_shift = EXYNOS_EMUL_DATA_SHIFT,
125 .emul_time_shift = EXYNOS_EMUL_TIME_SHIFT, 125 .emul_time_shift = EXYNOS_EMUL_TIME_SHIFT,
126 .emul_time_mask = EXYNOS_EMUL_TIME_MASK,
127}; 126};
128 127
129#define EXYNOS3250_TMU_DATA \ 128#define EXYNOS3250_TMU_DATA \
@@ -185,7 +184,6 @@ static const struct exynos_tmu_registers exynos4412_tmu_registers = {
185 .triminfo_25_shift = EXYNOS_TRIMINFO_25_SHIFT, 184 .triminfo_25_shift = EXYNOS_TRIMINFO_25_SHIFT,
186 .triminfo_85_shift = EXYNOS_TRIMINFO_85_SHIFT, 185 .triminfo_85_shift = EXYNOS_TRIMINFO_85_SHIFT,
187 .triminfo_ctrl = EXYNOS_TMU_TRIMINFO_CON, 186 .triminfo_ctrl = EXYNOS_TMU_TRIMINFO_CON,
188 .triminfo_reload_shift = EXYNOS_TRIMINFO_RELOAD_SHIFT,
189 .tmu_ctrl = EXYNOS_TMU_REG_CONTROL, 187 .tmu_ctrl = EXYNOS_TMU_REG_CONTROL,
190 .test_mux_addr_shift = EXYNOS4412_MUX_ADDR_SHIFT, 188 .test_mux_addr_shift = EXYNOS4412_MUX_ADDR_SHIFT,
191 .buf_vref_sel_shift = EXYNOS_TMU_REF_VOLTAGE_SHIFT, 189 .buf_vref_sel_shift = EXYNOS_TMU_REF_VOLTAGE_SHIFT,
@@ -215,7 +213,6 @@ static const struct exynos_tmu_registers exynos4412_tmu_registers = {
215 .emul_con = EXYNOS_EMUL_CON, 213 .emul_con = EXYNOS_EMUL_CON,
216 .emul_temp_shift = EXYNOS_EMUL_DATA_SHIFT, 214 .emul_temp_shift = EXYNOS_EMUL_DATA_SHIFT,
217 .emul_time_shift = EXYNOS_EMUL_TIME_SHIFT, 215 .emul_time_shift = EXYNOS_EMUL_TIME_SHIFT,
218 .emul_time_mask = EXYNOS_EMUL_TIME_MASK,
219}; 216};
220 217
221#define EXYNOS4412_TMU_DATA \ 218#define EXYNOS4412_TMU_DATA \
@@ -317,7 +314,6 @@ static const struct exynos_tmu_registers exynos5260_tmu_registers = {
317 .emul_con = EXYNOS5260_EMUL_CON, 314 .emul_con = EXYNOS5260_EMUL_CON,
318 .emul_temp_shift = EXYNOS_EMUL_DATA_SHIFT, 315 .emul_temp_shift = EXYNOS_EMUL_DATA_SHIFT,
319 .emul_time_shift = EXYNOS_EMUL_TIME_SHIFT, 316 .emul_time_shift = EXYNOS_EMUL_TIME_SHIFT,
320 .emul_time_mask = EXYNOS_EMUL_TIME_MASK,
321}; 317};
322 318
323#define __EXYNOS5260_TMU_DATA \ 319#define __EXYNOS5260_TMU_DATA \
@@ -409,7 +405,6 @@ static const struct exynos_tmu_registers exynos5420_tmu_registers = {
409 .emul_con = EXYNOS_EMUL_CON, 405 .emul_con = EXYNOS_EMUL_CON,
410 .emul_temp_shift = EXYNOS_EMUL_DATA_SHIFT, 406 .emul_temp_shift = EXYNOS_EMUL_DATA_SHIFT,
411 .emul_time_shift = EXYNOS_EMUL_TIME_SHIFT, 407 .emul_time_shift = EXYNOS_EMUL_TIME_SHIFT,
412 .emul_time_mask = EXYNOS_EMUL_TIME_MASK,
413}; 408};
414 409
415#define __EXYNOS5420_TMU_DATA \ 410#define __EXYNOS5420_TMU_DATA \
diff --git a/drivers/thermal/samsung/exynos_tmu_data.h b/drivers/thermal/samsung/exynos_tmu_data.h
index f0979e598491..9337c5a36167 100644
--- a/drivers/thermal/samsung/exynos_tmu_data.h
+++ b/drivers/thermal/samsung/exynos_tmu_data.h
@@ -42,20 +42,8 @@
42/* Exynos4210 specific registers */ 42/* Exynos4210 specific registers */
43#define EXYNOS4210_TMU_REG_THRESHOLD_TEMP 0x44 43#define EXYNOS4210_TMU_REG_THRESHOLD_TEMP 0x44
44#define EXYNOS4210_TMU_REG_TRIG_LEVEL0 0x50 44#define EXYNOS4210_TMU_REG_TRIG_LEVEL0 0x50
45#define EXYNOS4210_TMU_REG_TRIG_LEVEL1 0x54 45
46#define EXYNOS4210_TMU_REG_TRIG_LEVEL2 0x58
47#define EXYNOS4210_TMU_REG_TRIG_LEVEL3 0x5C
48#define EXYNOS4210_TMU_REG_PAST_TEMP0 0x60
49#define EXYNOS4210_TMU_REG_PAST_TEMP1 0x64
50#define EXYNOS4210_TMU_REG_PAST_TEMP2 0x68
51#define EXYNOS4210_TMU_REG_PAST_TEMP3 0x6C
52
53#define EXYNOS4210_TMU_TRIG_LEVEL0_MASK 0x1
54#define EXYNOS4210_TMU_TRIG_LEVEL1_MASK 0x10
55#define EXYNOS4210_TMU_TRIG_LEVEL2_MASK 0x100
56#define EXYNOS4210_TMU_TRIG_LEVEL3_MASK 0x1000
57#define EXYNOS4210_TMU_TRIG_LEVEL_MASK 0x1111 46#define EXYNOS4210_TMU_TRIG_LEVEL_MASK 0x1111
58#define EXYNOS4210_TMU_INTCLEAR_VAL 0x1111
59 47
60/* Exynos5250 and Exynos4412 specific registers */ 48/* Exynos5250 and Exynos4412 specific registers */
61#define EXYNOS_TMU_TRIMINFO_CON 0x14 49#define EXYNOS_TMU_TRIMINFO_CON 0x14
@@ -63,14 +51,11 @@
63#define EXYNOS_THD_TEMP_FALL 0x54 51#define EXYNOS_THD_TEMP_FALL 0x54
64#define EXYNOS_EMUL_CON 0x80 52#define EXYNOS_EMUL_CON 0x80
65 53
66#define EXYNOS_TRIMINFO_RELOAD_SHIFT 1
67#define EXYNOS_TRIMINFO_25_SHIFT 0 54#define EXYNOS_TRIMINFO_25_SHIFT 0
68#define EXYNOS_TRIMINFO_85_SHIFT 8 55#define EXYNOS_TRIMINFO_85_SHIFT 8
69#define EXYNOS_TMU_RISE_INT_MASK 0x111 56#define EXYNOS_TMU_RISE_INT_MASK 0x111
70#define EXYNOS_TMU_RISE_INT_SHIFT 0 57#define EXYNOS_TMU_RISE_INT_SHIFT 0
71#define EXYNOS_TMU_FALL_INT_MASK 0x111 58#define EXYNOS_TMU_FALL_INT_MASK 0x111
72#define EXYNOS_TMU_CLEAR_RISE_INT 0x111
73#define EXYNOS_TMU_CLEAR_FALL_INT (0x111 << 12)
74#define EXYNOS_TMU_CLEAR_FALL_INT_SHIFT 12 59#define EXYNOS_TMU_CLEAR_FALL_INT_SHIFT 12
75#define EXYNOS5420_TMU_CLEAR_FALL_INT_SHIFT 16 60#define EXYNOS5420_TMU_CLEAR_FALL_INT_SHIFT 16
76#define EXYNOS5440_TMU_CLEAR_FALL_INT_SHIFT 4 61#define EXYNOS5440_TMU_CLEAR_FALL_INT_SHIFT 4
@@ -85,9 +70,6 @@
85#define EXYNOS_TMU_INTEN_RISE2_SHIFT 8 70#define EXYNOS_TMU_INTEN_RISE2_SHIFT 8
86#define EXYNOS_TMU_INTEN_RISE3_SHIFT 12 71#define EXYNOS_TMU_INTEN_RISE3_SHIFT 12
87#define EXYNOS_TMU_INTEN_FALL0_SHIFT 16 72#define EXYNOS_TMU_INTEN_FALL0_SHIFT 16
88#define EXYNOS_TMU_INTEN_FALL1_SHIFT 20
89#define EXYNOS_TMU_INTEN_FALL2_SHIFT 24
90#define EXYNOS_TMU_INTEN_FALL3_SHIFT 28
91 73
92#define EXYNOS_EMUL_TIME 0x57F0 74#define EXYNOS_EMUL_TIME 0x57F0
93#define EXYNOS_EMUL_TIME_MASK 0xffff 75#define EXYNOS_EMUL_TIME_MASK 0xffff
@@ -122,13 +104,11 @@
122#define EXYNOS5440_TMU_S0_7_TH0 0x110 104#define EXYNOS5440_TMU_S0_7_TH0 0x110
123#define EXYNOS5440_TMU_S0_7_TH1 0x130 105#define EXYNOS5440_TMU_S0_7_TH1 0x130
124#define EXYNOS5440_TMU_S0_7_TH2 0x150 106#define EXYNOS5440_TMU_S0_7_TH2 0x150
125#define EXYNOS5440_TMU_S0_7_EVTEN 0x1F0
126#define EXYNOS5440_TMU_S0_7_IRQEN 0x210 107#define EXYNOS5440_TMU_S0_7_IRQEN 0x210
127#define EXYNOS5440_TMU_S0_7_IRQ 0x230 108#define EXYNOS5440_TMU_S0_7_IRQ 0x230
128/* exynos5440 common registers */ 109/* exynos5440 common registers */
129#define EXYNOS5440_TMU_IRQ_STATUS 0x000 110#define EXYNOS5440_TMU_IRQ_STATUS 0x000
130#define EXYNOS5440_TMU_PMIN 0x004 111#define EXYNOS5440_TMU_PMIN 0x004
131#define EXYNOS5440_TMU_TEMP 0x008
132 112
133#define EXYNOS5440_TMU_RISE_INT_MASK 0xf 113#define EXYNOS5440_TMU_RISE_INT_MASK 0xf
134#define EXYNOS5440_TMU_RISE_INT_SHIFT 0 114#define EXYNOS5440_TMU_RISE_INT_SHIFT 0
@@ -138,13 +118,6 @@
138#define EXYNOS5440_TMU_INTEN_RISE2_SHIFT 2 118#define EXYNOS5440_TMU_INTEN_RISE2_SHIFT 2
139#define EXYNOS5440_TMU_INTEN_RISE3_SHIFT 3 119#define EXYNOS5440_TMU_INTEN_RISE3_SHIFT 3
140#define EXYNOS5440_TMU_INTEN_FALL0_SHIFT 4 120#define EXYNOS5440_TMU_INTEN_FALL0_SHIFT 4
141#define EXYNOS5440_TMU_INTEN_FALL1_SHIFT 5
142#define EXYNOS5440_TMU_INTEN_FALL2_SHIFT 6
143#define EXYNOS5440_TMU_INTEN_FALL3_SHIFT 7
144#define EXYNOS5440_TMU_TH_RISE0_SHIFT 0
145#define EXYNOS5440_TMU_TH_RISE1_SHIFT 8
146#define EXYNOS5440_TMU_TH_RISE2_SHIFT 16
147#define EXYNOS5440_TMU_TH_RISE3_SHIFT 24
148#define EXYNOS5440_TMU_TH_RISE4_SHIFT 24 121#define EXYNOS5440_TMU_TH_RISE4_SHIFT 24
149#define EXYNOS5440_EFUSE_SWAP_OFFSET 8 122#define EXYNOS5440_EFUSE_SWAP_OFFSET 8
150 123