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>
This commit is contained in:
committed by
Fabio Estevam
parent
3cdcdcecac
commit
f2c306cd99
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user