init: Change _InitHardware() to be called from init system

Change the function signature of _InitHarware() function and rename
the function to a platform specific name now that it will be called
via a function pointer and not by name.

Call the platform *_init() function at PURE_INIT time.

Change-Id: I5168dfea81f406da135d491a2b4a24e8255f418a
Signed-off-by: Dirk Brandewie <dirk.j.brandewie@intel.com>
This commit is contained in:
Dirk Brandewie 2015-07-14 10:28:51 -07:00 committed by Anas Nashif
commit fce979ef3e
8 changed files with 43 additions and 21 deletions

View file

@ -105,10 +105,6 @@ char __noinit _interrupt_stack[CONFIG_ISR_STACK_SIZE];
extern void main(void);
/* hardware initialization routine provided by BSP */
extern void _InitHardware(void);
/* constructor initialization */
extern void _Ctors(void);
@ -184,7 +180,7 @@ static void nano_init(tCCS *dummyOutContext)
* handlers are installed into the interrupt table to catch spurious
* interrupts. This must be performed before other nanokernel subsystems
* install bonafide handlers, or before hardware device drivers are
* initialized (in the BSPs' _InitHardware).
* initialized.
*/
_IntLibInit();
@ -281,7 +277,6 @@ FUNC_NORETURN void _Cstart(void)
/* perform basic hardware initialization */
_InitHardware();
_sys_device_do_config_level(PURE_EARLY);
_sys_device_do_config_level(PURE_LATE);