Revert "nshlib: Move BOARDIOC_FINALINIT into nsh_initscript"

This reverts commit ac5632fc50.
This commit is contained in:
Xiang Xiao 2020-04-19 22:54:05 +08:00 committed by patacongo
parent 650b58d6b2
commit b1b45de3db
4 changed files with 18 additions and 6 deletions

View File

@ -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);

View File

@ -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);

View File

@ -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;

View File

@ -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 (; ; )