aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul Mundt <lethal@linux-sh.org>2009-05-03 04:57:17 -0400
committerPaul Mundt <lethal@linux-sh.org>2009-05-03 04:57:17 -0400
commit46a12f7426d71cabc08972cf8d3ffdd441d26a3a (patch)
tree40689b826cc2b24d62bc5be1e08db27593072873
parentd43a41bf8b504a1d9f0b4ce7e17d803f4ef39d84 (diff)
sh: Consolidate MTU2/CMT/TMU timer platform data.
All of the SH timers use a roughly identical structure for platform data, which presently is broken out for each block. Consolidate all of these definitions, as there is no reason for them to be broken out in the first place. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
-rw-r--r--arch/sh/kernel/cpu/sh2/setup-sh7619.c6
-rw-r--r--arch/sh/kernel/cpu/sh2a/setup-mxg.c8
-rw-r--r--arch/sh/kernel/cpu/sh2a/setup-sh7201.c8
-rw-r--r--arch/sh/kernel/cpu/sh2a/setup-sh7203.c11
-rw-r--r--arch/sh/kernel/cpu/sh2a/setup-sh7206.c13
-rw-r--r--arch/sh/kernel/cpu/sh4a/setup-sh7343.c4
-rw-r--r--arch/sh/kernel/cpu/sh4a/setup-sh7366.c4
-rw-r--r--arch/sh/kernel/cpu/sh4a/setup-sh7722.c11
-rw-r--r--arch/sh/kernel/cpu/sh4a/setup-sh7723.c4
-rw-r--r--arch/sh/kernel/cpu/sh4a/setup-sh7724.c4
-rw-r--r--drivers/clocksource/sh_cmt.c14
-rw-r--r--drivers/clocksource/sh_mtu2.c14
-rw-r--r--drivers/clocksource/sh_tmu.c14
-rw-r--r--include/linux/sh_cmt.h13
-rw-r--r--include/linux/sh_mtu2.h12
-rw-r--r--include/linux/sh_timer.h13
-rw-r--r--include/linux/sh_tmu.h13
17 files changed, 69 insertions, 97 deletions
diff --git a/arch/sh/kernel/cpu/sh2/setup-sh7619.c b/arch/sh/kernel/cpu/sh2/setup-sh7619.c
index d70c263eb07e..94ac27fc2237 100644
--- a/arch/sh/kernel/cpu/sh2/setup-sh7619.c
+++ b/arch/sh/kernel/cpu/sh2/setup-sh7619.c
@@ -12,7 +12,7 @@
12#include <linux/init.h> 12#include <linux/init.h>
13#include <linux/serial.h> 13#include <linux/serial.h>
14#include <linux/serial_sci.h> 14#include <linux/serial_sci.h>
15#include <linux/sh_cmt.h> 15#include <linux/sh_timer.h>
16#include <linux/io.h> 16#include <linux/io.h>
17 17
18enum { 18enum {
@@ -111,7 +111,7 @@ static struct platform_device eth_device = {
111 .resource = eth_resources, 111 .resource = eth_resources,
112}; 112};
113 113
114static struct sh_cmt_config cmt0_platform_data = { 114static struct sh_timer_config cmt0_platform_data = {
115 .name = "CMT0", 115 .name = "CMT0",
116 .channel_offset = 0x02, 116 .channel_offset = 0x02,
117 .timer_bit = 0, 117 .timer_bit = 0,
@@ -143,7 +143,7 @@ static struct platform_device cmt0_device = {
143 .num_resources = ARRAY_SIZE(cmt0_resources), 143 .num_resources = ARRAY_SIZE(cmt0_resources),
144}; 144};
145 145
146static struct sh_cmt_config cmt1_platform_data = { 146static struct sh_timer_config cmt1_platform_data = {
147 .name = "CMT1", 147 .name = "CMT1",
148 .channel_offset = 0x08, 148 .channel_offset = 0x08,
149 .timer_bit = 1, 149 .timer_bit = 1,
diff --git a/arch/sh/kernel/cpu/sh2a/setup-mxg.c b/arch/sh/kernel/cpu/sh2a/setup-mxg.c
index 870030aa05bc..a452d9649069 100644
--- a/arch/sh/kernel/cpu/sh2a/setup-mxg.c
+++ b/arch/sh/kernel/cpu/sh2a/setup-mxg.c
@@ -11,7 +11,7 @@
11#include <linux/init.h> 11#include <linux/init.h>
12#include <linux/serial.h> 12#include <linux/serial.h>
13#include <linux/serial_sci.h> 13#include <linux/serial_sci.h>
14#include <linux/sh_mtu2.h> 14#include <linux/sh_timer.h>
15 15
16enum { 16enum {
17 UNUSED = 0, 17 UNUSED = 0,
@@ -114,7 +114,7 @@ static struct intc_mask_reg mask_registers[] __initdata = {
114static DECLARE_INTC_DESC(intc_desc, "mxg", vectors, groups, 114static DECLARE_INTC_DESC(intc_desc, "mxg", vectors, groups,
115 mask_registers, prio_registers, NULL); 115 mask_registers, prio_registers, NULL);
116 116
117static struct sh_mtu2_config mtu2_0_platform_data = { 117static struct sh_timer_config mtu2_0_platform_data = {
118 .name = "MTU2_0", 118 .name = "MTU2_0",
119 .channel_offset = -0x80, 119 .channel_offset = -0x80,
120 .timer_bit = 0, 120 .timer_bit = 0,
@@ -145,7 +145,7 @@ static struct platform_device mtu2_0_device = {
145 .num_resources = ARRAY_SIZE(mtu2_0_resources), 145 .num_resources = ARRAY_SIZE(mtu2_0_resources),
146}; 146};
147 147
148static struct sh_mtu2_config mtu2_1_platform_data = { 148static struct sh_timer_config mtu2_1_platform_data = {
149 .name = "MTU2_1", 149 .name = "MTU2_1",
150 .channel_offset = -0x100, 150 .channel_offset = -0x100,
151 .timer_bit = 1, 151 .timer_bit = 1,
@@ -176,7 +176,7 @@ static struct platform_device mtu2_1_device = {
176 .num_resources = ARRAY_SIZE(mtu2_1_resources), 176 .num_resources = ARRAY_SIZE(mtu2_1_resources),
177}; 177};
178 178
179static struct sh_mtu2_config mtu2_2_platform_data = { 179static struct sh_timer_config mtu2_2_platform_data = {
180 .name = "MTU2_2", 180 .name = "MTU2_2",
181 .channel_offset = 0x80, 181 .channel_offset = 0x80,
182 .timer_bit = 2, 182 .timer_bit = 2,
diff --git a/arch/sh/kernel/cpu/sh2a/setup-sh7201.c b/arch/sh/kernel/cpu/sh2a/setup-sh7201.c
index 074aa9062e4b..772358b7685e 100644
--- a/arch/sh/kernel/cpu/sh2a/setup-sh7201.c
+++ b/arch/sh/kernel/cpu/sh2a/setup-sh7201.c
@@ -12,7 +12,7 @@
12#include <linux/init.h> 12#include <linux/init.h>
13#include <linux/serial.h> 13#include <linux/serial.h>
14#include <linux/serial_sci.h> 14#include <linux/serial_sci.h>
15#include <linux/sh_mtu2.h> 15#include <linux/sh_timer.h>
16#include <linux/io.h> 16#include <linux/io.h>
17 17
18enum { 18enum {
@@ -251,7 +251,7 @@ static struct platform_device rtc_device = {
251 .resource = rtc_resources, 251 .resource = rtc_resources,
252}; 252};
253 253
254static struct sh_mtu2_config mtu2_0_platform_data = { 254static struct sh_timer_config mtu2_0_platform_data = {
255 .name = "MTU2_0", 255 .name = "MTU2_0",
256 .channel_offset = -0x80, 256 .channel_offset = -0x80,
257 .timer_bit = 0, 257 .timer_bit = 0,
@@ -282,7 +282,7 @@ static struct platform_device mtu2_0_device = {
282 .num_resources = ARRAY_SIZE(mtu2_0_resources), 282 .num_resources = ARRAY_SIZE(mtu2_0_resources),
283}; 283};
284 284
285static struct sh_mtu2_config mtu2_1_platform_data = { 285static struct sh_timer_config mtu2_1_platform_data = {
286 .name = "MTU2_1", 286 .name = "MTU2_1",
287 .channel_offset = -0x100, 287 .channel_offset = -0x100,
288 .timer_bit = 1, 288 .timer_bit = 1,
@@ -313,7 +313,7 @@ static struct platform_device mtu2_1_device = {
313 .num_resources = ARRAY_SIZE(mtu2_1_resources), 313 .num_resources = ARRAY_SIZE(mtu2_1_resources),
314}; 314};
315 315
316static struct sh_mtu2_config mtu2_2_platform_data = { 316static struct sh_timer_config mtu2_2_platform_data = {
317 .name = "MTU2_2", 317 .name = "MTU2_2",
318 .channel_offset = 0x80, 318 .channel_offset = 0x80,
319 .timer_bit = 2, 319 .timer_bit = 2,
diff --git a/arch/sh/kernel/cpu/sh2a/setup-sh7203.c b/arch/sh/kernel/cpu/sh2a/setup-sh7203.c
index 3448164b5734..d7493418ba60 100644
--- a/arch/sh/kernel/cpu/sh2a/setup-sh7203.c
+++ b/arch/sh/kernel/cpu/sh2a/setup-sh7203.c
@@ -11,8 +11,7 @@
11#include <linux/init.h> 11#include <linux/init.h>
12#include <linux/serial.h> 12#include <linux/serial.h>
13#include <linux/serial_sci.h> 13#include <linux/serial_sci.h>
14#include <linux/sh_cmt.h> 14#include <linux/sh_timer.h>
15#include <linux/sh_mtu2.h>
16#include <linux/io.h> 15#include <linux/io.h>
17 16
18enum { 17enum {
@@ -208,7 +207,7 @@ static struct platform_device sci_device = {
208 }, 207 },
209}; 208};
210 209
211static struct sh_cmt_config cmt0_platform_data = { 210static struct sh_timer_config cmt0_platform_data = {
212 .name = "CMT0", 211 .name = "CMT0",
213 .channel_offset = 0x02, 212 .channel_offset = 0x02,
214 .timer_bit = 0, 213 .timer_bit = 0,
@@ -240,7 +239,7 @@ static struct platform_device cmt0_device = {
240 .num_resources = ARRAY_SIZE(cmt0_resources), 239 .num_resources = ARRAY_SIZE(cmt0_resources),
241}; 240};
242 241
243static struct sh_cmt_config cmt1_platform_data = { 242static struct sh_timer_config cmt1_platform_data = {
244 .name = "CMT1", 243 .name = "CMT1",
245 .channel_offset = 0x08, 244 .channel_offset = 0x08,
246 .timer_bit = 1, 245 .timer_bit = 1,
@@ -272,7 +271,7 @@ static struct platform_device cmt1_device = {
272 .num_resources = ARRAY_SIZE(cmt1_resources), 271 .num_resources = ARRAY_SIZE(cmt1_resources),
273}; 272};
274 273
275static struct sh_mtu2_config mtu2_0_platform_data = { 274static struct sh_timer_config mtu2_0_platform_data = {
276 .name = "MTU2_0", 275 .name = "MTU2_0",
277 .channel_offset = -0x80, 276 .channel_offset = -0x80,
278 .timer_bit = 0, 277 .timer_bit = 0,
@@ -303,7 +302,7 @@ static struct platform_device mtu2_0_device = {
303 .num_resources = ARRAY_SIZE(mtu2_0_resources), 302 .num_resources = ARRAY_SIZE(mtu2_0_resources),
304}; 303};
305 304
306static struct sh_mtu2_config mtu2_1_platform_data = { 305static struct sh_timer_config mtu2_1_platform_data = {
307 .name = "MTU2_1", 306 .name = "MTU2_1",
308 .channel_offset = -0x100, 307 .channel_offset = -0x100,
309 .timer_bit = 1, 308 .timer_bit = 1,
diff --git a/arch/sh/kernel/cpu/sh2a/setup-sh7206.c b/arch/sh/kernel/cpu/sh2a/setup-sh7206.c
index e700559b6b89..2fc6bff5c5fb 100644
--- a/arch/sh/kernel/cpu/sh2a/setup-sh7206.c
+++ b/arch/sh/kernel/cpu/sh2a/setup-sh7206.c
@@ -12,8 +12,7 @@
12#include <linux/init.h> 12#include <linux/init.h>
13#include <linux/serial.h> 13#include <linux/serial.h>
14#include <linux/serial_sci.h> 14#include <linux/serial_sci.h>
15#include <linux/sh_cmt.h> 15#include <linux/sh_timer.h>
16#include <linux/sh_mtu2.h>
17#include <linux/io.h> 16#include <linux/io.h>
18 17
19enum { 18enum {
@@ -168,7 +167,7 @@ static struct platform_device sci_device = {
168 }, 167 },
169}; 168};
170 169
171static struct sh_cmt_config cmt0_platform_data = { 170static struct sh_timer_config cmt0_platform_data = {
172 .name = "CMT0", 171 .name = "CMT0",
173 .channel_offset = 0x02, 172 .channel_offset = 0x02,
174 .timer_bit = 0, 173 .timer_bit = 0,
@@ -200,7 +199,7 @@ static struct platform_device cmt0_device = {
200 .num_resources = ARRAY_SIZE(cmt0_resources), 199 .num_resources = ARRAY_SIZE(cmt0_resources),
201}; 200};
202 201
203static struct sh_cmt_config cmt1_platform_data = { 202static struct sh_timer_config cmt1_platform_data = {
204 .name = "CMT1", 203 .name = "CMT1",
205 .channel_offset = 0x08, 204 .channel_offset = 0x08,
206 .timer_bit = 1, 205 .timer_bit = 1,
@@ -232,7 +231,7 @@ static struct platform_device cmt1_device = {
232 .num_resources = ARRAY_SIZE(cmt1_resources), 231 .num_resources = ARRAY_SIZE(cmt1_resources),
233}; 232};
234 233
235static struct sh_mtu2_config mtu2_0_platform_data = { 234static struct sh_timer_config mtu2_0_platform_data = {
236 .name = "MTU2_0", 235 .name = "MTU2_0",
237 .channel_offset = -0x80, 236 .channel_offset = -0x80,
238 .timer_bit = 0, 237 .timer_bit = 0,
@@ -263,7 +262,7 @@ static struct platform_device mtu2_0_device = {
263 .num_resources = ARRAY_SIZE(mtu2_0_resources), 262 .num_resources = ARRAY_SIZE(mtu2_0_resources),
264}; 263};
265 264
266static struct sh_mtu2_config mtu2_1_platform_data = { 265static struct sh_timer_config mtu2_1_platform_data = {
267 .name = "MTU2_1", 266 .name = "MTU2_1",
268 .channel_offset = -0x100, 267 .channel_offset = -0x100,
269 .timer_bit = 1, 268 .timer_bit = 1,
@@ -294,7 +293,7 @@ static struct platform_device mtu2_1_device = {
294 .num_resources = ARRAY_SIZE(mtu2_1_resources), 293 .num_resources = ARRAY_SIZE(mtu2_1_resources),
295}; 294};
296 295
297static struct sh_mtu2_config mtu2_2_platform_data = { 296static struct sh_timer_config mtu2_2_platform_data = {
298 .name = "MTU2_2", 297 .name = "MTU2_2",
299 .channel_offset = 0x80, 298 .channel_offset = 0x80,
300 .timer_bit = 2, 299 .timer_bit = 2,
diff --git a/arch/sh/kernel/cpu/sh4a/setup-sh7343.c b/arch/sh/kernel/cpu/sh4a/setup-sh7343.c
index cb5b4db1ca25..f327b7eaf47c 100644
--- a/arch/sh/kernel/cpu/sh4a/setup-sh7343.c
+++ b/arch/sh/kernel/cpu/sh4a/setup-sh7343.c
@@ -12,7 +12,7 @@
12#include <linux/serial.h> 12#include <linux/serial.h>
13#include <linux/serial_sci.h> 13#include <linux/serial_sci.h>
14#include <linux/uio_driver.h> 14#include <linux/uio_driver.h>
15#include <linux/sh_cmt.h> 15#include <linux/sh_timer.h>
16#include <asm/clock.h> 16#include <asm/clock.h>
17 17
18static struct resource iic0_resources[] = { 18static struct resource iic0_resources[] = {
@@ -141,7 +141,7 @@ static struct platform_device jpu_device = {
141 .num_resources = ARRAY_SIZE(jpu_resources), 141 .num_resources = ARRAY_SIZE(jpu_resources),
142}; 142};
143 143
144static struct sh_cmt_config cmt_platform_data = { 144static struct sh_timer_config cmt_platform_data = {
145 .name = "CMT", 145 .name = "CMT",
146 .channel_offset = 0x60, 146 .channel_offset = 0x60,
147 .timer_bit = 5, 147 .timer_bit = 5,
diff --git a/arch/sh/kernel/cpu/sh4a/setup-sh7366.c b/arch/sh/kernel/cpu/sh4a/setup-sh7366.c
index 2a771f48e9e0..7361ea989b96 100644
--- a/arch/sh/kernel/cpu/sh4a/setup-sh7366.c
+++ b/arch/sh/kernel/cpu/sh4a/setup-sh7366.c
@@ -14,7 +14,7 @@
14#include <linux/serial.h> 14#include <linux/serial.h>
15#include <linux/serial_sci.h> 15#include <linux/serial_sci.h>
16#include <linux/uio_driver.h> 16#include <linux/uio_driver.h>
17#include <linux/sh_cmt.h> 17#include <linux/sh_timer.h>
18#include <asm/clock.h> 18#include <asm/clock.h>
19 19
20static struct resource iic_resources[] = { 20static struct resource iic_resources[] = {
@@ -148,7 +148,7 @@ static struct platform_device veu1_device = {
148 .num_resources = ARRAY_SIZE(veu1_resources), 148 .num_resources = ARRAY_SIZE(veu1_resources),
149}; 149};
150 150
151static struct sh_cmt_config cmt_platform_data = { 151static struct sh_timer_config cmt_platform_data = {
152 .name = "CMT", 152 .name = "CMT",
153 .channel_offset = 0x60, 153 .channel_offset = 0x60,
154 .timer_bit = 5, 154 .timer_bit = 5,
diff --git a/arch/sh/kernel/cpu/sh4a/setup-sh7722.c b/arch/sh/kernel/cpu/sh4a/setup-sh7722.c
index 512735c5cc86..624e8e5a605c 100644
--- a/arch/sh/kernel/cpu/sh4a/setup-sh7722.c
+++ b/arch/sh/kernel/cpu/sh4a/setup-sh7722.c
@@ -13,8 +13,7 @@
13#include <linux/serial_sci.h> 13#include <linux/serial_sci.h>
14#include <linux/mm.h> 14#include <linux/mm.h>
15#include <linux/uio_driver.h> 15#include <linux/uio_driver.h>
16#include <linux/sh_cmt.h> 16#include <linux/sh_timer.h>
17#include <linux/sh_tmu.h>
18#include <asm/clock.h> 17#include <asm/clock.h>
19#include <asm/mmzone.h> 18#include <asm/mmzone.h>
20 19
@@ -178,7 +177,7 @@ static struct platform_device jpu_device = {
178 .num_resources = ARRAY_SIZE(jpu_resources), 177 .num_resources = ARRAY_SIZE(jpu_resources),
179}; 178};
180 179
181static struct sh_cmt_config cmt_platform_data = { 180static struct sh_timer_config cmt_platform_data = {
182 .name = "CMT", 181 .name = "CMT",
183 .channel_offset = 0x60, 182 .channel_offset = 0x60,
184 .timer_bit = 5, 183 .timer_bit = 5,
@@ -210,7 +209,7 @@ static struct platform_device cmt_device = {
210 .num_resources = ARRAY_SIZE(cmt_resources), 209 .num_resources = ARRAY_SIZE(cmt_resources),
211}; 210};
212 211
213static struct sh_tmu_config tmu0_platform_data = { 212static struct sh_timer_config tmu0_platform_data = {
214 .name = "TMU0", 213 .name = "TMU0",
215 .channel_offset = 0x04, 214 .channel_offset = 0x04,
216 .timer_bit = 0, 215 .timer_bit = 0,
@@ -241,7 +240,7 @@ static struct platform_device tmu0_device = {
241 .num_resources = ARRAY_SIZE(tmu0_resources), 240 .num_resources = ARRAY_SIZE(tmu0_resources),
242}; 241};
243 242
244static struct sh_tmu_config tmu1_platform_data = { 243static struct sh_timer_config tmu1_platform_data = {
245 .name = "TMU1", 244 .name = "TMU1",
246 .channel_offset = 0x10, 245 .channel_offset = 0x10,
247 .timer_bit = 1, 246 .timer_bit = 1,
@@ -272,7 +271,7 @@ static struct platform_device tmu1_device = {
272 .num_resources = ARRAY_SIZE(tmu1_resources), 271 .num_resources = ARRAY_SIZE(tmu1_resources),
273}; 272};
274 273
275static struct sh_tmu_config tmu2_platform_data = { 274static struct sh_timer_config tmu2_platform_data = {
276 .name = "TMU2", 275 .name = "TMU2",
277 .channel_offset = 0x1c, 276 .channel_offset = 0x1c,
278 .timer_bit = 2, 277 .timer_bit = 2,
diff --git a/arch/sh/kernel/cpu/sh4a/setup-sh7723.c b/arch/sh/kernel/cpu/sh4a/setup-sh7723.c
index dbb44949ed19..fb9b5427a068 100644
--- a/arch/sh/kernel/cpu/sh4a/setup-sh7723.c
+++ b/arch/sh/kernel/cpu/sh4a/setup-sh7723.c
@@ -13,7 +13,7 @@
13#include <linux/mm.h> 13#include <linux/mm.h>
14#include <linux/serial_sci.h> 14#include <linux/serial_sci.h>
15#include <linux/uio_driver.h> 15#include <linux/uio_driver.h>
16#include <linux/sh_cmt.h> 16#include <linux/sh_timer.h>
17#include <asm/clock.h> 17#include <asm/clock.h>
18#include <asm/mmzone.h> 18#include <asm/mmzone.h>
19 19
@@ -101,7 +101,7 @@ static struct platform_device veu1_device = {
101 .num_resources = ARRAY_SIZE(veu1_resources), 101 .num_resources = ARRAY_SIZE(veu1_resources),
102}; 102};
103 103
104static struct sh_cmt_config cmt_platform_data = { 104static struct sh_timer_config cmt_platform_data = {
105 .name = "CMT", 105 .name = "CMT",
106 .channel_offset = 0x60, 106 .channel_offset = 0x60,
107 .timer_bit = 5, 107 .timer_bit = 5,
diff --git a/arch/sh/kernel/cpu/sh4a/setup-sh7724.c b/arch/sh/kernel/cpu/sh4a/setup-sh7724.c
index 8429396acb59..e074951b88b9 100644
--- a/arch/sh/kernel/cpu/sh4a/setup-sh7724.c
+++ b/arch/sh/kernel/cpu/sh4a/setup-sh7724.c
@@ -18,7 +18,7 @@
18#include <linux/mm.h> 18#include <linux/mm.h>
19#include <linux/serial_sci.h> 19#include <linux/serial_sci.h>
20#include <linux/uio_driver.h> 20#include <linux/uio_driver.h>
21#include <linux/sh_cmt.h> 21#include <linux/sh_timer.h>
22#include <linux/io.h> 22#include <linux/io.h>
23#include <asm/clock.h> 23#include <asm/clock.h>
24#include <asm/mmzone.h> 24#include <asm/mmzone.h>
@@ -230,7 +230,7 @@ static struct platform_device veu1_device = {
230 .num_resources = ARRAY_SIZE(veu1_resources), 230 .num_resources = ARRAY_SIZE(veu1_resources),
231}; 231};
232 232
233static struct sh_cmt_config cmt_platform_data = { 233static struct sh_timer_config cmt_platform_data = {
234 .name = "CMT", 234 .name = "CMT",
235 .channel_offset = 0x60, 235 .channel_offset = 0x60,
236 .timer_bit = 5, 236 .timer_bit = 5,
diff --git a/drivers/clocksource/sh_cmt.c b/drivers/clocksource/sh_cmt.c
index 4ff1508e5ab7..aeb8c9b27b5b 100644
--- a/drivers/clocksource/sh_cmt.c
+++ b/drivers/clocksource/sh_cmt.c
@@ -28,7 +28,7 @@
28#include <linux/err.h> 28#include <linux/err.h>
29#include <linux/clocksource.h> 29#include <linux/clocksource.h>
30#include <linux/clockchips.h> 30#include <linux/clockchips.h>
31#include <linux/sh_cmt.h> 31#include <linux/sh_timer.h>
32 32
33struct sh_cmt_priv { 33struct sh_cmt_priv {
34 void __iomem *mapbase; 34 void __iomem *mapbase;
@@ -59,7 +59,7 @@ static DEFINE_SPINLOCK(sh_cmt_lock);
59 59
60static inline unsigned long sh_cmt_read(struct sh_cmt_priv *p, int reg_nr) 60static inline unsigned long sh_cmt_read(struct sh_cmt_priv *p, int reg_nr)
61{ 61{
62 struct sh_cmt_config *cfg = p->pdev->dev.platform_data; 62 struct sh_timer_config *cfg = p->pdev->dev.platform_data;
63 void __iomem *base = p->mapbase; 63 void __iomem *base = p->mapbase;
64 unsigned long offs; 64 unsigned long offs;
65 65
@@ -83,7 +83,7 @@ static inline unsigned long sh_cmt_read(struct sh_cmt_priv *p, int reg_nr)
83static inline void sh_cmt_write(struct sh_cmt_priv *p, int reg_nr, 83static inline void sh_cmt_write(struct sh_cmt_priv *p, int reg_nr,
84 unsigned long value) 84 unsigned long value)
85{ 85{
86 struct sh_cmt_config *cfg = p->pdev->dev.platform_data; 86 struct sh_timer_config *cfg = p->pdev->dev.platform_data;
87 void __iomem *base = p->mapbase; 87 void __iomem *base = p->mapbase;
88 unsigned long offs; 88 unsigned long offs;
89 89
@@ -131,7 +131,7 @@ static unsigned long sh_cmt_get_counter(struct sh_cmt_priv *p,
131 131
132static void sh_cmt_start_stop_ch(struct sh_cmt_priv *p, int start) 132static void sh_cmt_start_stop_ch(struct sh_cmt_priv *p, int start)
133{ 133{
134 struct sh_cmt_config *cfg = p->pdev->dev.platform_data; 134 struct sh_timer_config *cfg = p->pdev->dev.platform_data;
135 unsigned long flags, value; 135 unsigned long flags, value;
136 136
137 /* start stop register shared by multiple timer channels */ 137 /* start stop register shared by multiple timer channels */
@@ -149,7 +149,7 @@ static void sh_cmt_start_stop_ch(struct sh_cmt_priv *p, int start)
149 149
150static int sh_cmt_enable(struct sh_cmt_priv *p, unsigned long *rate) 150static int sh_cmt_enable(struct sh_cmt_priv *p, unsigned long *rate)
151{ 151{
152 struct sh_cmt_config *cfg = p->pdev->dev.platform_data; 152 struct sh_timer_config *cfg = p->pdev->dev.platform_data;
153 int ret; 153 int ret;
154 154
155 /* enable clock */ 155 /* enable clock */
@@ -560,7 +560,7 @@ int sh_cmt_register(struct sh_cmt_priv *p, char *name,
560 560
561static int sh_cmt_setup(struct sh_cmt_priv *p, struct platform_device *pdev) 561static int sh_cmt_setup(struct sh_cmt_priv *p, struct platform_device *pdev)
562{ 562{
563 struct sh_cmt_config *cfg = pdev->dev.platform_data; 563 struct sh_timer_config *cfg = pdev->dev.platform_data;
564 struct resource *res; 564 struct resource *res;
565 int irq, ret; 565 int irq, ret;
566 ret = -ENXIO; 566 ret = -ENXIO;
@@ -638,7 +638,7 @@ static int sh_cmt_setup(struct sh_cmt_priv *p, struct platform_device *pdev)
638static int __devinit sh_cmt_probe(struct platform_device *pdev) 638static int __devinit sh_cmt_probe(struct platform_device *pdev)
639{ 639{
640 struct sh_cmt_priv *p = platform_get_drvdata(pdev); 640 struct sh_cmt_priv *p = platform_get_drvdata(pdev);
641 struct sh_cmt_config *cfg = pdev->dev.platform_data; 641 struct sh_timer_config *cfg = pdev->dev.platform_data;
642 int ret; 642 int ret;
643 643
644 if (p) { 644 if (p) {
diff --git a/drivers/clocksource/sh_mtu2.c b/drivers/clocksource/sh_mtu2.c
index 420566f4c501..ef02185a827a 100644
--- a/drivers/clocksource/sh_mtu2.c
+++ b/drivers/clocksource/sh_mtu2.c
@@ -28,7 +28,7 @@
28#include <linux/irq.h> 28#include <linux/irq.h>
29#include <linux/err.h> 29#include <linux/err.h>
30#include <linux/clockchips.h> 30#include <linux/clockchips.h>
31#include <linux/sh_mtu2.h> 31#include <linux/sh_timer.h>
32 32
33struct sh_mtu2_priv { 33struct sh_mtu2_priv {
34 void __iomem *mapbase; 34 void __iomem *mapbase;
@@ -63,7 +63,7 @@ static unsigned long mtu2_reg_offs[] = {
63 63
64static inline unsigned long sh_mtu2_read(struct sh_mtu2_priv *p, int reg_nr) 64static inline unsigned long sh_mtu2_read(struct sh_mtu2_priv *p, int reg_nr)
65{ 65{
66 struct sh_mtu2_config *cfg = p->pdev->dev.platform_data; 66 struct sh_timer_config *cfg = p->pdev->dev.platform_data;
67 void __iomem *base = p->mapbase; 67 void __iomem *base = p->mapbase;
68 unsigned long offs; 68 unsigned long offs;
69 69
@@ -81,7 +81,7 @@ static inline unsigned long sh_mtu2_read(struct sh_mtu2_priv *p, int reg_nr)
81static inline void sh_mtu2_write(struct sh_mtu2_priv *p, int reg_nr, 81static inline void sh_mtu2_write(struct sh_mtu2_priv *p, int reg_nr,
82 unsigned long value) 82 unsigned long value)
83{ 83{
84 struct sh_mtu2_config *cfg = p->pdev->dev.platform_data; 84 struct sh_timer_config *cfg = p->pdev->dev.platform_data;
85 void __iomem *base = p->mapbase; 85 void __iomem *base = p->mapbase;
86 unsigned long offs; 86 unsigned long offs;
87 87
@@ -100,7 +100,7 @@ static inline void sh_mtu2_write(struct sh_mtu2_priv *p, int reg_nr,
100 100
101static void sh_mtu2_start_stop_ch(struct sh_mtu2_priv *p, int start) 101static void sh_mtu2_start_stop_ch(struct sh_mtu2_priv *p, int start)
102{ 102{
103 struct sh_mtu2_config *cfg = p->pdev->dev.platform_data; 103 struct sh_timer_config *cfg = p->pdev->dev.platform_data;
104 unsigned long flags, value; 104 unsigned long flags, value;
105 105
106 /* start stop register shared by multiple timer channels */ 106 /* start stop register shared by multiple timer channels */
@@ -118,7 +118,7 @@ static void sh_mtu2_start_stop_ch(struct sh_mtu2_priv *p, int start)
118 118
119static int sh_mtu2_enable(struct sh_mtu2_priv *p) 119static int sh_mtu2_enable(struct sh_mtu2_priv *p)
120{ 120{
121 struct sh_mtu2_config *cfg = p->pdev->dev.platform_data; 121 struct sh_timer_config *cfg = p->pdev->dev.platform_data;
122 int ret; 122 int ret;
123 123
124 /* enable clock */ 124 /* enable clock */
@@ -243,7 +243,7 @@ int sh_mtu2_register(struct sh_mtu2_priv *p, char *name,
243 243
244static int sh_mtu2_setup(struct sh_mtu2_priv *p, struct platform_device *pdev) 244static int sh_mtu2_setup(struct sh_mtu2_priv *p, struct platform_device *pdev)
245{ 245{
246 struct sh_mtu2_config *cfg = pdev->dev.platform_data; 246 struct sh_timer_config *cfg = pdev->dev.platform_data;
247 struct resource *res; 247 struct resource *res;
248 int irq, ret; 248 int irq, ret;
249 ret = -ENXIO; 249 ret = -ENXIO;
@@ -303,7 +303,7 @@ static int sh_mtu2_setup(struct sh_mtu2_priv *p, struct platform_device *pdev)
303static int __devinit sh_mtu2_probe(struct platform_device *pdev) 303static int __devinit sh_mtu2_probe(struct platform_device *pdev)
304{ 304{
305 struct sh_mtu2_priv *p = platform_get_drvdata(pdev); 305 struct sh_mtu2_priv *p = platform_get_drvdata(pdev);
306 struct sh_mtu2_config *cfg = pdev->dev.platform_data; 306 struct sh_timer_config *cfg = pdev->dev.platform_data;
307 int ret; 307 int ret;
308 308
309 if (p) { 309 if (p) {
diff --git a/drivers/clocksource/sh_tmu.c b/drivers/clocksource/sh_tmu.c
index 21bd77aa6a34..d6ea4398bf62 100644
--- a/drivers/clocksource/sh_tmu.c
+++ b/drivers/clocksource/sh_tmu.c
@@ -29,7 +29,7 @@
29#include <linux/err.h> 29#include <linux/err.h>
30#include <linux/clocksource.h> 30#include <linux/clocksource.h>
31#include <linux/clockchips.h> 31#include <linux/clockchips.h>
32#include <linux/sh_tmu.h> 32#include <linux/sh_timer.h>
33 33
34struct sh_tmu_priv { 34struct sh_tmu_priv {
35 void __iomem *mapbase; 35 void __iomem *mapbase;
@@ -51,7 +51,7 @@ static DEFINE_SPINLOCK(sh_tmu_lock);
51 51
52static inline unsigned long sh_tmu_read(struct sh_tmu_priv *p, int reg_nr) 52static inline unsigned long sh_tmu_read(struct sh_tmu_priv *p, int reg_nr)
53{ 53{
54 struct sh_tmu_config *cfg = p->pdev->dev.platform_data; 54 struct sh_timer_config *cfg = p->pdev->dev.platform_data;
55 void __iomem *base = p->mapbase; 55 void __iomem *base = p->mapbase;
56 unsigned long offs; 56 unsigned long offs;
57 57
@@ -69,7 +69,7 @@ static inline unsigned long sh_tmu_read(struct sh_tmu_priv *p, int reg_nr)
69static inline void sh_tmu_write(struct sh_tmu_priv *p, int reg_nr, 69static inline void sh_tmu_write(struct sh_tmu_priv *p, int reg_nr,
70 unsigned long value) 70 unsigned long value)
71{ 71{
72 struct sh_tmu_config *cfg = p->pdev->dev.platform_data; 72 struct sh_timer_config *cfg = p->pdev->dev.platform_data;
73 void __iomem *base = p->mapbase; 73 void __iomem *base = p->mapbase;
74 unsigned long offs; 74 unsigned long offs;
75 75
@@ -88,7 +88,7 @@ static inline void sh_tmu_write(struct sh_tmu_priv *p, int reg_nr,
88 88
89static void sh_tmu_start_stop_ch(struct sh_tmu_priv *p, int start) 89static void sh_tmu_start_stop_ch(struct sh_tmu_priv *p, int start)
90{ 90{
91 struct sh_tmu_config *cfg = p->pdev->dev.platform_data; 91 struct sh_timer_config *cfg = p->pdev->dev.platform_data;
92 unsigned long flags, value; 92 unsigned long flags, value;
93 93
94 /* start stop register shared by multiple timer channels */ 94 /* start stop register shared by multiple timer channels */
@@ -106,7 +106,7 @@ static void sh_tmu_start_stop_ch(struct sh_tmu_priv *p, int start)
106 106
107static int sh_tmu_enable(struct sh_tmu_priv *p) 107static int sh_tmu_enable(struct sh_tmu_priv *p)
108{ 108{
109 struct sh_tmu_config *cfg = p->pdev->dev.platform_data; 109 struct sh_timer_config *cfg = p->pdev->dev.platform_data;
110 int ret; 110 int ret;
111 111
112 /* enable clock */ 112 /* enable clock */
@@ -345,7 +345,7 @@ static int sh_tmu_register(struct sh_tmu_priv *p, char *name,
345 345
346static int sh_tmu_setup(struct sh_tmu_priv *p, struct platform_device *pdev) 346static int sh_tmu_setup(struct sh_tmu_priv *p, struct platform_device *pdev)
347{ 347{
348 struct sh_tmu_config *cfg = pdev->dev.platform_data; 348 struct sh_timer_config *cfg = pdev->dev.platform_data;
349 struct resource *res; 349 struct resource *res;
350 int irq, ret; 350 int irq, ret;
351 ret = -ENXIO; 351 ret = -ENXIO;
@@ -407,7 +407,7 @@ static int sh_tmu_setup(struct sh_tmu_priv *p, struct platform_device *pdev)
407static int __devinit sh_tmu_probe(struct platform_device *pdev) 407static int __devinit sh_tmu_probe(struct platform_device *pdev)
408{ 408{
409 struct sh_tmu_priv *p = platform_get_drvdata(pdev); 409 struct sh_tmu_priv *p = platform_get_drvdata(pdev);
410 struct sh_tmu_config *cfg = pdev->dev.platform_data; 410 struct sh_timer_config *cfg = pdev->dev.platform_data;
411 int ret; 411 int ret;
412 412
413 if (p) { 413 if (p) {
diff --git a/include/linux/sh_cmt.h b/include/linux/sh_cmt.h
deleted file mode 100644
index 68cacde5954f..000000000000
--- a/include/linux/sh_cmt.h
+++ /dev/null
@@ -1,13 +0,0 @@
1#ifndef __SH_CMT_H__
2#define __SH_CMT_H__
3
4struct sh_cmt_config {
5 char *name;
6 unsigned long channel_offset;
7 int timer_bit;
8 char *clk;
9 unsigned long clockevent_rating;
10 unsigned long clocksource_rating;
11};
12
13#endif /* __SH_CMT_H__ */
diff --git a/include/linux/sh_mtu2.h b/include/linux/sh_mtu2.h
deleted file mode 100644
index a98876340ff4..000000000000
--- a/include/linux/sh_mtu2.h
+++ /dev/null
@@ -1,12 +0,0 @@
1#ifndef __SH_MTU2_H__
2#define __SH_MTU2_H__
3
4struct sh_mtu2_config {
5 char *name;
6 int channel_offset;
7 int timer_bit;
8 char *clk;
9 unsigned long clockevent_rating;
10};
11
12#endif /* __SH_MTU2_H__ */
diff --git a/include/linux/sh_timer.h b/include/linux/sh_timer.h
new file mode 100644
index 000000000000..864bd56bd3b0
--- /dev/null
+++ b/include/linux/sh_timer.h
@@ -0,0 +1,13 @@
1#ifndef __SH_TIMER_H__
2#define __SH_TIMER_H__
3
4struct sh_timer_config {
5 char *name;
6 long channel_offset;
7 int timer_bit;
8 char *clk;
9 unsigned long clockevent_rating;
10 unsigned long clocksource_rating;
11};
12
13#endif /* __SH_TIMER_H__ */
diff --git a/include/linux/sh_tmu.h b/include/linux/sh_tmu.h
deleted file mode 100644
index b1195e8a37d0..000000000000
--- a/include/linux/sh_tmu.h
+++ /dev/null
@@ -1,13 +0,0 @@
1#ifndef __SH_TMU_H__
2#define __SH_TMU_H__
3
4struct sh_tmu_config {
5 char *name;
6 unsigned long channel_offset;
7 int timer_bit;
8 char *clk;
9 unsigned long clockevent_rating;
10 unsigned long clocksource_rating;
11};
12
13#endif /* __SH_TMU_H__ */