diff options
author | Magnus Damm <damm@opensource.se> | 2009-12-14 07:29:56 -0500 |
---|---|---|
committer | Paul Mundt <lethal@linux-sh.org> | 2009-12-14 22:06:31 -0500 |
commit | be091d20efe7b045ca02bdf91c63c72d91f5899d (patch) | |
tree | 447f1c2578b64919d2d0ba5d67d79419b96df89d /arch/sh/kernel/cpu/sh2a/setup-sh7203.c | |
parent | 632fd800f54f361cd9d36dd48587756dab670ccf (diff) |
sh: sh2a scif pdata (sh7201/sh7203/sh7206/mxg)
This patch breaks out the sh2a 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/sh2a/setup-sh7203.c')
-rw-r--r-- | arch/sh/kernel/cpu/sh2a/setup-sh7203.c | 89 |
1 files changed, 61 insertions, 28 deletions
diff --git a/arch/sh/kernel/cpu/sh2a/setup-sh7203.c b/arch/sh/kernel/cpu/sh2a/setup-sh7203.c index d3fd536c9a84..3136966cc9b3 100644 --- a/arch/sh/kernel/cpu/sh2a/setup-sh7203.c +++ b/arch/sh/kernel/cpu/sh2a/setup-sh7203.c | |||
@@ -173,37 +173,63 @@ static struct intc_mask_reg mask_registers[] __initdata = { | |||
173 | static DECLARE_INTC_DESC(intc_desc, "sh7203", vectors, groups, | 173 | static DECLARE_INTC_DESC(intc_desc, "sh7203", vectors, groups, |
174 | mask_registers, prio_registers, NULL); | 174 | mask_registers, prio_registers, NULL); |
175 | 175 | ||
176 | static struct plat_sci_port sci_platform_data[] = { | 176 | static struct plat_sci_port scif0_platform_data = { |
177 | { | 177 | .mapbase = 0xfffe8000, |
178 | .mapbase = 0xfffe8000, | 178 | .flags = UPF_BOOT_AUTOCONF, |
179 | .flags = UPF_BOOT_AUTOCONF, | 179 | .type = PORT_SCIF, |
180 | .type = PORT_SCIF, | 180 | .irqs = { 192, 192, 192, 192 }, |
181 | .irqs = { 192, 192, 192, 192 }, | ||
182 | }, { | ||
183 | .mapbase = 0xfffe8800, | ||
184 | .flags = UPF_BOOT_AUTOCONF, | ||
185 | .type = PORT_SCIF, | ||
186 | .irqs = { 196, 196, 196, 196 }, | ||
187 | }, { | ||
188 | .mapbase = 0xfffe9000, | ||
189 | .flags = UPF_BOOT_AUTOCONF, | ||
190 | .type = PORT_SCIF, | ||
191 | .irqs = { 200, 200, 200, 200 }, | ||
192 | }, { | ||
193 | .mapbase = 0xfffe9800, | ||
194 | .flags = UPF_BOOT_AUTOCONF, | ||
195 | .type = PORT_SCIF, | ||
196 | .irqs = { 204, 204, 204, 204 }, | ||
197 | }, { | ||
198 | .flags = 0, | ||
199 | } | ||
200 | }; | 181 | }; |
201 | 182 | ||
202 | static struct platform_device sci_device = { | 183 | static struct platform_device scif0_device = { |
203 | .name = "sh-sci", | 184 | .name = "sh-sci", |
204 | .id = -1, | 185 | .id = 0, |
186 | .dev = { | ||
187 | .platform_data = &scif0_platform_data, | ||
188 | }, | ||
189 | }; | ||
190 | |||
191 | static struct plat_sci_port scif1_platform_data = { | ||
192 | .mapbase = 0xfffe8800, | ||
193 | .flags = UPF_BOOT_AUTOCONF, | ||
194 | .type = PORT_SCIF, | ||
195 | .irqs = { 196, 196, 196, 196 }, | ||
196 | }; | ||
197 | |||
198 | static struct platform_device scif1_device = { | ||
199 | .name = "sh-sci", | ||
200 | .id = 1, | ||
201 | .dev = { | ||
202 | .platform_data = &scif1_platform_data, | ||
203 | }, | ||
204 | }; | ||
205 | |||
206 | static struct plat_sci_port scif2_platform_data = { | ||
207 | .mapbase = 0xfffe9000, | ||
208 | .flags = UPF_BOOT_AUTOCONF, | ||
209 | .type = PORT_SCIF, | ||
210 | .irqs = { 200, 200, 200, 200 }, | ||
211 | }; | ||
212 | |||
213 | static struct platform_device scif2_device = { | ||
214 | .name = "sh-sci", | ||
215 | .id = 2, | ||
216 | .dev = { | ||
217 | .platform_data = &scif2_platform_data, | ||
218 | }, | ||
219 | }; | ||
220 | |||
221 | static struct plat_sci_port scif3_platform_data = { | ||
222 | .mapbase = 0xfffe9800, | ||
223 | .flags = UPF_BOOT_AUTOCONF, | ||
224 | .type = PORT_SCIF, | ||
225 | .irqs = { 204, 204, 204, 204 }, | ||
226 | }; | ||
227 | |||
228 | static struct platform_device scif3_device = { | ||
229 | .name = "sh-sci", | ||
230 | .id = 3, | ||
205 | .dev = { | 231 | .dev = { |
206 | .platform_data = sci_platform_data, | 232 | .platform_data = &scif3_platform_data, |
207 | }, | 233 | }, |
208 | }; | 234 | }; |
209 | 235 | ||
@@ -354,7 +380,10 @@ static struct platform_device rtc_device = { | |||
354 | }; | 380 | }; |
355 | 381 | ||
356 | static struct platform_device *sh7203_devices[] __initdata = { | 382 | static struct platform_device *sh7203_devices[] __initdata = { |
357 | &sci_device, | 383 | &scif0_device, |
384 | &scif1_device, | ||
385 | &scif2_device, | ||
386 | &scif3_device, | ||
358 | &cmt0_device, | 387 | &cmt0_device, |
359 | &cmt1_device, | 388 | &cmt1_device, |
360 | &mtu2_0_device, | 389 | &mtu2_0_device, |
@@ -375,6 +404,10 @@ void __init plat_irq_setup(void) | |||
375 | } | 404 | } |
376 | 405 | ||
377 | static struct platform_device *sh7203_early_devices[] __initdata = { | 406 | static struct platform_device *sh7203_early_devices[] __initdata = { |
407 | &scif0_device, | ||
408 | &scif1_device, | ||
409 | &scif2_device, | ||
410 | &scif3_device, | ||
378 | &cmt0_device, | 411 | &cmt0_device, |
379 | &cmt1_device, | 412 | &cmt1_device, |
380 | &mtu2_0_device, | 413 | &mtu2_0_device, |