mirror of
git://projects.qi-hardware.com/openwrt-xburst.git
synced 2024-09-05 22:46:48 +03:00
ar71xx: add AR934x specific USB setup
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@28980 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
parent
5f0b41bae5
commit
1553f9eabd
@ -182,6 +182,30 @@ static void __init ar933x_usb_setup(void)
|
|||||||
platform_device_register(&ar71xx_ehci_device);
|
platform_device_register(&ar71xx_ehci_device);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void __init ar934x_usb_setup(void)
|
||||||
|
{
|
||||||
|
u32 bootstrap;
|
||||||
|
|
||||||
|
bootstrap = ar71xx_reset_rr(AR934X_RESET_REG_BOOTSTRAP);
|
||||||
|
if (bootstrap & AR934X_BOOTSTRAP_USB_MODE_DEVICE)
|
||||||
|
return;
|
||||||
|
|
||||||
|
ar71xx_device_stop(AR934X_RESET_USBSUS_OVERRIDE);
|
||||||
|
udelay(1000);
|
||||||
|
|
||||||
|
ar71xx_device_start(AR934X_RESET_USB_PHY);
|
||||||
|
udelay(1000);
|
||||||
|
|
||||||
|
ar71xx_device_start(AR934X_RESET_USB_PHY_ANALOG);
|
||||||
|
udelay(1000);
|
||||||
|
|
||||||
|
ar71xx_device_start(AR934X_RESET_USB_HOST);
|
||||||
|
udelay(1000);
|
||||||
|
|
||||||
|
ar71xx_ehci_data.is_ar91xx = 1;
|
||||||
|
platform_device_register(&ar71xx_ehci_device);
|
||||||
|
}
|
||||||
|
|
||||||
void __init ar71xx_add_device_usb(void)
|
void __init ar71xx_add_device_usb(void)
|
||||||
{
|
{
|
||||||
switch (ar71xx_soc) {
|
switch (ar71xx_soc) {
|
||||||
@ -202,9 +226,6 @@ void __init ar71xx_add_device_usb(void)
|
|||||||
|
|
||||||
case AR71XX_SOC_AR9130:
|
case AR71XX_SOC_AR9130:
|
||||||
case AR71XX_SOC_AR9132:
|
case AR71XX_SOC_AR9132:
|
||||||
case AR71XX_SOC_AR9341:
|
|
||||||
case AR71XX_SOC_AR9342:
|
|
||||||
case AR71XX_SOC_AR9344:
|
|
||||||
ar91xx_usb_setup();
|
ar91xx_usb_setup();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@ -213,6 +234,12 @@ void __init ar71xx_add_device_usb(void)
|
|||||||
ar933x_usb_setup();
|
ar933x_usb_setup();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case AR71XX_SOC_AR9341:
|
||||||
|
case AR71XX_SOC_AR9342:
|
||||||
|
case AR71XX_SOC_AR9344:
|
||||||
|
ar934x_usb_setup();
|
||||||
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
BUG();
|
BUG();
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user