lib: utils: Add fdt_add_cpu_idle_states() helper function
authorSamuel Holland <samuel@sholland.org>
Mon, 23 Jan 2023 06:32:06 +0000 (00:32 -0600)
committerAnup Patel <anup@brainfault.org>
Tue, 24 Jan 2023 12:00:21 +0000 (17:30 +0530)
commit33bf9174602c900201481241e9ade31cf37fccd8
tree0e93c78764f1343b232d359391a72bd4cb53849d
parentdea0922f867f3d681ad3191fb562a082ea4a339f
lib: utils: Add fdt_add_cpu_idle_states() helper function

Since the availability and latency properties of CPU idle states depend
on the specific SBI HSM implementation, it is appropriate that the idle
states are added to the devicetree at runtime by that implementation.

This helper function adds a platform-provided array of idle states to
the devicetree, following the SBI idle state binding.

Reviewed-by: Anup Patel <anup@brainfault.org>
Signed-off-by: Samuel Holland <samuel@sholland.org>
include/sbi_utils/fdt/fdt_fixup.h
lib/utils/fdt/fdt_fixup.c