summaryrefslogtreecommitdiffstats
path: root/sys/mips
diff options
context:
space:
mode:
authoradrian <adrian@FreeBSD.org>2013-04-05 02:02:37 +0000
committeradrian <adrian@FreeBSD.org>2013-04-05 02:02:37 +0000
commit13e31c89503c600c12db53b43b47486ba7b4aa94 (patch)
tree7a4683d3aacbd7c94dc561023c2716ea58e5734c /sys/mips
parenta6dd8dc474517c2f2998d648a6d346a62ac78114 (diff)
downloadFreeBSD-src-13e31c89503c600c12db53b43b47486ba7b4aa94.zip
FreeBSD-src-13e31c89503c600c12db53b43b47486ba7b4aa94.tar.gz
Implement USB device reset and poweron.
Tested: * Atheros AP131, AR9331 SoC
Diffstat (limited to 'sys/mips')
-rw-r--r--sys/mips/atheros/ar933x_chip.c41
1 files changed, 6 insertions, 35 deletions
diff --git a/sys/mips/atheros/ar933x_chip.c b/sys/mips/atheros/ar933x_chip.c
index 455128d..cf0de55 100644
--- a/sys/mips/atheros/ar933x_chip.c
+++ b/sys/mips/atheros/ar933x_chip.c
@@ -222,43 +222,14 @@ ar933x_chip_get_eth_pll(unsigned int mac, int speed)
static void
ar933x_chip_init_usb_peripheral(void)
{
-#if 0
- switch (ar71xx_soc) {
- case AR71XX_SOC_AR7240:
- ar71xx_device_stop(AR724X_RESET_MODULE_USB_OHCI_DLL |
- AR724X_RESET_USB_HOST);
- DELAY(1000);
-
- ar71xx_device_start(AR724X_RESET_MODULE_USB_OHCI_DLL |
- AR724X_RESET_USB_HOST);
- DELAY(1000);
-
- /*
- * WAR for HW bug. Here it adjusts the duration
- * between two SOFS.
- */
- ATH_WRITE_REG(AR71XX_USB_CTRL_FLADJ,
- (3 << USB_CTRL_FLADJ_A0_SHIFT));
+ ar71xx_device_stop(AR933X_RESET_USBSUS_OVERRIDE);
+ DELAY(100);
- break;
-
- case AR71XX_SOC_AR7241:
- case AR71XX_SOC_AR7242:
- ar71xx_device_start(AR724X_RESET_MODULE_USB_OHCI_DLL);
- DELAY(100);
-
- ar71xx_device_start(AR724X_RESET_USB_HOST);
- DELAY(100);
+ ar71xx_device_start(AR933X_RESET_USB_HOST);
+ DELAY(100);
- ar71xx_device_start(AR724X_RESET_USB_PHY);
- DELAY(100);
-
- break;
-
- default:
- break;
- }
-#endif
+ ar71xx_device_start(AR933X_RESET_USB_PHY);
+ DELAY(100);
}
struct ar71xx_cpu_def ar933x_chip_def = {
OpenPOWER on IntegriCloud