diff options
Diffstat (limited to 'arch/sh/kernel/cpu/sh4a/setup-sh7757.c')
-rw-r--r-- | arch/sh/kernel/cpu/sh4a/setup-sh7757.c | 92 |
1 files changed, 62 insertions, 30 deletions
diff --git a/arch/sh/kernel/cpu/sh4a/setup-sh7757.c b/arch/sh/kernel/cpu/sh4a/setup-sh7757.c index c470e15f2e03..37e32efbbaa7 100644 --- a/arch/sh/kernel/cpu/sh4a/setup-sh7757.c +++ b/arch/sh/kernel/cpu/sh4a/setup-sh7757.c | |||
@@ -17,6 +17,51 @@ | |||
17 | #include <linux/mm.h> | 17 | #include <linux/mm.h> |
18 | #include <linux/sh_timer.h> | 18 | #include <linux/sh_timer.h> |
19 | 19 | ||
20 | static struct plat_sci_port scif2_platform_data = { | ||
21 | .mapbase = 0xfe4b0000, /* SCIF2 */ | ||
22 | .flags = UPF_BOOT_AUTOCONF, | ||
23 | .type = PORT_SCIF, | ||
24 | .irqs = { 40, 40, 40, 40 }, | ||
25 | }; | ||
26 | |||
27 | static struct platform_device scif2_device = { | ||
28 | .name = "sh-sci", | ||
29 | .id = 2, | ||
30 | .dev = { | ||
31 | .platform_data = &scif2_platform_data, | ||
32 | }, | ||
33 | }; | ||
34 | |||
35 | static struct plat_sci_port scif3_platform_data = { | ||
36 | .mapbase = 0xfe4c0000, /* SCIF3 */ | ||
37 | .flags = UPF_BOOT_AUTOCONF, | ||
38 | .type = PORT_SCIF, | ||
39 | .irqs = { 76, 76, 76, 76 }, | ||
40 | }; | ||
41 | |||
42 | static struct platform_device scif3_device = { | ||
43 | .name = "sh-sci", | ||
44 | .id = 3, | ||
45 | .dev = { | ||
46 | .platform_data = &scif3_platform_data, | ||
47 | }, | ||
48 | }; | ||
49 | |||
50 | static struct plat_sci_port scif4_platform_data = { | ||
51 | .mapbase = 0xfe4d0000, /* SCIF4 */ | ||
52 | .flags = UPF_BOOT_AUTOCONF, | ||
53 | .type = PORT_SCIF, | ||
54 | .irqs = { 104, 104, 104, 104 }, | ||
55 | }; | ||
56 | |||
57 | static struct platform_device scif4_device = { | ||
58 | .name = "sh-sci", | ||
59 | .id = 4, | ||
60 | .dev = { | ||
61 | .platform_data = &scif4_platform_data, | ||
62 | }, | ||
63 | }; | ||
64 | |||
20 | static struct sh_timer_config tmu0_platform_data = { | 65 | static struct sh_timer_config tmu0_platform_data = { |
21 | .name = "TMU0", | 66 | .name = "TMU0", |
22 | .channel_offset = 0x04, | 67 | .channel_offset = 0x04, |
@@ -79,39 +124,12 @@ static struct platform_device tmu1_device = { | |||
79 | .num_resources = ARRAY_SIZE(tmu1_resources), | 124 | .num_resources = ARRAY_SIZE(tmu1_resources), |
80 | }; | 125 | }; |
81 | 126 | ||
82 | static struct plat_sci_port sci_platform_data[] = { | ||
83 | { | ||
84 | .mapbase = 0xfe4b0000, /* SCIF2 */ | ||
85 | .flags = UPF_BOOT_AUTOCONF, | ||
86 | .type = PORT_SCIF, | ||
87 | .irqs = { 40, 40, 40, 40 }, | ||
88 | }, { | ||
89 | .mapbase = 0xfe4c0000, /* SCIF3 */ | ||
90 | .flags = UPF_BOOT_AUTOCONF, | ||
91 | .type = PORT_SCIF, | ||
92 | .irqs = { 76, 76, 76, 76 }, | ||
93 | }, { | ||
94 | .mapbase = 0xfe4d0000, /* SCIF4 */ | ||
95 | .flags = UPF_BOOT_AUTOCONF, | ||
96 | .type = PORT_SCIF, | ||
97 | .irqs = { 104, 104, 104, 104 }, | ||
98 | }, { | ||
99 | .flags = 0, | ||
100 | } | ||
101 | }; | ||
102 | |||
103 | static struct platform_device sci_device = { | ||
104 | .name = "sh-sci", | ||
105 | .id = -1, | ||
106 | .dev = { | ||
107 | .platform_data = sci_platform_data, | ||
108 | }, | ||
109 | }; | ||
110 | |||
111 | static struct platform_device *sh7757_devices[] __initdata = { | 127 | static struct platform_device *sh7757_devices[] __initdata = { |
128 | &scif2_device, | ||
129 | &scif3_device, | ||
130 | &scif4_device, | ||
112 | &tmu0_device, | 131 | &tmu0_device, |
113 | &tmu1_device, | 132 | &tmu1_device, |
114 | &sci_device, | ||
115 | }; | 133 | }; |
116 | 134 | ||
117 | static int __init sh7757_devices_setup(void) | 135 | static int __init sh7757_devices_setup(void) |
@@ -121,6 +139,20 @@ static int __init sh7757_devices_setup(void) | |||
121 | } | 139 | } |
122 | arch_initcall(sh7757_devices_setup); | 140 | arch_initcall(sh7757_devices_setup); |
123 | 141 | ||
142 | static struct platform_device *sh7757_early_devices[] __initdata = { | ||
143 | &scif2_device, | ||
144 | &scif3_device, | ||
145 | &scif4_device, | ||
146 | &tmu0_device, | ||
147 | &tmu1_device, | ||
148 | }; | ||
149 | |||
150 | void __init plat_early_device_setup(void) | ||
151 | { | ||
152 | early_platform_add_devices(sh7757_early_devices, | ||
153 | ARRAY_SIZE(sh7757_early_devices)); | ||
154 | } | ||
155 | |||
124 | enum { | 156 | enum { |
125 | UNUSED = 0, | 157 | UNUSED = 0, |
126 | 158 | ||