diff options
author | Kuninori Morimoto <morimoto.kuninori@renesas.com> | 2009-04-14 22:43:07 -0400 |
---|---|---|
committer | Paul Mundt <lethal@linux-sh.org> | 2009-04-16 01:52:13 -0400 |
commit | ad95b78c9f735da11ff9ec760e9b038cd82aead6 (patch) | |
tree | 0b2c533cc24e4819ae660bb135052159a3bba18c /arch/sh/kernel/cpu/sh4a/setup-sh7724.c | |
parent | cd5b9ef776feff440e7a889d1a565ceabfecbfa1 (diff) |
sh: sh7724: Add VEU support.
This adds uio_pdrv_genirq support for the VEU.
Signed-off-by: Kuninori Morimoto <morimoto.kuninori@renesas.com>
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 | 64 |
1 files changed, 64 insertions, 0 deletions
diff --git a/arch/sh/kernel/cpu/sh4a/setup-sh7724.c b/arch/sh/kernel/cpu/sh4a/setup-sh7724.c index 499a6fcdf231..65570ed69e6c 100644 --- a/arch/sh/kernel/cpu/sh4a/setup-sh7724.c +++ b/arch/sh/kernel/cpu/sh4a/setup-sh7724.c | |||
@@ -172,20 +172,84 @@ static struct platform_device vpu_device = { | |||
172 | .num_resources = ARRAY_SIZE(vpu_resources), | 172 | .num_resources = ARRAY_SIZE(vpu_resources), |
173 | }; | 173 | }; |
174 | 174 | ||
175 | /* VEU0 */ | ||
176 | static struct uio_info veu0_platform_data = { | ||
177 | .name = "VEU3F0", | ||
178 | .version = "0", | ||
179 | .irq = 83, | ||
180 | }; | ||
181 | |||
182 | static struct resource veu0_resources[] = { | ||
183 | [0] = { | ||
184 | .name = "VEU3F0", | ||
185 | .start = 0xfe920000, | ||
186 | .end = 0xfe9200cb - 1, | ||
187 | .flags = IORESOURCE_MEM, | ||
188 | }, | ||
189 | [1] = { | ||
190 | /* place holder for contiguous memory */ | ||
191 | }, | ||
192 | }; | ||
193 | |||
194 | static struct platform_device veu0_device = { | ||
195 | .name = "uio_pdrv_genirq", | ||
196 | .id = 1, | ||
197 | .dev = { | ||
198 | .platform_data = &veu0_platform_data, | ||
199 | }, | ||
200 | .resource = veu0_resources, | ||
201 | .num_resources = ARRAY_SIZE(veu0_resources), | ||
202 | }; | ||
203 | |||
204 | /* VEU1 */ | ||
205 | static struct uio_info veu1_platform_data = { | ||
206 | .name = "VEU3F1", | ||
207 | .version = "0", | ||
208 | .irq = 54, | ||
209 | }; | ||
210 | |||
211 | static struct resource veu1_resources[] = { | ||
212 | [0] = { | ||
213 | .name = "VEU3F1", | ||
214 | .start = 0xfe924000, | ||
215 | .end = 0xfe9240cb - 1, | ||
216 | .flags = IORESOURCE_MEM, | ||
217 | }, | ||
218 | [1] = { | ||
219 | /* place holder for contiguous memory */ | ||
220 | }, | ||
221 | }; | ||
222 | |||
223 | static struct platform_device veu1_device = { | ||
224 | .name = "uio_pdrv_genirq", | ||
225 | .id = 2, | ||
226 | .dev = { | ||
227 | .platform_data = &veu1_platform_data, | ||
228 | }, | ||
229 | .resource = veu1_resources, | ||
230 | .num_resources = ARRAY_SIZE(veu1_resources), | ||
231 | }; | ||
232 | |||
175 | static struct platform_device *sh7724_devices[] __initdata = { | 233 | static struct platform_device *sh7724_devices[] __initdata = { |
176 | &sci_device, | 234 | &sci_device, |
177 | &rtc_device, | 235 | &rtc_device, |
178 | &iic0_device, | 236 | &iic0_device, |
179 | &iic1_device, | 237 | &iic1_device, |
180 | &vpu_device, | 238 | &vpu_device, |
239 | &veu0_device, | ||
240 | &veu1_device, | ||
181 | }; | 241 | }; |
182 | 242 | ||
183 | static int __init sh7724_devices_setup(void) | 243 | static int __init sh7724_devices_setup(void) |
184 | { | 244 | { |
185 | clk_always_enable("rtc0"); /* RTC */ | 245 | clk_always_enable("rtc0"); /* RTC */ |
186 | clk_always_enable("vpu0"); /* VPU */ | 246 | clk_always_enable("vpu0"); /* VPU */ |
247 | clk_always_enable("veu1"); /* VEU3F1 */ | ||
248 | clk_always_enable("veu0"); /* VEU3F0 */ | ||
187 | 249 | ||
188 | platform_resource_setup_memory(&vpu_device, "vpu", 2 << 20); | 250 | platform_resource_setup_memory(&vpu_device, "vpu", 2 << 20); |
251 | platform_resource_setup_memory(&veu0_device, "veu0", 2 << 20); | ||
252 | platform_resource_setup_memory(&veu1_device, "veu1", 2 << 20); | ||
189 | 253 | ||
190 | return platform_add_devices(sh7724_devices, | 254 | return platform_add_devices(sh7724_devices, |
191 | ARRAY_SIZE(sh7724_devices)); | 255 | ARRAY_SIZE(sh7724_devices)); |