Squashed commit of the following:

sched/init/nx_start.c:  Add support for CONFIG_BOARD_DRIVER_INITIALIZE.  If this option is selected then nx_start() will call a board-provided function board_driver_initialize() immediately after calling up_initialize().

    Rename CONFIG_BOARD_INITIALIZE to CONFIG_BOARD_LATE_INITIALIZE.

    Raname board_initialize() to board_late_initialize()
This commit is contained in:
Gregory Nutt
2019-02-18 15:32:00 -06:00
parent 77aa1f1179
commit a76e137ce2
329 changed files with 1067 additions and 964 deletions
+8 -8
View File
@@ -245,12 +245,12 @@ static inline void nx_start_application(void)
{
int pid;
#ifdef CONFIG_BOARD_INITIALIZE
#ifdef CONFIG_BOARD_LATE_INITIALIZE
/* Perform any last-minute, board-specific initialization, if so
* configured.
*/
board_initialize();
board_late_initialize();
#endif
/* Start the application initialization task. In a flat build, this is
@@ -281,12 +281,12 @@ static inline void nx_start_application(void)
{
int ret;
#ifdef CONFIG_BOARD_INITIALIZE
#ifdef CONFIG_BOARD_LATE_INITIALIZE
/* Perform any last-minute, board-specific initialization, if so
* configured.
*/
board_initialize();
board_late_initialize();
#endif
#ifdef CONFIG_INIT_MOUNT
@@ -301,7 +301,7 @@ static inline void nx_start_application(void)
/* Start the application initialization program from a program in a
* mounted file system. Presumably the file system was mounted as part
* of the board_initialize() operation.
* of the board_late_initialize() operation.
*/
sinfo("Starting init task: %s\n", CONFIG_USER_INITPATH);
@@ -336,7 +336,7 @@ static inline void nx_start_application(void)
*
****************************************************************************/
#ifdef CONFIG_BOARD_INITIALIZE
#ifdef CONFIG_BOARD_LATE_INITIALIZE
static int nx_start_task(int argc, FAR char **argv)
{
/* Do the board/application initialization and exit */
@@ -365,7 +365,7 @@ static int nx_start_task(int argc, FAR char **argv)
static inline void nx_create_initthread(void)
{
#ifdef CONFIG_BOARD_INITIALIZE
#ifdef CONFIG_BOARD_LATE_INITIALIZE
int pid;
/* Do the board/application initialization on a separate thread of
@@ -412,7 +412,7 @@ static inline void nx_create_initthread(void)
* file system where we can expect to find the
* initialization program. Presumably, this file system
* was mounted by board-specific logic when
* board_initialize() was called.
* board_late_initialize() was called.
*
* Input Parameters:
* None
+9
View File
@@ -718,6 +718,15 @@ void nx_start(void)
up_initialize();
#ifdef CONFIG_BOARD_DRIVER_INITIALIZE
/* Call the board-specific up_initialize() extension to support
* early initialization of board-specific drivers and resources
* that cannot wait until board_late_initialize.
*/
board_driver_initialize();
#endif
/* Hardware resources are available */
g_nx_initstate = OSINIT_HARDWARE;