Date: Sun, 19 Aug 2012 14:48:38 +0000 From: aleek@FreeBSD.org To: svn-soc-all@FreeBSD.org Subject: socsvn commit: r240533 - soc2012/aleek/beaglexm-armv6/sys/arm/ti/twl Message-ID: <20120819144838.32AFC106564A@hub.freebsd.org>
next in thread | raw e-mail | index | archive | help
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; + } + }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20120819144838.32AFC106564A>