zephyr/dts/bindings/base/base.yaml
Ederson de Souza eeebb4d911 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>
2024-04-11 15:50:44 -04:00

101 lines
2.2 KiB
YAML

# Common fields for all devices
include: [pm.yaml]
properties:
status:
type: string
description: indicates the operational status of a device
enum:
- "ok" # Deprecated form
- "okay"
- "disabled"
- "reserved"
- "fail"
- "fail-sss"
compatible:
type: string-array
required: true
description: compatible strings
reg:
type: array
description: register space
reg-names:
type: string-array
description: name of each register space
interrupts:
type: array
description: interrupts for device
# Does not follow the 'type: phandle-array' scheme, but gets type-checked
# by the code. Declare it here just so that other bindings can make it
# 'required: true' easily if they want to.
interrupts-extended:
type: compound
description: extended interrupt specifier for device
interrupt-names:
type: string-array
description: name of each interrupt
interrupt-parent:
type: phandle
description: phandle to interrupt controller node
label:
type: string
deprecated: true
description: |
Human readable string describing the device (used as device_get_binding() argument)
clocks:
type: phandle-array
description: Clock gate information
clock-names:
type: string-array
description: name of each clock
"#address-cells":
type: int
description: number of address cells in reg property
"#size-cells":
type: int
description: number of size cells in reg property
dmas:
type: phandle-array
description: DMA channels specifiers
dma-names:
type: string-array
description: Provided names of DMA channel specifiers
io-channels:
type: phandle-array
description: IO channels specifiers
io-channel-names:
type: string-array
description: Provided names of IO channel specifiers
mboxes:
type: phandle-array
description: mailbox / IPM channels specifiers
specifier-space: mbox
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().