summaryrefslogtreecommitdiff
path: root/nuttx
diff options
context:
space:
mode:
authorGregory Nutt <gnutt@nuttx.org>2013-10-30 18:11:54 -0600
committerGregory Nutt <gnutt@nuttx.org>2013-10-30 18:11:54 -0600
commitd83898e73cc26d5ae42e62f1d3a3abb9200f053a (patch)
tree19d38a59a00261c6bc50cfc60292df9bd5cc0620 /nuttx
parent942cded68b0097a90603cce7f1435e76432fb97c (diff)
downloadpx4-nuttx-d83898e73cc26d5ae42e62f1d3a3abb9200f053a.tar.gz
px4-nuttx-d83898e73cc26d5ae42e62f1d3a3abb9200f053a.tar.bz2
px4-nuttx-d83898e73cc26d5ae42e62f1d3a3abb9200f053a.zip
Missing file that I forgot to add in the last commit
Diffstat (limited to 'nuttx')
-rw-r--r--nuttx/configs/sama5d3x-ek/src/sam_boot.c27
-rw-r--r--nuttx/configs/sama5d3x-ek/src/sama5d3x-ek.h18
2 files changed, 45 insertions, 0 deletions
diff --git a/nuttx/configs/sama5d3x-ek/src/sam_boot.c b/nuttx/configs/sama5d3x-ek/src/sam_boot.c
index c57b7df06..a1efeeb98 100644
--- a/nuttx/configs/sama5d3x-ek/src/sam_boot.c
+++ b/nuttx/configs/sama5d3x-ek/src/sam_boot.c
@@ -121,3 +121,30 @@ void sam_boardinitialize(void)
up_ledinit();
#endif
}
+
+/****************************************************************************
+ * Name: board_initialize
+ *
+ * Description:
+ * If CONFIG_BOARD_INITIALIZE is selected, then an additional
+ * initialization call will be performed in the boot-up sequence to a
+ * function called board_initialize(). board_initialize() will be
+ * called immediately after up_intiialize() is called and just before the
+ * initial application is started. This additional initialization phase
+ * may be used, for example, to initialize board-specific device drivers.
+ *
+ ****************************************************************************/
+
+#ifdef CONFIG_BOARD_INITIALIZE
+void board_initialize(void)
+{
+ /* Perform NSH initialization here instead of from the NSH. This
+ * alternative NSH initialization is necessary when NSH is ran in user-space
+ * but the initialization function must run in kernel space.
+ */
+
+#if defined(CONFIG_NSH_LIBRARY) && !defined(CONFIG_NSH_ARCHINIT)
+ (void)nsh_archinitialize();
+#endif
+}
+#endif /* CONFIG_BOARD_INITIALIZE */
diff --git a/nuttx/configs/sama5d3x-ek/src/sama5d3x-ek.h b/nuttx/configs/sama5d3x-ek/src/sama5d3x-ek.h
index 14b1f5f02..655a2393a 100644
--- a/nuttx/configs/sama5d3x-ek/src/sama5d3x-ek.h
+++ b/nuttx/configs/sama5d3x-ek/src/sama5d3x-ek.h
@@ -654,6 +654,24 @@ void weak_function sam_netinitialize(void);
void up_ledinit(void);
#endif
+/************************************************************************************
+ * Name: nsh_archinitialize
+ *
+ * Description:
+ * Perform architecture specific initialization for NSH.
+ *
+ * CONFIG_NSH_ARCHINIT=y :
+ * Called from the NSH library
+ *
+ * CONFIG_BOARD_INITIALIZE=y, CONFIG_NSH_LIBRARY=y, && CONFIG_NSH_ARCHINIT=n :
+ * Called from board_initialize().
+ *
+ ************************************************************************************/
+
+#ifdef CONFIG_NSH_LIBRARY
+int nsh_archinitialize(void);
+#endif
+
#endif /* __ASSEMBLY__ */
#endif /* __CONFIGS_SAMA5D3X_EK_SRC_SAMA5D3X_EK_H */