From cc98063965ac428b693df6d0f81b57c78fb6bca8 Mon Sep 17 00:00:00 2001 From: Gregory Nutt Date: Tue, 29 Apr 2014 11:32:33 -0600 Subject: Sourceforge patch #40. Fix some conditional logic in clock configuration. From Luciano Neri --- nuttx/ChangeLog | 6 ++++++ nuttx/arch/arm/src/sama5/sam_clockconfig.c | 12 +++++++++++- 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/nuttx/ChangeLog b/nuttx/ChangeLog index 508761b6c..7cf338fcc 100644 --- a/nuttx/ChangeLog +++ b/nuttx/ChangeLog @@ -7256,3 +7256,9 @@ CONFIG_ARCH_IRQPRIO is not defined (2014-4-25). 7.3 2014-xx-xx Gregory Nutt + + * arch/arm/src/sama5/sam_clockconfig.c: Needed function sam_pmcwait() + is needed when UDPHS, EHCI, or OHCI is configured but may not be + compiled in due to insufficient conditional logic. From Luciano Neri + (SourceForge patch #40). + diff --git a/nuttx/arch/arm/src/sama5/sam_clockconfig.c b/nuttx/arch/arm/src/sama5/sam_clockconfig.c index 099d5da92..739c3d527 100644 --- a/nuttx/arch/arm/src/sama5/sam_clockconfig.c +++ b/nuttx/arch/arm/src/sama5/sam_clockconfig.c @@ -65,6 +65,16 @@ # define NEED_PLLSETUP 1 #endif +/* Do we need to configure the UPLL */ + +#if !defined(CONFIG_SAMA5_EHCI) && !defined(CONFIG_SAMA5_OHCI) && \ + !defined(CONFIG_SAMA5_UDPHS) + + /* No... ignore the board setup */ + +# undef BOARD_USE_UPLL +#endif + /* Problems have been seen when reconfiguring the PLL while executing out * of NOR FLASH on CS0. In that case, we required RAM function support. The * critical functions will be copied from NOR into ISRAM for execution. This @@ -103,7 +113,7 @@ * ****************************************************************************/ -#if defined(NEED_PLLSETUP) +#if defined(NEED_PLLSETUP) || defined(BOARD_USE_UPLL) static void __ramfunc__ sam_pmcwait(uint32_t bit) { /* There is no timeout on this wait. Why not? Because the symptoms there -- cgit v1.2.3