diff --git a/arch/arm/src/sama5/sam_clockconfig.c b/arch/arm/src/sama5/sam_clockconfig.c index a561bb9a2f8..d34a07fa084 100644 --- a/arch/arm/src/sama5/sam_clockconfig.c +++ b/arch/arm/src/sama5/sam_clockconfig.c @@ -492,15 +492,13 @@ static inline void sam_usbclockconfig(void) * 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? + * REVISIT: The divisor of 10 produces a rate that is too high with + * SAMA5D3. A divisor of 5, however, seems to work just fine for the + * SAMA5D3. The SAMA5D4, on the other hand, needs the divisor of 10. + * No idea why? Let the board.h file decide which to use. */ -#if 1 /* REVISIT */ - regval |= PMC_USB_USBDIV(4); /* Division by 5 */ -#else - regval |= PMC_USB_USBDIV(9); /* Division by 10 */ -#endif + regval |= PMC_USB_USBDIV(BOARD_UPLL_OHCI_DIV-1); putreg32(regval, SAM_PMC_USB); #else /* BOARD_USE_UPLL */ diff --git a/arch/arm/src/sama5/sam_ohci.c b/arch/arm/src/sama5/sam_ohci.c index 84f9ac601d2..cdf040adcad 100644 --- a/arch/arm/src/sama5/sam_ohci.c +++ b/arch/arm/src/sama5/sam_ohci.c @@ -1880,7 +1880,7 @@ static void sam_wdh_bottomhalf(void) /* Invalidate D-cache to force re-reading of the Done Head */ -# if 0 /* Apparently insufficient */ +#if 0 /* Apparently insufficient */ cp15_invalidate_dcache((uintptr_t)&g_hcca.donehead, (uintptr_t)&g_hcca.donehead + sizeof(uint32_t)); #else