init: Move SECONDARY init level to the idle task.

Move SECONDARY init level from essential pseudo-fiber
to the idle task, so the device initialization routines
may use interrupts and wait for interrupts.

Change-Id: I5afa92d8b304de5b295450f0a8a761385b7c2566
Signed-off-by: Dmitriy Korovkin <dmitriy.korovkin@windriver.com>
This commit is contained in:
Dmitriy Korovkin 2015-12-21 11:25:23 -05:00 committed by Anas Nashif
commit e02a6fe585
2 changed files with 2 additions and 1 deletions

View file

@ -66,6 +66,7 @@ extern int _k_kernel_idle(void);
*/
void _main(void)
{
_sys_device_do_config_level(_SYS_INIT_LEVEL_SECONDARY);
_sys_device_do_config_level(_SYS_INIT_LEVEL_NANOKERNEL);
#ifdef CONFIG_BOOT_TIME_MEASUREMENT

View file

@ -101,6 +101,7 @@ char __noinit _interrupt_stack[CONFIG_ISR_STACK_SIZE];
*/
static void _main(void)
{
_sys_device_do_config_level(_SYS_INIT_LEVEL_SECONDARY);
_sys_device_do_config_level(_SYS_INIT_LEVEL_NANOKERNEL);
_sys_device_do_config_level(_SYS_INIT_LEVEL_APPLICATION);
@ -247,7 +248,6 @@ FUNC_NORETURN void _Cstart(void)
/* perform basic hardware initialization */
_sys_device_do_config_level(_SYS_INIT_LEVEL_PRIMARY);
_sys_device_do_config_level(_SYS_INIT_LEVEL_SECONDARY);
/*
* Initialize random number generator