aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/ar7/files/arch
diff options
context:
space:
mode:
authorEugene Konev <ejka@imfi.kspu.ru>2007-10-01 12:35:35 +0000
committerEugene Konev <ejka@imfi.kspu.ru>2007-10-01 12:35:35 +0000
commit822b6669359d0d89403f22a2cf18178116019bc7 (patch)
tree6d0cfe0fc884d5bd16788fa626d2d1eb27a9643c /target/linux/ar7/files/arch
parent05f07554267ea9c054c6b2b05628c85330cf894f (diff)
downloadupstream-822b6669359d0d89403f22a2cf18178116019bc7.tar.gz
upstream-822b6669359d0d89403f22a2cf18178116019bc7.tar.bz2
upstream-822b6669359d0d89403f22a2cf18178116019bc7.zip
add usb controller definition
SVN-Revision: 9087
Diffstat (limited to 'target/linux/ar7/files/arch')
-rw-r--r--target/linux/ar7/files/arch/mips/ar7/platform.c33
1 files changed, 33 insertions, 0 deletions
diff --git a/target/linux/ar7/files/arch/mips/ar7/platform.c b/target/linux/ar7/files/arch/mips/ar7/platform.c
index 1671be1ba0..f3a9372d88 100644
--- a/target/linux/ar7/files/arch/mips/ar7/platform.c
+++ b/target/linux/ar7/files/arch/mips/ar7/platform.c
@@ -180,6 +180,27 @@ static struct resource vlynq_high_res[] = {
},
};
+static struct resource usb_res[] = {
+ {
+ .name = "regs",
+ .flags = IORESOURCE_MEM,
+ .start = AR7_REGS_USB,
+ .end = AR7_REGS_USB + 0xff,
+ },
+ {
+ .name = "irq",
+ .flags = IORESOURCE_IRQ,
+ .start = 32,
+ .end = 32,
+ },
+ {
+ .name = "mem",
+ .flags = IORESOURCE_MEM,
+ .start = 0x03400000,
+ .end = 0x034001fff,
+ },
+};
+
static struct physmap_flash_data physmap_flash_data = {
.width = 2,
};
@@ -331,6 +352,13 @@ static struct platform_device ar7_gpio_leds = {
};
#endif
+static struct platform_device ar7_udc = {
+ .id = -1,
+ .name = "ar7_udc",
+ .resource = usb_res,
+ .num_resources = ARRAY_SIZE(usb_res),
+};
+
static inline unsigned char char2hex(char h)
{
switch (h) {
@@ -454,6 +482,11 @@ static int __init ar7_register_devices(void)
ar7_led_data.leds = default_leds;
res = platform_device_register(&ar7_gpio_leds);
#endif
+ if (res)
+ return res;
+
+ res = platform_device_register(&ar7_udc);
+
return res;
}