diff --git a/configs/nucleo-144/src/nucleo-144.h b/configs/nucleo-144/src/nucleo-144.h index 7a1ed4bf45..0bdf6e1f23 100644 --- a/configs/nucleo-144/src/nucleo-144.h +++ b/configs/nucleo-144/src/nucleo-144.h @@ -155,20 +155,6 @@ # define SDIO_MINOR 0 # endif - /* SD card bringup does not work if performed on the IDLE thread because it - * will cause waiting. Use either: - * - * CONFIG_LIB_BOARDCTL=y, OR - * CONFIG_BOARD_INITIALIZE=y && CONFIG_BOARD_INITTHREAD=y - */ - -# if defined(CONFIG_BOARD_INITIALIZE) && !defined(CONFIG_LIB_BOARDCTL) && \ - !defined(CONFIG_BOARD_INITTHREAD) -# warning SDIO initialization cannot be perfomed on the IDLE thread -# undef HAVE_SDIO -# endif -#endif - /* USB OTG FS * * PA9 OTG_FS_VBUS VBUS sensing (also connected to the green LED) diff --git a/configs/nucleo-l496zg/src/nucleo-144.h b/configs/nucleo-l496zg/src/nucleo-144.h index 728d38b1ba..6c006bde65 100644 --- a/configs/nucleo-l496zg/src/nucleo-144.h +++ b/configs/nucleo-l496zg/src/nucleo-144.h @@ -155,20 +155,6 @@ # define SDIO_MINOR 0 # endif - /* SD card bringup does not work if performed on the IDLE thread because it - * will cause waiting. Use either: - * - * CONFIG_LIB_BOARDCTL=y, OR - * CONFIG_BOARD_INITIALIZE=y && CONFIG_BOARD_INITTHREAD=y - */ - -# if defined(CONFIG_BOARD_INITIALIZE) && !defined(CONFIG_LIB_BOARDCTL) && \ - !defined(CONFIG_BOARD_INITTHREAD) -# warning SDIO initialization cannot be perfomed on the IDLE thread -# undef HAVE_SDIO -# endif -#endif - /* USB OTG FS * * PA9 OTG_FS_VBUS VBUS sensing (also connected to the green LED) diff --git a/configs/olimex-stm32-h407/src/olimex-stm32-h407.h b/configs/olimex-stm32-h407/src/olimex-stm32-h407.h index c2df0a8678..3e2f35ad55 100644 --- a/configs/olimex-stm32-h407/src/olimex-stm32-h407.h +++ b/configs/olimex-stm32-h407/src/olimex-stm32-h407.h @@ -115,20 +115,6 @@ # define SDIO_MINOR 0 # endif - /* SD card bringup does not work if performed on the IDLE thread because it - * will cause waiting. Use either: - * - * CONFIG_LIB_BOARDCTL=y, OR - * CONFIG_BOARD_INITIALIZE=y && CONFIG_BOARD_INITTHREAD=y - */ - -# if defined(CONFIG_BOARD_INITIALIZE) && !defined(CONFIG_LIB_BOARDCTL) && \ - !defined(CONFIG_BOARD_INITTHREAD) -# warning SDIO initialization cannot be perfomed on the IDLE thread -# undef HAVE_SDIO -# endif -#endif - /* Check if we can support the RTC driver */ #if !defined(CONFIG_RTC) || !defined(CONFIG_RTC_DRIVER) diff --git a/configs/olimex-stm32-p407/kelf/defconfig b/configs/olimex-stm32-p407/kelf/defconfig index 60d802e82a..c89a8728dc 100644 --- a/configs/olimex-stm32-p407/kelf/defconfig +++ b/configs/olimex-stm32-p407/kelf/defconfig @@ -9,7 +9,6 @@ CONFIG_ARMV7M_USEBASEPRI=y CONFIG_ARM_MPU=y CONFIG_BINFMT_CONSTRUCTORS=y CONFIG_BOARD_INITIALIZE=y -CONFIG_BOARD_INITTHREAD=y CONFIG_BOARD_LOOPSPERMSEC=16717 CONFIG_BUILD_PROTECTED=y CONFIG_DEV_LOWCONSOLE=y diff --git a/configs/olimex-stm32-p407/kmodule/defconfig b/configs/olimex-stm32-p407/kmodule/defconfig index 622a463bc6..849d180159 100644 --- a/configs/olimex-stm32-p407/kmodule/defconfig +++ b/configs/olimex-stm32-p407/kmodule/defconfig @@ -10,7 +10,6 @@ CONFIG_ARCH_STACKDUMP=y CONFIG_ARMV7M_USEBASEPRI=y CONFIG_ARM_MPU=y CONFIG_BOARD_INITIALIZE=y -CONFIG_BOARD_INITTHREAD=y CONFIG_BOARD_LOOPSPERMSEC=16717 CONFIG_BUILD_PROTECTED=y CONFIG_EXAMPLES_MODULE=y diff --git a/configs/sama5d4-ek/knsh/defconfig b/configs/sama5d4-ek/knsh/defconfig index f78969e733..9e4afa11b4 100644 --- a/configs/sama5d4-ek/knsh/defconfig +++ b/configs/sama5d4-ek/knsh/defconfig @@ -26,7 +26,6 @@ CONFIG_ARCH_TEXT_NPAGES=256 CONFIG_ARCH_TEXT_VBASE=0x80000000 CONFIG_ARMV7A_TOOLCHAIN_CODESOURCERYW=y CONFIG_BOARD_INITIALIZE=y -CONFIG_BOARD_INITTHREAD=y CONFIG_BOARD_LOOPSPERMSEC=65775 CONFIG_BOOT_RUNFROMSDRAM=y CONFIG_BUILD_KERNEL=y diff --git a/configs/stm32f4discovery/src/stm32f4discovery.h b/configs/stm32f4discovery/src/stm32f4discovery.h index 80c269039c..14fda19ff7 100644 --- a/configs/stm32f4discovery/src/stm32f4discovery.h +++ b/configs/stm32f4discovery/src/stm32f4discovery.h @@ -138,19 +138,6 @@ # define SDIO_MINOR 0 # endif - /* SD card bringup does not work if performed on the IDLE thread because it - * will cause waiting. Use either: - * - * CONFIG_LIB_BOARDCTL=y, OR - * CONFIG_BOARD_INITIALIZE=y && CONFIG_BOARD_INITTHREAD=y - */ - -# if defined(CONFIG_BOARD_INITIALIZE) && !defined(CONFIG_BOARD_INITTHREAD) -# warning "SDIO initialization cannot be perfomed on the IDLE thread" -# undef HAVE_SDIO -# endif -#endif - /* The CS43L22 depends on the CS43L22 driver, I2C1, and I2S3 support */ #if !defined(CONFIG_AUDIO_CS43L22) || !defined(CONFIG_STM32_I2C1) || \ diff --git a/sched/Kconfig b/sched/Kconfig index a37ab29526..16f1462aba 100644 --- a/sched/Kconfig +++ b/sched/Kconfig @@ -1175,20 +1175,14 @@ config BOARD_INITIALIZE phase may be used, for example, to initialize board-specific device drivers. -if BOARD_INITIALIZE - -config BOARD_INITTHREAD - bool "Board initialization thread" - default n - ---help--- Some initialization operations cannot be performed on the start-up, initialization thread. That is because the initialization thread - cannot wait for event. If waiting is required as part of the board - initialization then this option must be selected. Waiting may be - required, for example, to mount a file system or or initialize a - device such as an SD card. + cannot wait for event. Waiting may be required, for example, to + mount a file system or or initialize a device such as an SD card. + For this reason, board initialize will run on a temporary, internal + kernel thread. -if BOARD_INITTHREAD +if BOARD_INITIALIZE config BOARD_INITTHREAD_STACKSIZE int "Board initialization thread stack size" @@ -1206,7 +1200,6 @@ config BOARD_INITTHREAD_PRIORITY started until the board initialization is completed. Hence, there is very little competition for the CPU. -endif # BOARD_INITTHREAD endif # BOARD_INITIALIZE config SCHED_STARTHOOK diff --git a/sched/init/nx_bringup.c b/sched/init/nx_bringup.c index c9e9f0b61f..810775b1bd 100644 --- a/sched/init/nx_bringup.c +++ b/sched/init/nx_bringup.c @@ -336,15 +336,13 @@ static inline void nx_start_application(void) * ****************************************************************************/ -#ifdef CONFIG_BOARD_INITTHREAD -static int nx_start_task(int argc, FAR char **argv) +static inline int nx_start_task(int argc, FAR char **argv) { /* Do the board/application initialization and exit */ nx_start_application(); return OK; } -#endif /**************************************************************************** * Name: nx_create_initthread @@ -365,7 +363,6 @@ static int nx_start_task(int argc, FAR char **argv) static inline void nx_create_initthread(void) { -#ifdef CONFIG_BOARD_INITTHREAD int pid; /* Do the board/application initialization on a separate thread of @@ -377,12 +374,6 @@ static inline void nx_create_initthread(void) (main_t)nx_start_task, (FAR char * const *)NULL); DEBUGASSERT(pid > 0); UNUSED(pid); -#else - /* Do the board/application initialization on this thread of execution. */ - - nx_start_application(); - -#endif } /****************************************************************************