summaryrefslogtreecommitdiffstats
path: root/arch/mips/ath79/dev-usb.c
diff options
context:
space:
mode:
authorGabor Juhos <juhosg@openwrt.org>2011-06-20 21:26:10 +0200
committerRalf Baechle <ralf@linux-mips.org>2011-12-07 23:02:46 +0100
commitc279b7759602d4ef97d45f3eb2cdf36a713eb99a (patch)
tree1c399f392565472b4726cc29b71e4d770266d00c /arch/mips/ath79/dev-usb.c
parentUSB: ehci-ath79: Add device_id entry for the AR933X SoCs (diff)
downloadlinux-c279b7759602d4ef97d45f3eb2cdf36a713eb99a.tar.xz
linux-c279b7759602d4ef97d45f3eb2cdf36a713eb99a.zip
MIPS: ath79: add AR933X specific USB platform device registration
Also select the USB_ARCH_HAS_EHCI symbol in order to make the EHCI driver available. Signed-off-by: Gabor Juhos <juhosg@openwrt.org> Cc: linux-mips@linux-mips.org Cc: Kathy Giori <kgiori@qca.qualcomm.com> Cc: "Luis R. Rodriguez" <rodrigue@qca.qualcomm.com> Patchwork: https://patchwork.linux-mips.org/patch/2527/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'arch/mips/ath79/dev-usb.c')
-rw-r--r--arch/mips/ath79/dev-usb.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/arch/mips/ath79/dev-usb.c b/arch/mips/ath79/dev-usb.c
index c3f1999c761b..002d6d2afe04 100644
--- a/arch/mips/ath79/dev-usb.c
+++ b/arch/mips/ath79/dev-usb.c
@@ -163,6 +163,23 @@ static void __init ar913x_usb_setup(void)
platform_device_register(&ath79_ehci_device);
}
+static void __init ar933x_usb_setup(void)
+{
+ ath79_device_reset_set(AR933X_RESET_USBSUS_OVERRIDE);
+ mdelay(10);
+
+ ath79_device_reset_clear(AR933X_RESET_USB_HOST);
+ mdelay(10);
+
+ ath79_device_reset_clear(AR933X_RESET_USB_PHY);
+ mdelay(10);
+
+ ath79_ehci_resources[0].start = AR933X_EHCI_BASE;
+ ath79_ehci_resources[0].end = AR933X_EHCI_BASE + AR933X_EHCI_SIZE - 1;
+ ath79_ehci_device.name = "ar933x-ehci";
+ platform_device_register(&ath79_ehci_device);
+}
+
void __init ath79_register_usb(void)
{
if (soc_is_ar71xx())
@@ -173,6 +190,8 @@ void __init ath79_register_usb(void)
ar724x_usb_setup();
else if (soc_is_ar913x())
ar913x_usb_setup();
+ else if (soc_is_ar933x())
+ ar933x_usb_setup();
else
BUG();
}