aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/ar7/files
diff options
context:
space:
mode:
authorEugene Konev <ejka@openwrt.org>2007-10-01 12:35:35 +0000
committerEugene Konev <ejka@openwrt.org>2007-10-01 12:35:35 +0000
commit8e14809ef333ebb8f56132bdd7934a6be9ab5690 (patch)
treeed5ae59b7546c9de4d663f60fd64e0c474a3b8c4 /target/linux/ar7/files
parent8465950fc2115474bea12a3e689a44dae6a59121 (diff)
downloadupstream-8e14809ef333ebb8f56132bdd7934a6be9ab5690.tar.gz
upstream-8e14809ef333ebb8f56132bdd7934a6be9ab5690.tar.bz2
upstream-8e14809ef333ebb8f56132bdd7934a6be9ab5690.zip
add usb controller definition
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@9087 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux/ar7/files')
-rw-r--r--target/linux/ar7/files/arch/mips/ar7/platform.c33
-rw-r--r--target/linux/ar7/files/include/asm-mips/ar7/ar7.h1
2 files changed, 34 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;
}
diff --git a/target/linux/ar7/files/include/asm-mips/ar7/ar7.h b/target/linux/ar7/files/include/asm-mips/ar7/ar7.h
index 89e8b305a2..9592f63bf5 100644
--- a/target/linux/ar7/files/include/asm-mips/ar7/ar7.h
+++ b/target/linux/ar7/files/include/asm-mips/ar7/ar7.h
@@ -30,6 +30,7 @@
/* 0x08610A00 - 0x08610BFF (512 bytes, 128 bytes / clock) */
#define AR7_REGS_POWER (AR7_REGS_BASE + 0x0a00)
#define AR7_REGS_UART0 (AR7_REGS_BASE + 0x0e00)
+#define AR7_REGS_USB (AR7_REGS_BASE + 0x1200)
#define AR7_REGS_RESET (AR7_REGS_BASE + 0x1600)
#define AR7_REGS_VLYNQ0 (AR7_REGS_BASE + 0x1800)
#define AR7_REGS_DCL (AR7_REGS_BASE + 0x1a00)