diff --git a/arch/arm/src/lpc17xx/lpc17_usbhost.c b/arch/arm/src/lpc17xx/lpc17_usbhost.c index 230037fddca741ebb7083d38cef7918ffda45ea9..158369b74b2a8f0ac3805badd8c96fbb70f9ab0d 100755 --- a/arch/arm/src/lpc17xx/lpc17_usbhost.c +++ b/arch/arm/src/lpc17xx/lpc17_usbhost.c @@ -69,7 +69,10 @@ * Definitions *******************************************************************************/ -/* Configuration ***************************************************************/ +/* Frame Interval */ + +#define FI (12000-1) /* 12000 bits per frame (-1) */ +#define DEFAULT_FMINTERVAL ((((6 * (FI - 210)) / 7) << 16) | FI) /* CLKCTRL enable bits */ @@ -443,6 +446,10 @@ void up_usbhostinitialize(void) regval |= OHCI_CTRL_HCFS_OPER; lpc17_putreg(regval, LPC17_USBHOST_CTRL); + /* Set global power */ + + lpc17_putreg(OHCI_RHSTATUS_LPS, LPC17_USBHOST_RHSTATUS); + /* Set HCCA base address */ lpc17_putreg((uint32_t)Hcca, LPC17_USBHOST_HCCA); diff --git a/include/nuttx/usb/ohci.h b/include/nuttx/usb/ohci.h index cb1abb67a22e4bb50a34151c0163895127d61e4f..dd714c7c1c2d8e9e3a20c22c9deb2ff2ebff2ab0 100755 --- a/include/nuttx/usb/ohci.h +++ b/include/nuttx/usb/ohci.h @@ -226,7 +226,6 @@ /* HcRhStatus: Root hub status (7.4.3) */ -#define OHCI_RHSTATUS_ #define OHCI_RHSTATUS_LPS (1 << 0) /* Bit 0: Local power status */ #define OHCI_RHSTATUS_OCI (1 << 1) /* Bit 1: Over current indicator */ /* Bits 2-14: Reserved */