init: Implement fine-grained initialization policy
Put initialization priorities as device driver Kconfig parameter. Initialization priority value for each platform is defined in the platform Kconfig file. Drivers and platform code use SYS_DEFINE_DEVICE to add and initialization function. Change-Id: I2f4f3c7370dac02408a1b50a0a1bade8b427a282 Signed-off-by: Dmitriy Korovkin <dmitriy.korovkin@windriver.com> Signed-off-by: Anas Nashif <anas.nashif@intel.com>
This commit is contained in:
parent
fb6de2d486
commit
57f2741e4f
66 changed files with 447 additions and 115 deletions
|
@ -103,25 +103,4 @@
|
|||
|
||||
#define SYS_GET_DEVICE(name) (&(_PASTE(__initconfig_, name)))
|
||||
|
||||
/* The following legacy APIs are provided for backwards compatibility */
|
||||
|
||||
#define pre_kernel_core_init(cfg, data) \
|
||||
SYS_DEFINE_DEVICE(cfg, data, PRIMARY, 0)
|
||||
#define pre_kernel_early_init(cfg, data) \
|
||||
SYS_DEFINE_DEVICE(cfg, data, SECONDARY, 0)
|
||||
#define pre_kernel_late_init(cfg, data) \
|
||||
SYS_DEFINE_DEVICE(cfg, data, SECONDARY, 50)
|
||||
#define nano_early_init(cfg, data) \
|
||||
SYS_DEFINE_DEVICE(cfg, data, NANOKERNEL, 0)
|
||||
#define nano_late_init(cfg, data) \
|
||||
SYS_DEFINE_DEVICE(cfg, data, NANOKERNEL, 50)
|
||||
#define micro_early_init(cfg, data) \
|
||||
SYS_DEFINE_DEVICE(cfg, data, MICROKERNEL, 0)
|
||||
#define micro_late_init(cfg, data) \
|
||||
SYS_DEFINE_DEVICE(cfg, data, MICROKERNEL, 50)
|
||||
#define app_early_init(cfg, data) \
|
||||
SYS_DEFINE_DEVICE(cfg, data, APPLICATION, 0)
|
||||
#define app_late_init(cfg, data) \
|
||||
SYS_DEFINE_DEVICE(cfg, data, APPLICATION, 50)
|
||||
|
||||
#endif /* _INIT_H_ */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue