aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sh/kernel/cpu/sh4a/setup-sh7780.c
diff options
context:
space:
mode:
authorMagnus Damm <damm@opensource.se>2009-12-14 07:30:31 -0500
committerPaul Mundt <lethal@linux-sh.org>2009-12-14 22:06:36 -0500
commita9571d7b045eb3b38d856c6dfda1798fb67ca44c (patch)
tree9954cbe71abc04e0eb5c8740b26c4738e60810fd /arch/sh/kernel/cpu/sh4a/setup-sh7780.c
parentbcac24d0535402d6e3414d3951609f12caaa1c7d (diff)
sh: sh4a scif pdata (sh7757/sh7763/sh7770/sh7780/sh7785/sh7786/x3)
This patch breaks out the sh4a scif serial port platform data from a shared platform device to one platform device per port. Also, add serial ports to the list of early platform devices. All sh4a except SuperH Mobile processors are modified by this patch. While at it, sh7757 gets early platform device support. Signed-off-by: Magnus Damm <damm@opensource.se> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'arch/sh/kernel/cpu/sh4a/setup-sh7780.c')
-rw-r--r--arch/sh/kernel/cpu/sh4a/setup-sh7780.c60
1 files changed, 34 insertions, 26 deletions
diff --git a/arch/sh/kernel/cpu/sh4a/setup-sh7780.c b/arch/sh/kernel/cpu/sh4a/setup-sh7780.c
index 12ff56f19c5c..c310558490d5 100644
--- a/arch/sh/kernel/cpu/sh4a/setup-sh7780.c
+++ b/arch/sh/kernel/cpu/sh4a/setup-sh7780.c
@@ -15,6 +15,36 @@
15#include <linux/sh_timer.h> 15#include <linux/sh_timer.h>
16#include <asm/dma-sh.h> 16#include <asm/dma-sh.h>
17 17
18static struct plat_sci_port scif0_platform_data = {
19 .mapbase = 0xffe00000,
20 .flags = UPF_BOOT_AUTOCONF,
21 .type = PORT_SCIF,
22 .irqs = { 40, 40, 40, 40 },
23};
24
25static struct platform_device scif0_device = {
26 .name = "sh-sci",
27 .id = 0,
28 .dev = {
29 .platform_data = &scif0_platform_data,
30 },
31};
32
33static struct plat_sci_port scif1_platform_data = {
34 .mapbase = 0xffe10000,
35 .flags = UPF_BOOT_AUTOCONF,
36 .type = PORT_SCIF,
37 .irqs = { 76, 76, 76, 76 },
38};
39
40static struct platform_device scif1_device = {
41 .name = "sh-sci",
42 .id = 1,
43 .dev = {
44 .platform_data = &scif1_platform_data,
45 },
46};
47
18static struct sh_timer_config tmu0_platform_data = { 48static struct sh_timer_config tmu0_platform_data = {
19 .name = "TMU0", 49 .name = "TMU0",
20 .channel_offset = 0x04, 50 .channel_offset = 0x04,
@@ -217,30 +247,6 @@ static struct platform_device rtc_device = {
217 .resource = rtc_resources, 247 .resource = rtc_resources,
218}; 248};
219 249
220static struct plat_sci_port sci_platform_data[] = {
221 {
222 .mapbase = 0xffe00000,
223 .flags = UPF_BOOT_AUTOCONF,
224 .type = PORT_SCIF,
225 .irqs = { 40, 40, 40, 40 },
226 }, {
227 .mapbase = 0xffe10000,
228 .flags = UPF_BOOT_AUTOCONF,
229 .type = PORT_SCIF,
230 .irqs = { 76, 76, 76, 76 },
231 }, {
232 .flags = 0,
233 }
234};
235
236static struct platform_device sci_device = {
237 .name = "sh-sci",
238 .id = -1,
239 .dev = {
240 .platform_data = sci_platform_data,
241 },
242};
243
244static struct sh_dmae_pdata dma_platform_data = { 250static struct sh_dmae_pdata dma_platform_data = {
245 .mode = (SHDMA_MIX_IRQ | SHDMA_DMAOR1), 251 .mode = (SHDMA_MIX_IRQ | SHDMA_DMAOR1),
246}; 252};
@@ -254,6 +260,8 @@ static struct platform_device dma_device = {
254}; 260};
255 261
256static struct platform_device *sh7780_devices[] __initdata = { 262static struct platform_device *sh7780_devices[] __initdata = {
263 &scif0_device,
264 &scif1_device,
257 &tmu0_device, 265 &tmu0_device,
258 &tmu1_device, 266 &tmu1_device,
259 &tmu2_device, 267 &tmu2_device,
@@ -261,7 +269,6 @@ static struct platform_device *sh7780_devices[] __initdata = {
261 &tmu4_device, 269 &tmu4_device,
262 &tmu5_device, 270 &tmu5_device,
263 &rtc_device, 271 &rtc_device,
264 &sci_device,
265 &dma_device, 272 &dma_device,
266}; 273};
267 274
@@ -271,8 +278,9 @@ static int __init sh7780_devices_setup(void)
271 ARRAY_SIZE(sh7780_devices)); 278 ARRAY_SIZE(sh7780_devices));
272} 279}
273arch_initcall(sh7780_devices_setup); 280arch_initcall(sh7780_devices_setup);
274
275static struct platform_device *sh7780_early_devices[] __initdata = { 281static struct platform_device *sh7780_early_devices[] __initdata = {
282 &scif0_device,
283 &scif1_device,
276 &tmu0_device, 284 &tmu0_device,
277 &tmu1_device, 285 &tmu1_device,
278 &tmu2_device, 286 &tmu2_device,