diff options
author | Gregory Nutt <gnutt@nuttx.org> | 2013-09-19 16:10:46 -0600 |
---|---|---|
committer | Gregory Nutt <gnutt@nuttx.org> | 2013-09-19 16:10:46 -0600 |
commit | bfcf82862ab67196f91f5f6138c20111503b55d1 (patch) | |
tree | 17802971a1ec4fee51295b313c529881ad478a25 /nuttx/arch | |
parent | 51355efa04f319b4691ad71409ce7304bd1ff685 (diff) | |
download | px4-nuttx-bfcf82862ab67196f91f5f6138c20111503b55d1.tar.gz px4-nuttx-bfcf82862ab67196f91f5f6138c20111503b55d1.tar.bz2 px4-nuttx-bfcf82862ab67196f91f5f6138c20111503b55d1.zip |
SAMA5 OHCI: When UPLL drives OHCI the logically correct divider of 10 does not work; But a divider of 5 does. Why?
Diffstat (limited to 'nuttx/arch')
-rw-r--r-- | nuttx/arch/arm/src/sama5/sam_clockconfig.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/nuttx/arch/arm/src/sama5/sam_clockconfig.c b/nuttx/arch/arm/src/sama5/sam_clockconfig.c index a8c0613ef..fd1162164 100644 --- a/nuttx/arch/arm/src/sama5/sam_clockconfig.c +++ b/nuttx/arch/arm/src/sama5/sam_clockconfig.c @@ -397,9 +397,16 @@ static inline void sam_usbclockconfig(void) /* 7) Program the OHCI clocks (UHP48M and UHP12M) with USBDIV field in * PMC_USB register. USBDIV must be 9 (division by 10) if UPLLCK is * selected. + * + * REVISIT: The divisor of 10 produces a rate that is too high. Division + * by 5, however, seems to work just fine. No idea why? */ - regval |= PMC_USB_USBDIV(9); +#if 1 /* REVISIT */ + regval |= PMC_USB_USBDIV(4); /* Division by 5 */ +#else + regval |= PMC_USB_USBDIV(9); /* Division by 10 */ +#endif putreg32(regval, SAM_PMC_USB); #else /* BOARD_USE_UPLL */ |