diff options
author | Milan Svoboda <msvoboda@ra.rockwell.com> | 2006-12-01 05:36:41 -0500 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2006-12-01 12:14:28 -0500 |
commit | e520a36de2f7985df5ef2e84a9f6d2608ecc6f25 (patch) | |
tree | 2514c85ba15e043513fd68082ebde3b252f7baf6 /arch/arm | |
parent | 2024c39dbba4d036f0b16daf530ad5f4416fb344 (diff) |
[ARM] 3958/1: add platform device (pxa2xx-udc)to ixp4xx
Create include/asm-arm/arch-ixp4xx/udc.h and
add platfrom device ixp4xx_udc_device into
arch/arm/mach-ixp4xx/common.c.
This allows us to use pxa2xx-udc on
the ixp4xx platfrom. Both pxa2xx and
ixp4xx use the same device controller.
Signed-off-by:Milan Svoboda <msvoboda@ra.rockwell.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm')
-rw-r--r-- | arch/arm/mach-ixp4xx/common.c | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/arch/arm/mach-ixp4xx/common.c b/arch/arm/mach-ixp4xx/common.c index 074c96520246..1cf3bde1a5d2 100644 --- a/arch/arm/mach-ixp4xx/common.c +++ b/arch/arm/mach-ixp4xx/common.c | |||
@@ -28,6 +28,7 @@ | |||
28 | #include <linux/timex.h> | 28 | #include <linux/timex.h> |
29 | #include <linux/clocksource.h> | 29 | #include <linux/clocksource.h> |
30 | 30 | ||
31 | #include <asm/arch/udc.h> | ||
31 | #include <asm/hardware.h> | 32 | #include <asm/hardware.h> |
32 | #include <asm/uaccess.h> | 33 | #include <asm/uaccess.h> |
33 | #include <asm/io.h> | 34 | #include <asm/io.h> |
@@ -286,6 +287,44 @@ struct sys_timer ixp4xx_timer = { | |||
286 | .init = ixp4xx_timer_init, | 287 | .init = ixp4xx_timer_init, |
287 | }; | 288 | }; |
288 | 289 | ||
290 | static struct pxa2xx_udc_mach_info ixp4xx_udc_info; | ||
291 | |||
292 | void __init ixp4xx_set_udc_info(struct pxa2xx_udc_mach_info *info) | ||
293 | { | ||
294 | memcpy(&ixp4xx_udc_info, info, sizeof *info); | ||
295 | } | ||
296 | |||
297 | static struct resource ixp4xx_udc_resources[] = { | ||
298 | [0] = { | ||
299 | .start = 0xc800b000, | ||
300 | .end = 0xc800bfff, | ||
301 | .flags = IORESOURCE_MEM, | ||
302 | }, | ||
303 | [1] = { | ||
304 | .start = IRQ_IXP4XX_USB, | ||
305 | .end = IRQ_IXP4XX_USB, | ||
306 | .flags = IORESOURCE_IRQ, | ||
307 | }, | ||
308 | }; | ||
309 | |||
310 | /* | ||
311 | * USB device controller. The IXP4xx uses the same controller as PXA2XX, | ||
312 | * so we just use the same device. | ||
313 | */ | ||
314 | static struct platform_device ixp4xx_udc_device = { | ||
315 | .name = "pxa2xx-udc", | ||
316 | .id = -1, | ||
317 | .num_resources = 2, | ||
318 | .resource = ixp4xx_udc_resources, | ||
319 | .dev = { | ||
320 | .platform_data = &ixp4xx_udc_info, | ||
321 | }, | ||
322 | }; | ||
323 | |||
324 | static struct platform_device *ixp4xx_devices[] __initdata = { | ||
325 | &ixp4xx_udc_device, | ||
326 | }; | ||
327 | |||
289 | static struct resource ixp46x_i2c_resources[] = { | 328 | static struct resource ixp46x_i2c_resources[] = { |
290 | [0] = { | 329 | [0] = { |
291 | .start = 0xc8011000, | 330 | .start = 0xc8011000, |
@@ -321,6 +360,8 @@ void __init ixp4xx_sys_init(void) | |||
321 | { | 360 | { |
322 | ixp4xx_exp_bus_size = SZ_16M; | 361 | ixp4xx_exp_bus_size = SZ_16M; |
323 | 362 | ||
363 | platform_add_devices(ixp4xx_devices, ARRAY_SIZE(ixp4xx_devices)); | ||
364 | |||
324 | if (cpu_is_ixp46x()) { | 365 | if (cpu_is_ixp46x()) { |
325 | int region; | 366 | int region; |
326 | 367 | ||