diff options
| author | Magnus Damm <damm@opensource.se> | 2009-12-14 07:29:48 -0500 |
|---|---|---|
| committer | Paul Mundt <lethal@linux-sh.org> | 2009-12-14 22:06:30 -0500 |
| commit | 632fd800f54f361cd9d36dd48587756dab670ccf (patch) | |
| tree | 2ea703d8c57462ecb939f6f8f83db3f12456e770 /arch/sh/kernel/cpu/sh2 | |
| parent | 7b6fd3bf82c4901f6ba0101ba71a5c507c24f9cf (diff) | |
sh: sh2 scif pdata (sh7616)
This patch breaks out the sh2 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.
Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'arch/sh/kernel/cpu/sh2')
| -rw-r--r-- | arch/sh/kernel/cpu/sh2/setup-sh7619.c | 71 |
1 files changed, 46 insertions, 25 deletions
diff --git a/arch/sh/kernel/cpu/sh2/setup-sh7619.c b/arch/sh/kernel/cpu/sh2/setup-sh7619.c index 8555c05e866..114c7cee718 100644 --- a/arch/sh/kernel/cpu/sh2/setup-sh7619.c +++ b/arch/sh/kernel/cpu/sh2/setup-sh7619.c | |||
| @@ -59,32 +59,48 @@ static struct intc_prio_reg prio_registers[] __initdata = { | |||
| 59 | static DECLARE_INTC_DESC(intc_desc, "sh7619", vectors, NULL, | 59 | static DECLARE_INTC_DESC(intc_desc, "sh7619", vectors, NULL, |
| 60 | NULL, prio_registers, NULL); | 60 | NULL, prio_registers, NULL); |
| 61 | 61 | ||
| 62 | static struct plat_sci_port sci_platform_data[] = { | 62 | static struct plat_sci_port scif0_platform_data = { |
| 63 | { | 63 | .mapbase = 0xf8400000, |
| 64 | .mapbase = 0xf8400000, | 64 | .flags = UPF_BOOT_AUTOCONF, |
| 65 | .flags = UPF_BOOT_AUTOCONF, | 65 | .type = PORT_SCIF, |
| 66 | .type = PORT_SCIF, | 66 | .irqs = { 88, 88, 88, 88 }, |
| 67 | .irqs = { 88, 88, 88, 88 }, | 67 | }; |
| 68 | }, { | 68 | |
| 69 | .mapbase = 0xf8410000, | 69 | static struct platform_device scif0_device = { |
| 70 | .flags = UPF_BOOT_AUTOCONF, | 70 | .name = "sh-sci", |
| 71 | .type = PORT_SCIF, | 71 | .id = 0, |
| 72 | .irqs = { 92, 92, 92, 92 }, | 72 | .dev = { |
| 73 | }, { | 73 | .platform_data = &scif0_platform_data, |
| 74 | .mapbase = 0xf8420000, | 74 | }, |
| 75 | .flags = UPF_BOOT_AUTOCONF, | 75 | }; |
| 76 | .type = PORT_SCIF, | 76 | |
| 77 | .irqs = { 96, 96, 96, 96 }, | 77 | static struct plat_sci_port scif1_platform_data = { |
| 78 | }, { | 78 | .mapbase = 0xf8410000, |
| 79 | .flags = 0, | 79 | .flags = UPF_BOOT_AUTOCONF, |
| 80 | } | 80 | .type = PORT_SCIF, |
| 81 | }; | 81 | .irqs = { 92, 92, 92, 92 }, |
| 82 | 82 | }; | |
| 83 | static struct platform_device sci_device = { | 83 | |
| 84 | static struct platform_device scif1_device = { | ||
| 85 | .name = "sh-sci", | ||
| 86 | .id = 1, | ||
| 87 | .dev = { | ||
| 88 | .platform_data = &scif1_platform_data, | ||
| 89 | }, | ||
| 90 | }; | ||
| 91 | |||
| 92 | static struct plat_sci_port scif2_platform_data = { | ||
| 93 | .mapbase = 0xf8420000, | ||
| 94 | .flags = UPF_BOOT_AUTOCONF, | ||
| 95 | .type = PORT_SCIF, | ||
| 96 | .irqs = { 96, 96, 96, 96 }, | ||
| 97 | }; | ||
| 98 | |||
| 99 | static struct platform_device scif2_device = { | ||
| 84 | .name = "sh-sci", | 100 | .name = "sh-sci", |
| 85 | .id = -1, | 101 | .id = 2, |
| 86 | .dev = { | 102 | .dev = { |
| 87 | .platform_data = sci_platform_data, | 103 | .platform_data = &scif2_platform_data, |
| 88 | }, | 104 | }, |
| 89 | }; | 105 | }; |
| 90 | 106 | ||
| @@ -176,7 +192,9 @@ static struct platform_device cmt1_device = { | |||
| 176 | }; | 192 | }; |
| 177 | 193 | ||
| 178 | static struct platform_device *sh7619_devices[] __initdata = { | 194 | static struct platform_device *sh7619_devices[] __initdata = { |
| 179 | &sci_device, | 195 | &scif0_device, |
| 196 | &scif1_device, | ||
| 197 | &scif2_device, | ||
| 180 | ð_device, | 198 | ð_device, |
| 181 | &cmt0_device, | 199 | &cmt0_device, |
| 182 | &cmt1_device, | 200 | &cmt1_device, |
| @@ -195,6 +213,9 @@ void __init plat_irq_setup(void) | |||
| 195 | } | 213 | } |
| 196 | 214 | ||
| 197 | static struct platform_device *sh7619_early_devices[] __initdata = { | 215 | static struct platform_device *sh7619_early_devices[] __initdata = { |
| 216 | &scif0_device, | ||
| 217 | &scif1_device, | ||
| 218 | &scif2_device, | ||
| 198 | &cmt0_device, | 219 | &cmt0_device, |
| 199 | &cmt1_device, | 220 | &cmt1_device, |
| 200 | }; | 221 | }; |
