From 13e31c89503c600c12db53b43b47486ba7b4aa94 Mon Sep 17 00:00:00 2001 From: adrian Date: Fri, 5 Apr 2013 02:02:37 +0000 Subject: Implement USB device reset and poweron. Tested: * Atheros AP131, AR9331 SoC --- sys/mips/atheros/ar933x_chip.c | 41 ++++++----------------------------------- 1 file changed, 6 insertions(+), 35 deletions(-) (limited to 'sys/mips') 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 = { -- cgit v1.1