summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorHou Zhiqiang <Zhiqiang.Hou@nxp.com>2024-08-01 11:59:47 +0800
committerFabio Estevam <festevam@gmail.com>2024-08-02 15:16:51 -0300
commitf2c306cd991a1c383de66ece1dd2301cd6b4b54b (patch)
tree058dd716742d6a78f0a08651c9720dc292d98638 /include
parent3cdcdcecac9062aa0255b90626840204dbf15961 (diff)
downloadu-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 'include')
-rw-r--r--include/cpu.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/include/cpu.h b/include/cpu.h
index 2077ff3063..0018910d61 100644
--- a/include/cpu.h
+++ b/include/cpu.h
@@ -102,6 +102,15 @@ struct cpu_ops {
* if not.
*/
int (*is_current)(struct udevice *dev);
+
+ /**
+ * release_core() - Relase a CPU core to the given address to run application
+ *
+ * @dev: Device to check (UCLASS_CPU)
+ * @addr: Address to relese the CPU core
+ * @return 0 if OK, -ve on error
+ */
+ int (*release_core)(const struct udevice *dev, phys_addr_t addr);
};
#define cpu_get_ops(dev) ((struct cpu_ops *)(dev)->driver->ops)
@@ -164,4 +173,10 @@ int cpu_is_current(struct udevice *cpu);
*/
struct udevice *cpu_get_current_dev(void);
+/**
+ * cpu_release_core() - Relase a CPU core to the given address to run application
+ *
+ * @return 0 if OK, -ve on error
+ */
+int cpu_release_core(const struct udevice *dev, phys_addr_t addr);
#endif