diff options
author | Magnus Damm <damm@opensource.se> | 2009-12-14 07:30:22 -0500 |
---|---|---|
committer | Paul Mundt <lethal@linux-sh.org> | 2009-12-14 22:06:35 -0500 |
commit | bcac24d0535402d6e3414d3951609f12caaa1c7d (patch) | |
tree | 95435b0a1da4737be21863d97587915717762554 /arch/sh/kernel/cpu/sh4a/setup-sh7724.c | |
parent | cd5f107628ab89c5dec5ad923f1c27f4cba41972 (diff) |
sh: sh4a scif pdata (sh7343/sh7366/sh7722/sh7723/sh7724)
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.
Only sh4a SuperH Mobile processors are modified by this
patch.
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-sh7724.c')
-rw-r--r-- | arch/sh/kernel/cpu/sh4a/setup-sh7724.c | 149 |
1 files changed, 103 insertions, 46 deletions
diff --git a/arch/sh/kernel/cpu/sh4a/setup-sh7724.c b/arch/sh/kernel/cpu/sh4a/setup-sh7724.c index 845e89c936e7..a52f35117e82 100644 --- a/arch/sh/kernel/cpu/sh4a/setup-sh7724.c +++ b/arch/sh/kernel/cpu/sh4a/setup-sh7724.c | |||
@@ -27,53 +27,99 @@ | |||
27 | #include <cpu/sh7724.h> | 27 | #include <cpu/sh7724.h> |
28 | 28 | ||
29 | /* Serial */ | 29 | /* Serial */ |
30 | static struct plat_sci_port sci_platform_data[] = { | 30 | static struct plat_sci_port scif0_platform_data = { |
31 | { | 31 | .mapbase = 0xffe00000, |
32 | .mapbase = 0xffe00000, | 32 | .flags = UPF_BOOT_AUTOCONF, |
33 | .flags = UPF_BOOT_AUTOCONF, | 33 | .type = PORT_SCIF, |
34 | .type = PORT_SCIF, | 34 | .irqs = { 80, 80, 80, 80 }, |
35 | .irqs = { 80, 80, 80, 80 }, | 35 | .clk = "scif0", |
36 | .clk = "scif0", | 36 | }; |
37 | }, { | 37 | |
38 | .mapbase = 0xffe10000, | 38 | static struct platform_device scif0_device = { |
39 | .flags = UPF_BOOT_AUTOCONF, | ||
40 | .type = PORT_SCIF, | ||
41 | .irqs = { 81, 81, 81, 81 }, | ||
42 | .clk = "scif1", | ||
43 | }, { | ||
44 | .mapbase = 0xffe20000, | ||
45 | .flags = UPF_BOOT_AUTOCONF, | ||
46 | .type = PORT_SCIF, | ||
47 | .irqs = { 82, 82, 82, 82 }, | ||
48 | .clk = "scif2", | ||
49 | }, { | ||
50 | .mapbase = 0xa4e30000, | ||
51 | .flags = UPF_BOOT_AUTOCONF, | ||
52 | .type = PORT_SCIFA, | ||
53 | .irqs = { 56, 56, 56, 56 }, | ||
54 | .clk = "scif3", | ||
55 | }, { | ||
56 | .mapbase = 0xa4e40000, | ||
57 | .flags = UPF_BOOT_AUTOCONF, | ||
58 | .type = PORT_SCIFA, | ||
59 | .irqs = { 88, 88, 88, 88 }, | ||
60 | .clk = "scif4", | ||
61 | }, { | ||
62 | .mapbase = 0xa4e50000, | ||
63 | .flags = UPF_BOOT_AUTOCONF, | ||
64 | .type = PORT_SCIFA, | ||
65 | .irqs = { 109, 109, 109, 109 }, | ||
66 | .clk = "scif5", | ||
67 | }, { | ||
68 | .flags = 0, | ||
69 | } | ||
70 | }; | ||
71 | |||
72 | static struct platform_device sci_device = { | ||
73 | .name = "sh-sci", | 39 | .name = "sh-sci", |
74 | .id = -1, | 40 | .id = 0, |
41 | .dev = { | ||
42 | .platform_data = &scif0_platform_data, | ||
43 | }, | ||
44 | }; | ||
45 | |||
46 | static struct plat_sci_port scif1_platform_data = { | ||
47 | .mapbase = 0xffe10000, | ||
48 | .flags = UPF_BOOT_AUTOCONF, | ||
49 | .type = PORT_SCIF, | ||
50 | .irqs = { 81, 81, 81, 81 }, | ||
51 | .clk = "scif1", | ||
52 | }; | ||
53 | |||
54 | static struct platform_device scif1_device = { | ||
55 | .name = "sh-sci", | ||
56 | .id = 1, | ||
57 | .dev = { | ||
58 | .platform_data = &scif1_platform_data, | ||
59 | }, | ||
60 | }; | ||
61 | |||
62 | static struct plat_sci_port scif2_platform_data = { | ||
63 | .mapbase = 0xffe20000, | ||
64 | .flags = UPF_BOOT_AUTOCONF, | ||
65 | .type = PORT_SCIF, | ||
66 | .irqs = { 82, 82, 82, 82 }, | ||
67 | .clk = "scif2", | ||
68 | }; | ||
69 | |||
70 | static struct platform_device scif2_device = { | ||
71 | .name = "sh-sci", | ||
72 | .id = 2, | ||
73 | .dev = { | ||
74 | .platform_data = &scif2_platform_data, | ||
75 | }, | ||
76 | }; | ||
77 | |||
78 | static struct plat_sci_port scif3_platform_data = { | ||
79 | .mapbase = 0xa4e30000, | ||
80 | .flags = UPF_BOOT_AUTOCONF, | ||
81 | .type = PORT_SCIFA, | ||
82 | .irqs = { 56, 56, 56, 56 }, | ||
83 | .clk = "scif3", | ||
84 | }; | ||
85 | |||
86 | static struct platform_device scif3_device = { | ||
87 | .name = "sh-sci", | ||
88 | .id = 3, | ||
89 | .dev = { | ||
90 | .platform_data = &scif3_platform_data, | ||
91 | }, | ||
92 | }; | ||
93 | |||
94 | static struct plat_sci_port scif4_platform_data = { | ||
95 | .mapbase = 0xa4e40000, | ||
96 | .flags = UPF_BOOT_AUTOCONF, | ||
97 | .type = PORT_SCIFA, | ||
98 | .irqs = { 88, 88, 88, 88 }, | ||
99 | .clk = "scif4", | ||
100 | }; | ||
101 | |||
102 | static struct platform_device scif4_device = { | ||
103 | .name = "sh-sci", | ||
104 | .id = 4, | ||
105 | .dev = { | ||
106 | .platform_data = &scif4_platform_data, | ||
107 | }, | ||
108 | }; | ||
109 | |||
110 | static struct plat_sci_port scif5_platform_data = { | ||
111 | .mapbase = 0xa4e50000, | ||
112 | .flags = UPF_BOOT_AUTOCONF, | ||
113 | .type = PORT_SCIFA, | ||
114 | .irqs = { 109, 109, 109, 109 }, | ||
115 | .clk = "scif5", | ||
116 | }; | ||
117 | |||
118 | static struct platform_device scif5_device = { | ||
119 | .name = "sh-sci", | ||
120 | .id = 5, | ||
75 | .dev = { | 121 | .dev = { |
76 | .platform_data = sci_platform_data, | 122 | .platform_data = &scif5_platform_data, |
77 | }, | 123 | }, |
78 | }; | 124 | }; |
79 | 125 | ||
@@ -590,6 +636,12 @@ static struct platform_device spu1_device = { | |||
590 | }; | 636 | }; |
591 | 637 | ||
592 | static struct platform_device *sh7724_devices[] __initdata = { | 638 | static struct platform_device *sh7724_devices[] __initdata = { |
639 | &scif0_device, | ||
640 | &scif1_device, | ||
641 | &scif2_device, | ||
642 | &scif3_device, | ||
643 | &scif4_device, | ||
644 | &scif5_device, | ||
593 | &cmt_device, | 645 | &cmt_device, |
594 | &tmu0_device, | 646 | &tmu0_device, |
595 | &tmu1_device, | 647 | &tmu1_device, |
@@ -597,7 +649,6 @@ static struct platform_device *sh7724_devices[] __initdata = { | |||
597 | &tmu3_device, | 649 | &tmu3_device, |
598 | &tmu4_device, | 650 | &tmu4_device, |
599 | &tmu5_device, | 651 | &tmu5_device, |
600 | &sci_device, | ||
601 | &rtc_device, | 652 | &rtc_device, |
602 | &iic0_device, | 653 | &iic0_device, |
603 | &iic1_device, | 654 | &iic1_device, |
@@ -624,6 +675,12 @@ static int __init sh7724_devices_setup(void) | |||
624 | arch_initcall(sh7724_devices_setup); | 675 | arch_initcall(sh7724_devices_setup); |
625 | 676 | ||
626 | static struct platform_device *sh7724_early_devices[] __initdata = { | 677 | static struct platform_device *sh7724_early_devices[] __initdata = { |
678 | &scif0_device, | ||
679 | &scif1_device, | ||
680 | &scif2_device, | ||
681 | &scif3_device, | ||
682 | &scif4_device, | ||
683 | &scif5_device, | ||
627 | &cmt_device, | 684 | &cmt_device, |
628 | &tmu0_device, | 685 | &tmu0_device, |
629 | &tmu1_device, | 686 | &tmu1_device, |