kernel: Device deferred initialization
Currently, all devices are initialized at boot time (following their level and priority order). This patch introduces deferred initialization: by setting the property `zephyr,deferred-init` on a device on the devicetree, Zephyr will not initialized the device. To initialize such devices, one has to call `device_init()`. Deferred initialization is done by grouping all deferred devices on a different ELF section. In this way, there's no need to consume more memory to keep track of deferred devices. When `device_init()` is called, Zephyr will scan the deferred devices section and call the initialization function for the matching device. As this scanning is done only during deferred device initialization, its cost should be bearable. Signed-off-by: Ederson de Souza <ederson.desouza@intel.com>
This commit is contained in:
parent
eaa2c60220
commit
eeebb4d911
4 changed files with 111 additions and 25 deletions
|
@ -92,3 +92,9 @@ properties:
|
|||
mbox-names:
|
||||
type: string-array
|
||||
description: Provided names of mailbox / IPM channel specifiers
|
||||
|
||||
zephyr,deferred-init:
|
||||
type: boolean
|
||||
description: |
|
||||
Do not initialize device automatically on boot. Device should be manually
|
||||
initialized using device_init().
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue