summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGregory Nutt <gnutt@nuttx.org>2014-04-29 11:32:33 -0600
committerGregory Nutt <gnutt@nuttx.org>2014-04-29 11:32:33 -0600
commitcc98063965ac428b693df6d0f81b57c78fb6bca8 (patch)
treea4bfa76d5d2617282399da018e338db1fe4d661f
parent2daf1a660ea70ebebe3b7d62fb6f838679fa1ad7 (diff)
downloadnuttx-cc98063965ac428b693df6d0f81b57c78fb6bca8.tar.gz
nuttx-cc98063965ac428b693df6d0f81b57c78fb6bca8.tar.bz2
nuttx-cc98063965ac428b693df6d0f81b57c78fb6bca8.zip
Sourceforge patch #40. Fix some conditional logic in clock configuration. From Luciano Neri
-rw-r--r--nuttx/ChangeLog6
-rw-r--r--nuttx/arch/arm/src/sama5/sam_clockconfig.c12
2 files changed, 17 insertions, 1 deletions
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 <gnutt@nuttx.org>
+
+ * 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