summaryrefslogtreecommitdiff
path: root/nuttx/arch/arm/src/lpc31xx
diff options
context:
space:
mode:
authorGregory Nutt <gnutt@nuttx.org>2013-11-21 18:25:10 -0600
committerGregory Nutt <gnutt@nuttx.org>2013-11-21 18:25:10 -0600
commit35f7e9eda07ec1745b346cd24d46453006a2f1e7 (patch)
treef351b8def01b9cfe7c9deb5d267f8a8c866e2d9a /nuttx/arch/arm/src/lpc31xx
parent8149c74577a60030f94a1270140f165d20e7dfe9 (diff)
downloadnuttx-35f7e9eda07ec1745b346cd24d46453006a2f1e7.tar.gz
nuttx-35f7e9eda07ec1745b346cd24d46453006a2f1e7.tar.bz2
nuttx-35f7e9eda07ec1745b346cd24d46453006a2f1e7.zip
LPC31xx EHCI: Power power changes
Diffstat (limited to 'nuttx/arch/arm/src/lpc31xx')
-rwxr-xr-xnuttx/arch/arm/src/lpc31xx/lpc31_ehci.c20
1 files changed, 18 insertions, 2 deletions
diff --git a/nuttx/arch/arm/src/lpc31xx/lpc31_ehci.c b/nuttx/arch/arm/src/lpc31xx/lpc31_ehci.c
index a91a3a1d6..19d1c2c5a 100755
--- a/nuttx/arch/arm/src/lpc31xx/lpc31_ehci.c
+++ b/nuttx/arch/arm/src/lpc31xx/lpc31_ehci.c
@@ -4513,8 +4513,24 @@ FAR struct usbhost_connection_s *lpc31_ehci_initialize(int controller)
* PORTSC register to enable power.
*/
- lpc31_usbhost_vbusdrive(0, true);
- up_mdelay(50);
+ /* Handle root hub status change on each root port */
+
+ for (i = 0; i < LPC31_EHCI_NRHPORT; i++)
+ {
+ /* Enable VBUS power for the port */
+
+ lpc31_usbhost_vbusdrive(i, true);
+ up_mdelay(25);
+
+ /* Power up the power. REVISIT: Is this necessary? The PP bit never
+ * gets set unless I explicitly set it here.
+ */
+
+ regval = lpc31_getreg(&HCOR->portsc[i]);
+ regval |= EHCI_PORTSC_PP;
+ lpc31_putreg(regval, &HCOR->portsc[i]);
+ up_mdelay(25);
+ }
/* If there is a USB device in the slot at power up, then we will not
* get the status change interrupt to signal us that the device is