socsvn commit: r240533 - soc2012/aleek/beaglexm-armv6/sys/arm/ti/twl

aleek at FreeBSD.org aleek at FreeBSD.org
Sun Aug 19 14:48:40 UTC 2012


Author: aleek
Date: Sun Aug 19 14:48:33 2012
New Revision: 240533
URL: http://svnweb.FreeBSD.org/socsvn/?view=rev&rev=240533

Log:
  cutting off the power to the USB hub

Modified:
  soc2012/aleek/beaglexm-armv6/sys/arm/ti/twl/twl_vreg.c

Modified: soc2012/aleek/beaglexm-armv6/sys/arm/ti/twl/twl_vreg.c
==============================================================================
--- soc2012/aleek/beaglexm-armv6/sys/arm/ti/twl/twl_vreg.c	Sun Aug 19 14:19:12 2012	(r240532)
+++ soc2012/aleek/beaglexm-armv6/sys/arm/ti/twl/twl_vreg.c	Sun Aug 19 14:48:33 2012	(r240533)
@@ -918,18 +918,31 @@
 			device_printf( sc->sc_dev, "Unable to power USB PHY\n" );
 			return 0;
 		}
+		/* 
 		if( twl_read( sc->sc_pdev, 3, 0x46, &val, 1 ) != 0 )
 		{
 			device_printf( sc->sc_dev, "Could not read P1_SW_EVENTS register\n" );
 			return 0;
-		}
-		val |= 0x06;
+		}*/
+		val = 0x00;
 		if( twl_write( sc->sc_pdev, 3, 0x46, &val, 1 ) != 0 )
 		{
 			device_printf( sc->sc_dev, "Could not write P1_SW_EVENTS register\n" );
 			return 0;
 		}
 
+		if( twl_read( sc->sc_pdev, 2, 0xEE, &val, 1 ) != 0 )
+		{
+			device_printf( sc->sc_dev, "Could not read LEDA register\n" );
+			return 0;
+		}
+		val &= ~0x03;
+		if( twl_write( sc->sc_pdev, 2, 0xEE, &val, 1 ) != 0 )
+		{
+			device_printf( sc->sc_dev, "Could not write LEDA register\n" );
+			return 0;
+		}
+
 
 	}
 


More information about the svn-soc-all mailing list