From e23a92243cddf39d1b85e862afcf5426c196eff9 Mon Sep 17 00:00:00 2001 From: Gregory Nutt Date: Wed, 14 Aug 2013 17:33:31 -0600 Subject: [PATCH] SAMA5: ports should not be reset state (seems to make no difference) --- arch/arm/src/sama5/sam_ohci.c | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) 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 */