You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by gn...@apache.org on 2020/04/19 16:15:31 UTC

[incubator-nuttx-apps] 01/02: Revert "nshlib: Move BOARDIOC_FINALINIT into nsh_initscript"

This is an automated email from the ASF dual-hosted git repository.

gnutt pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx-apps.git

commit b1b45de3db7ccfb706b8e2e9613afefd6ac963c3
Author: Xiang Xiao <xi...@xiaomi.com>
AuthorDate: Sun Apr 19 22:54:05 2020 +0800

    Revert "nshlib: Move BOARDIOC_FINALINIT into nsh_initscript"
    
    This reverts commit ac5632fc504f4e66b61131047326e78c16210d5c.
---
 nshlib/nsh_altconsole.c  | 6 ++++++
 nshlib/nsh_consolemain.c | 6 ++++++
 nshlib/nsh_script.c      | 6 ------
 nshlib/nsh_usbconsole.c  | 6 ++++++
 4 files changed, 18 insertions(+), 6 deletions(-)

diff --git a/nshlib/nsh_altconsole.c b/nshlib/nsh_altconsole.c
index c0570c7..b2c4a4c 100644
--- a/nshlib/nsh_altconsole.c
+++ b/nshlib/nsh_altconsole.c
@@ -294,6 +294,12 @@ int nsh_consolemain(int argc, FAR char *argv[])
   netinit_bringup();
 #endif
 
+#if defined(CONFIG_NSH_ARCHINIT) && defined(CONFIG_BOARDCTL_FINALINIT)
+  /* Perform architecture-specific final-initialization (if configured) */
+
+  boardctl(BOARDIOC_FINALINIT, 0);
+#endif
+
   /* First map stderr and stdout to alternative devices */
 
   ret = nsh_clone_console(pstate);
diff --git a/nshlib/nsh_consolemain.c b/nshlib/nsh_consolemain.c
index 59b5d7e..3c27581 100644
--- a/nshlib/nsh_consolemain.c
+++ b/nshlib/nsh_consolemain.c
@@ -104,6 +104,12 @@ int nsh_consolemain(int argc, FAR char *argv[])
   netinit_bringup();
 #endif
 
+#if defined(CONFIG_NSH_ARCHINIT) && defined(CONFIG_BOARDCTL_FINALINIT)
+  /* Perform architecture-specific final-initialization (if configured) */
+
+  boardctl(BOARDIOC_FINALINIT, 0);
+#endif
+
   /* Execute the session */
 
   ret = nsh_session(pstate, true);
diff --git a/nshlib/nsh_script.c b/nshlib/nsh_script.c
index 35231a3..740e0da 100644
--- a/nshlib/nsh_script.c
+++ b/nshlib/nsh_script.c
@@ -196,12 +196,6 @@ int nsh_initscript(FAR struct nsh_vtbl_s *vtbl)
 
       vtbl->np.np_flags = NSH_NP_SET_OPTIONS_INIT;
 #endif
-
-#if defined(CONFIG_NSH_ARCHINIT) && defined(CONFIG_BOARDCTL_FINALINIT)
-      /* Perform architecture-specific final-initialization (if configured) */
-
-      boardctl(BOARDIOC_FINALINIT, 0);
-#endif
     }
 
   return ret;
diff --git a/nshlib/nsh_usbconsole.c b/nshlib/nsh_usbconsole.c
index b018773..700a10f 100644
--- a/nshlib/nsh_usbconsole.c
+++ b/nshlib/nsh_usbconsole.c
@@ -326,6 +326,12 @@ int nsh_consolemain(int argc, FAR char *argv[])
   netinit_bringup();
 #endif
 
+#if defined(CONFIG_NSH_ARCHINIT) && defined(CONFIG_BOARDCTL_FINALINIT)
+  /* Perform architecture-specific final-initialization (if configured) */
+
+  boardctl(BOARDIOC_FINALINIT, 0);
+#endif
+
   /* Now loop, executing creating a session for each USB connection */
 
   for (; ; )