diff options
author | Gabor Juhos <juhosg@openwrt.org> | 2011-09-21 11:47:51 +0000 |
---|---|---|
committer | Gabor Juhos <juhosg@openwrt.org> | 2011-09-21 11:47:51 +0000 |
commit | 6cc6fb312453aae63a0f56d1796e936202a4b686 (patch) | |
tree | 0d068168d54941bc0e9b72150ad48b7383c968dd /target/linux/ar71xx | |
parent | 8c46da4f794309b1995cbf6e6e23ce890f55e508 (diff) | |
download | master-187ad058-6cc6fb312453aae63a0f56d1796e936202a4b686.tar.gz master-187ad058-6cc6fb312453aae63a0f56d1796e936202a4b686.tar.bz2 master-187ad058-6cc6fb312453aae63a0f56d1796e936202a4b686.zip |
ar71xx: add AR933x specific USB setup function
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@28276 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux/ar71xx')
-rw-r--r-- | target/linux/ar71xx/files/arch/mips/ar71xx/dev-usb.c | 24 | ||||
-rw-r--r-- | target/linux/ar71xx/files/arch/mips/include/asm/mach-ar71xx/ar71xx.h | 3 |
2 files changed, 25 insertions, 2 deletions
diff --git a/target/linux/ar71xx/files/arch/mips/ar71xx/dev-usb.c b/target/linux/ar71xx/files/arch/mips/ar71xx/dev-usb.c index 5d72b0c290..f673571323 100644 --- a/target/linux/ar71xx/files/arch/mips/ar71xx/dev-usb.c +++ b/target/linux/ar71xx/files/arch/mips/ar71xx/dev-usb.c @@ -165,6 +165,23 @@ static void __init ar91xx_usb_setup(void) platform_device_register(&ar71xx_ehci_device); } +static void __init ar933x_usb_setup(void) +{ + ar71xx_device_reset_rmw(0, AR933X_RESET_USBSUS_OVERRIDE); + mdelay(10); + + ar71xx_device_reset_rmw(AR933X_RESET_USB_HOST, + AR933X_RESET_USBSUS_OVERRIDE); + mdelay(10); + + ar71xx_device_reset_rmw(AR933X_RESET_USB_PHY, + AR933X_RESET_USBSUS_OVERRIDE); + mdelay(10); + + ar71xx_ehci_data.is_ar91xx = 1; + platform_device_register(&ar71xx_ehci_device); +} + void __init ar71xx_add_device_usb(void) { switch (ar71xx_soc) { @@ -185,14 +202,17 @@ void __init ar71xx_add_device_usb(void) case AR71XX_SOC_AR9130: case AR71XX_SOC_AR9132: - case AR71XX_SOC_AR9330: - case AR71XX_SOC_AR9331: case AR71XX_SOC_AR9341: case AR71XX_SOC_AR9342: case AR71XX_SOC_AR9344: ar91xx_usb_setup(); break; + case AR71XX_SOC_AR9330: + case AR71XX_SOC_AR9331: + ar933x_usb_setup(); + break; + default: BUG(); } diff --git a/target/linux/ar71xx/files/arch/mips/include/asm/mach-ar71xx/ar71xx.h b/target/linux/ar71xx/files/arch/mips/include/asm/mach-ar71xx/ar71xx.h index ec5e0bb2b5..4a732e2afe 100644 --- a/target/linux/ar71xx/files/arch/mips/include/asm/mach-ar71xx/ar71xx.h +++ b/target/linux/ar71xx/files/arch/mips/include/asm/mach-ar71xx/ar71xx.h @@ -678,6 +678,9 @@ void ar71xx_ddr_flush(u32 reg); #define AR933X_RESET_GE0_MDIO BIT(22) #define AR933X_RESET_GE1_MAC BIT(13) #define AR933X_RESET_GE0_MAC BIT(9) +#define AR933X_RESET_USB_HOST BIT(5) +#define AR933X_RESET_USB_PHY BIT(4) +#define AR933X_RESET_USBSUS_OVERRIDE BIT(3) #define REV_ID_MAJOR_MASK 0xfff0 #define REV_ID_MAJOR_AR71XX 0x00a0 |