Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 5 Apr 2013 02:02:38 +0000 (UTC)
From:      Adrian Chadd <adrian@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r249126 - head/sys/mips/atheros
Message-ID:  <201304050202.r3522cYW089946@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: adrian
Date: Fri Apr  5 02:02:37 2013
New Revision: 249126
URL: http://svnweb.freebsd.org/changeset/base/249126

Log:
  Implement USB device reset and poweron.
  
  Tested:
  
  * Atheros AP131, AR9331 SoC

Modified:
  head/sys/mips/atheros/ar933x_chip.c

Modified: head/sys/mips/atheros/ar933x_chip.c
==============================================================================
--- head/sys/mips/atheros/ar933x_chip.c	Fri Apr  5 02:01:05 2013	(r249125)
+++ head/sys/mips/atheros/ar933x_chip.c	Fri Apr  5 02:02:37 2013	(r249126)
@@ -222,43 +222,14 @@ ar933x_chip_get_eth_pll(unsigned int mac
 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_stop(AR933X_RESET_USBSUS_OVERRIDE);
+	DELAY(100);
 
-		ar71xx_device_start(AR724X_RESET_MODULE_USB_OHCI_DLL |
-		    AR724X_RESET_USB_HOST);
-		DELAY(1000);
+	ar71xx_device_start(AR933X_RESET_USB_HOST);
+	DELAY(100);
 
-		/*
-		 * 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));
-
-		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(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 = {



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201304050202.r3522cYW089946>