aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sh/kernel/cpu/sh3/setup-sh7720.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/sh/kernel/cpu/sh3/setup-sh7720.c')
-rw-r--r--arch/sh/kernel/cpu/sh3/setup-sh7720.c150
1 files changed, 12 insertions, 138 deletions
diff --git a/arch/sh/kernel/cpu/sh3/setup-sh7720.c b/arch/sh/kernel/cpu/sh3/setup-sh7720.c
index 1d5729dc0724..a53d21925b94 100644
--- a/arch/sh/kernel/cpu/sh3/setup-sh7720.c
+++ b/arch/sh/kernel/cpu/sh3/setup-sh7720.c
@@ -152,141 +152,23 @@ static struct platform_device usbf_device = {
152 .resource = usbf_resources, 152 .resource = usbf_resources,
153}; 153};
154 154
155static struct sh_timer_config cmt0_platform_data = { 155static struct sh_timer_config cmt_platform_data = {
156 .channel_offset = 0x10, 156 .channels_mask = 0x1f,
157 .timer_bit = 0,
158 .clockevent_rating = 125,
159 .clocksource_rating = 125,
160}; 157};
161 158
162static struct resource cmt0_resources[] = { 159static struct resource cmt_resources[] = {
163 [0] = { 160 DEFINE_RES_MEM(0x044a0000, 0x60),
164 .start = 0x044a0010, 161 DEFINE_RES_IRQ(evt2irq(0xf00)),
165 .end = 0x044a001b,
166 .flags = IORESOURCE_MEM,
167 },
168 [1] = {
169 .start = evt2irq(0xf00),
170 .flags = IORESOURCE_IRQ,
171 },
172}; 162};
173 163
174static struct platform_device cmt0_device = { 164static struct platform_device cmt_device = {
175 .name = "sh_cmt", 165 .name = "sh-cmt-32",
176 .id = 0, 166 .id = 0,
177 .dev = { 167 .dev = {
178 .platform_data = &cmt0_platform_data, 168 .platform_data = &cmt_platform_data,
179 },
180 .resource = cmt0_resources,
181 .num_resources = ARRAY_SIZE(cmt0_resources),
182};
183
184static struct sh_timer_config cmt1_platform_data = {
185 .channel_offset = 0x20,
186 .timer_bit = 1,
187};
188
189static struct resource cmt1_resources[] = {
190 [0] = {
191 .start = 0x044a0020,
192 .end = 0x044a002b,
193 .flags = IORESOURCE_MEM,
194 },
195 [1] = {
196 .start = evt2irq(0xf00),
197 .flags = IORESOURCE_IRQ,
198 },
199};
200
201static struct platform_device cmt1_device = {
202 .name = "sh_cmt",
203 .id = 1,
204 .dev = {
205 .platform_data = &cmt1_platform_data,
206 },
207 .resource = cmt1_resources,
208 .num_resources = ARRAY_SIZE(cmt1_resources),
209};
210
211static struct sh_timer_config cmt2_platform_data = {
212 .channel_offset = 0x30,
213 .timer_bit = 2,
214};
215
216static struct resource cmt2_resources[] = {
217 [0] = {
218 .start = 0x044a0030,
219 .end = 0x044a003b,
220 .flags = IORESOURCE_MEM,
221 },
222 [1] = {
223 .start = evt2irq(0xf00),
224 .flags = IORESOURCE_IRQ,
225 },
226};
227
228static struct platform_device cmt2_device = {
229 .name = "sh_cmt",
230 .id = 2,
231 .dev = {
232 .platform_data = &cmt2_platform_data,
233 },
234 .resource = cmt2_resources,
235 .num_resources = ARRAY_SIZE(cmt2_resources),
236};
237
238static struct sh_timer_config cmt3_platform_data = {
239 .channel_offset = 0x40,
240 .timer_bit = 3,
241};
242
243static struct resource cmt3_resources[] = {
244 [0] = {
245 .start = 0x044a0040,
246 .end = 0x044a004b,
247 .flags = IORESOURCE_MEM,
248 },
249 [1] = {
250 .start = evt2irq(0xf00),
251 .flags = IORESOURCE_IRQ,
252 },
253};
254
255static struct platform_device cmt3_device = {
256 .name = "sh_cmt",
257 .id = 3,
258 .dev = {
259 .platform_data = &cmt3_platform_data,
260 },
261 .resource = cmt3_resources,
262 .num_resources = ARRAY_SIZE(cmt3_resources),
263};
264
265static struct sh_timer_config cmt4_platform_data = {
266 .channel_offset = 0x50,
267 .timer_bit = 4,
268};
269
270static struct resource cmt4_resources[] = {
271 [0] = {
272 .start = 0x044a0050,
273 .end = 0x044a005b,
274 .flags = IORESOURCE_MEM,
275 },
276 [1] = {
277 .start = evt2irq(0xf00),
278 .flags = IORESOURCE_IRQ,
279 },
280};
281
282static struct platform_device cmt4_device = {
283 .name = "sh_cmt",
284 .id = 4,
285 .dev = {
286 .platform_data = &cmt4_platform_data,
287 }, 169 },
288 .resource = cmt4_resources, 170 .resource = cmt_resources,
289 .num_resources = ARRAY_SIZE(cmt4_resources), 171 .num_resources = ARRAY_SIZE(cmt_resources),
290}; 172};
291 173
292static struct sh_timer_config tmu0_platform_data = { 174static struct sh_timer_config tmu0_platform_data = {
@@ -375,11 +257,7 @@ static struct platform_device tmu2_device = {
375static struct platform_device *sh7720_devices[] __initdata = { 257static struct platform_device *sh7720_devices[] __initdata = {
376 &scif0_device, 258 &scif0_device,
377 &scif1_device, 259 &scif1_device,
378 &cmt0_device, 260 &cmt_device,
379 &cmt1_device,
380 &cmt2_device,
381 &cmt3_device,
382 &cmt4_device,
383 &tmu0_device, 261 &tmu0_device,
384 &tmu1_device, 262 &tmu1_device,
385 &tmu2_device, 263 &tmu2_device,
@@ -398,11 +276,7 @@ arch_initcall(sh7720_devices_setup);
398static struct platform_device *sh7720_early_devices[] __initdata = { 276static struct platform_device *sh7720_early_devices[] __initdata = {
399 &scif0_device, 277 &scif0_device,
400 &scif1_device, 278 &scif1_device,
401 &cmt0_device, 279 &cmt_device,
402 &cmt1_device,
403 &cmt2_device,
404 &cmt3_device,
405 &cmt4_device,
406 &tmu0_device, 280 &tmu0_device,
407 &tmu1_device, 281 &tmu1_device,
408 &tmu2_device, 282 &tmu2_device,