diff options
author | Hou Zhiqiang <Zhiqiang.Hou@nxp.com> | 2024-08-01 11:59:47 +0800 |
---|---|---|
committer | Fabio Estevam <festevam@gmail.com> | 2024-08-02 15:16:51 -0300 |
commit | f2c306cd991a1c383de66ece1dd2301cd6b4b54b (patch) | |
tree | 058dd716742d6a78f0a08651c9720dc292d98638 /drivers/cpu | |
parent | 3cdcdcecac9062aa0255b90626840204dbf15961 (diff) | |
download | u-boot-f2c306cd991a1c383de66ece1dd2301cd6b4b54b.tar.gz u-boot-f2c306cd991a1c383de66ece1dd2301cd6b4b54b.tar.bz2 u-boot-f2c306cd991a1c383de66ece1dd2301cd6b4b54b.zip |
cpu: add release_core callback
Add a new callback release_core to the cpu_ops, which is used to
release a CPU core to run baremetal or RTOS application on a SoC
with multiple CPU cores.
Signed-off-by: Hou Zhiqiang <Zhiqiang.Hou@nxp.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'drivers/cpu')
-rw-r--r-- | drivers/cpu/cpu-uclass.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/cpu/cpu-uclass.c b/drivers/cpu/cpu-uclass.c index 16f8f2e521..2c8e46c05e 100644 --- a/drivers/cpu/cpu-uclass.c +++ b/drivers/cpu/cpu-uclass.c @@ -104,6 +104,16 @@ int cpu_get_vendor(const struct udevice *dev, char *buf, int size) return ops->get_vendor(dev, buf, size); } +int cpu_release_core(const struct udevice *dev, phys_addr_t addr) +{ + struct cpu_ops *ops = cpu_get_ops(dev); + + if (!ops->release_core) + return -ENOSYS; + + return ops->release_core(dev, addr); +} + U_BOOT_DRIVER(cpu_bus) = { .name = "cpu_bus", .id = UCLASS_SIMPLE_BUS, |