diff options
Diffstat (limited to 'arch/sh/kernel/cpu/sh4a/setup-shx3.c')
-rw-r--r-- | arch/sh/kernel/cpu/sh4a/setup-shx3.c | 150 |
1 files changed, 12 insertions, 138 deletions
diff --git a/arch/sh/kernel/cpu/sh4a/setup-shx3.c b/arch/sh/kernel/cpu/sh4a/setup-shx3.c index 0856bcbb1da0..a78c5feb4e3b 100644 --- a/arch/sh/kernel/cpu/sh4a/setup-shx3.c +++ b/arch/sh/kernel/cpu/sh4a/setup-shx3.c | |||
@@ -100,25 +100,18 @@ static struct platform_device scif2_device = { | |||
100 | }; | 100 | }; |
101 | 101 | ||
102 | static struct sh_timer_config tmu0_platform_data = { | 102 | static struct sh_timer_config tmu0_platform_data = { |
103 | .channel_offset = 0x04, | 103 | .channels_mask = 7, |
104 | .timer_bit = 0, | ||
105 | .clockevent_rating = 200, | ||
106 | }; | 104 | }; |
107 | 105 | ||
108 | static struct resource tmu0_resources[] = { | 106 | static struct resource tmu0_resources[] = { |
109 | [0] = { | 107 | DEFINE_RES_MEM(0xffc10000, 0x30), |
110 | .start = 0xffc10008, | 108 | DEFINE_RES_IRQ(evt2irq(0x400)), |
111 | .end = 0xffc10013, | 109 | DEFINE_RES_IRQ(evt2irq(0x420)), |
112 | .flags = IORESOURCE_MEM, | 110 | DEFINE_RES_IRQ(evt2irq(0x440)), |
113 | }, | ||
114 | [1] = { | ||
115 | .start = evt2irq(0x400), | ||
116 | .flags = IORESOURCE_IRQ, | ||
117 | }, | ||
118 | }; | 111 | }; |
119 | 112 | ||
120 | static struct platform_device tmu0_device = { | 113 | static struct platform_device tmu0_device = { |
121 | .name = "sh_tmu", | 114 | .name = "sh-tmu", |
122 | .id = 0, | 115 | .id = 0, |
123 | .dev = { | 116 | .dev = { |
124 | .platform_data = &tmu0_platform_data, | 117 | .platform_data = &tmu0_platform_data, |
@@ -128,25 +121,18 @@ static struct platform_device tmu0_device = { | |||
128 | }; | 121 | }; |
129 | 122 | ||
130 | static struct sh_timer_config tmu1_platform_data = { | 123 | static struct sh_timer_config tmu1_platform_data = { |
131 | .channel_offset = 0x10, | 124 | .channels_mask = 7, |
132 | .timer_bit = 1, | ||
133 | .clocksource_rating = 200, | ||
134 | }; | 125 | }; |
135 | 126 | ||
136 | static struct resource tmu1_resources[] = { | 127 | static struct resource tmu1_resources[] = { |
137 | [0] = { | 128 | DEFINE_RES_MEM(0xffc20000, 0x2c), |
138 | .start = 0xffc10014, | 129 | DEFINE_RES_IRQ(evt2irq(0x460)), |
139 | .end = 0xffc1001f, | 130 | DEFINE_RES_IRQ(evt2irq(0x480)), |
140 | .flags = IORESOURCE_MEM, | 131 | DEFINE_RES_IRQ(evt2irq(0x4a0)), |
141 | }, | ||
142 | [1] = { | ||
143 | .start = evt2irq(0x420), | ||
144 | .flags = IORESOURCE_IRQ, | ||
145 | }, | ||
146 | }; | 132 | }; |
147 | 133 | ||
148 | static struct platform_device tmu1_device = { | 134 | static struct platform_device tmu1_device = { |
149 | .name = "sh_tmu", | 135 | .name = "sh-tmu", |
150 | .id = 1, | 136 | .id = 1, |
151 | .dev = { | 137 | .dev = { |
152 | .platform_data = &tmu1_platform_data, | 138 | .platform_data = &tmu1_platform_data, |
@@ -155,124 +141,12 @@ static struct platform_device tmu1_device = { | |||
155 | .num_resources = ARRAY_SIZE(tmu1_resources), | 141 | .num_resources = ARRAY_SIZE(tmu1_resources), |
156 | }; | 142 | }; |
157 | 143 | ||
158 | static struct sh_timer_config tmu2_platform_data = { | ||
159 | .channel_offset = 0x1c, | ||
160 | .timer_bit = 2, | ||
161 | }; | ||
162 | |||
163 | static struct resource tmu2_resources[] = { | ||
164 | [0] = { | ||
165 | .start = 0xffc10020, | ||
166 | .end = 0xffc1002f, | ||
167 | .flags = IORESOURCE_MEM, | ||
168 | }, | ||
169 | [1] = { | ||
170 | .start = evt2irq(0x440), | ||
171 | .flags = IORESOURCE_IRQ, | ||
172 | }, | ||
173 | }; | ||
174 | |||
175 | static struct platform_device tmu2_device = { | ||
176 | .name = "sh_tmu", | ||
177 | .id = 2, | ||
178 | .dev = { | ||
179 | .platform_data = &tmu2_platform_data, | ||
180 | }, | ||
181 | .resource = tmu2_resources, | ||
182 | .num_resources = ARRAY_SIZE(tmu2_resources), | ||
183 | }; | ||
184 | |||
185 | static struct sh_timer_config tmu3_platform_data = { | ||
186 | .channel_offset = 0x04, | ||
187 | .timer_bit = 0, | ||
188 | }; | ||
189 | |||
190 | static struct resource tmu3_resources[] = { | ||
191 | [0] = { | ||
192 | .start = 0xffc20008, | ||
193 | .end = 0xffc20013, | ||
194 | .flags = IORESOURCE_MEM, | ||
195 | }, | ||
196 | [1] = { | ||
197 | .start = evt2irq(0x460), | ||
198 | .flags = IORESOURCE_IRQ, | ||
199 | }, | ||
200 | }; | ||
201 | |||
202 | static struct platform_device tmu3_device = { | ||
203 | .name = "sh_tmu", | ||
204 | .id = 3, | ||
205 | .dev = { | ||
206 | .platform_data = &tmu3_platform_data, | ||
207 | }, | ||
208 | .resource = tmu3_resources, | ||
209 | .num_resources = ARRAY_SIZE(tmu3_resources), | ||
210 | }; | ||
211 | |||
212 | static struct sh_timer_config tmu4_platform_data = { | ||
213 | .channel_offset = 0x10, | ||
214 | .timer_bit = 1, | ||
215 | }; | ||
216 | |||
217 | static struct resource tmu4_resources[] = { | ||
218 | [0] = { | ||
219 | .start = 0xffc20014, | ||
220 | .end = 0xffc2001f, | ||
221 | .flags = IORESOURCE_MEM, | ||
222 | }, | ||
223 | [1] = { | ||
224 | .start = evt2irq(0x480), | ||
225 | .flags = IORESOURCE_IRQ, | ||
226 | }, | ||
227 | }; | ||
228 | |||
229 | static struct platform_device tmu4_device = { | ||
230 | .name = "sh_tmu", | ||
231 | .id = 4, | ||
232 | .dev = { | ||
233 | .platform_data = &tmu4_platform_data, | ||
234 | }, | ||
235 | .resource = tmu4_resources, | ||
236 | .num_resources = ARRAY_SIZE(tmu4_resources), | ||
237 | }; | ||
238 | |||
239 | static struct sh_timer_config tmu5_platform_data = { | ||
240 | .channel_offset = 0x1c, | ||
241 | .timer_bit = 2, | ||
242 | }; | ||
243 | |||
244 | static struct resource tmu5_resources[] = { | ||
245 | [0] = { | ||
246 | .start = 0xffc20020, | ||
247 | .end = 0xffc2002b, | ||
248 | .flags = IORESOURCE_MEM, | ||
249 | }, | ||
250 | [1] = { | ||
251 | .start = evt2irq(0x4a0), | ||
252 | .flags = IORESOURCE_IRQ, | ||
253 | }, | ||
254 | }; | ||
255 | |||
256 | static struct platform_device tmu5_device = { | ||
257 | .name = "sh_tmu", | ||
258 | .id = 5, | ||
259 | .dev = { | ||
260 | .platform_data = &tmu5_platform_data, | ||
261 | }, | ||
262 | .resource = tmu5_resources, | ||
263 | .num_resources = ARRAY_SIZE(tmu5_resources), | ||
264 | }; | ||
265 | |||
266 | static struct platform_device *shx3_early_devices[] __initdata = { | 144 | static struct platform_device *shx3_early_devices[] __initdata = { |
267 | &scif0_device, | 145 | &scif0_device, |
268 | &scif1_device, | 146 | &scif1_device, |
269 | &scif2_device, | 147 | &scif2_device, |
270 | &tmu0_device, | 148 | &tmu0_device, |
271 | &tmu1_device, | 149 | &tmu1_device, |
272 | &tmu2_device, | ||
273 | &tmu3_device, | ||
274 | &tmu4_device, | ||
275 | &tmu5_device, | ||
276 | }; | 150 | }; |
277 | 151 | ||
278 | static int __init shx3_devices_setup(void) | 152 | static int __init shx3_devices_setup(void) |