diff --git a/arch/arm/src/sama5/sam_ohci.c b/arch/arm/src/sama5/sam_ohci.c index b7bb025e0f2..da26653befa 100644 --- a/arch/arm/src/sama5/sam_ohci.c +++ b/arch/arm/src/sama5/sam_ohci.c @@ -124,7 +124,10 @@ #endif /* OHCI Setup ******************************************************************/ -/* Frame Interval / Periodic Start */ +/* Frame Interval / Periodic Start. + * + * At 12Mbps, there are 12000 bit time in each 1Msec frame. + */ #define BITS_PER_FRAME 12000 #define FI (BITS_PER_FRAME-1) @@ -2691,6 +2694,17 @@ FAR struct usbhost_connection_s *sam_ohci_initialize(int controller) putreg32(regval, SAM_PMC_SCER); irqrestore(flags); + /* Make all three ports usable. Zero is the reset value and holds the + * ports in reset. + * REVISIT: This will have to change in future. Should be a configuration + * setting + */ + + regval = getreg32(SAM_SFR_OHCIICR); + regval |= (SFR_OHCIICR_RES0 | SFR_OHCIICR_RES1 | SFR_OHCIICR_RES2); + putreg32(regval, SAM_SFR_OHCIICR); + irqrestore(flags); + /* Note that no pin pinconfiguration is required. All USB HS pins have * dedicated function */