summaryrefslogtreecommitdiff
path: root/nuttx/arch/arm/src/nuc1xx/nuc_clockconfig.c
diff options
context:
space:
mode:
Diffstat (limited to 'nuttx/arch/arm/src/nuc1xx/nuc_clockconfig.c')
-rw-r--r--nuttx/arch/arm/src/nuc1xx/nuc_clockconfig.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/nuttx/arch/arm/src/nuc1xx/nuc_clockconfig.c b/nuttx/arch/arm/src/nuc1xx/nuc_clockconfig.c
index 500856254..95e4332ce 100644
--- a/nuttx/arch/arm/src/nuc1xx/nuc_clockconfig.c
+++ b/nuttx/arch/arm/src/nuc1xx/nuc_clockconfig.c
@@ -125,10 +125,18 @@ void nuc_clockconfig(void)
nuc_unlock();
- /* Enable External 4~24 mhz high speed crystal */
+ /* Enable External 4~24 mhz high speed crystal (And other clocks if needed by
+ * other drivers).
+ */
regval = getreg32(NUC_CLK_PWRCON);
regval |= CLK_PWRCON_XTL12M_EN;
+#ifdef CONFIG_NUC_XTALLO
+ regval |= CLK_PWRCON_XTL32K_EN;
+#endif
+#ifdef CONFIG_NUC_INTHI
+ regval |= CLK_PWRCON_OSC22M_EN;
+#endif
putreg32(regval, NUC_CLK_PWRCON);
/* Delay to assure that crystal input to be stable */