[PATCH] remoteproc: k3-r5: Add support for single cpu mode
Hari Nagalla
hnagalla at ti.com
Wed Aug 13 23:47:05 CEST 2025
Add early boot support for AM64 single cpu mode configuration.
In single CPU mode the 2nd core of the R5F cluster can't be used or
unavailable.
Signed-off-by: Hari Nagalla <hnagalla at ti.com>
---
logs: https://paste.sr.ht/~hnagalla/d8a941e1949c2558e10cf28bcb91c0dfa73ef037
drivers/remoteproc/ti_k3_r5f_rproc.c | 11 +++++++++--
1 file changed, 9 insertions(+), 2 deletions(-)
diff --git a/drivers/remoteproc/ti_k3_r5f_rproc.c b/drivers/remoteproc/ti_k3_r5f_rproc.c
index f4bab6868ee..2986e5ccad7 100644
--- a/drivers/remoteproc/ti_k3_r5f_rproc.c
+++ b/drivers/remoteproc/ti_k3_r5f_rproc.c
@@ -233,7 +233,7 @@ static int k3_r5f_prepare(struct udevice *dev)
dev_dbg(dev, "%s\n", __func__);
- if (cluster->mode == CLUSTER_MODE_LOCKSTEP)
+ if ((cluster->mode == CLUSTER_MODE_LOCKSTEP) || (cluster->mode == CLUSTER_MODE_SINGLECPU))
ret = k3_r5f_lockstep_release(cluster);
else
ret = k3_r5f_split_release(core);
@@ -269,6 +269,13 @@ static int k3_r5f_core_sanity_check(struct k3_r5f_core *core)
return -EINVAL;
}
+ if (cluster->mode == CLUSTER_MODE_SINGLECPU && !is_primary_core(core)) {
+ dev_err(core->dev,
+ "Invalid op: Trying to start secondary core %d in single CPU mode\n",
+ core->tsp.proc_id);
+ return -EINVAL;
+ }
+
if (cluster->mode == CLUSTER_MODE_SPLIT && !is_primary_core(core)) {
if (!core->cluster->cores[0]->in_use) {
dev_err(core->dev,
@@ -768,7 +775,7 @@ static void k3_r5f_core_adjust_tcm_sizes(struct k3_r5f_core *core)
{
struct k3_r5f_cluster *cluster = core->cluster;
- if (cluster->mode == CLUSTER_MODE_LOCKSTEP)
+ if ((cluster->mode == CLUSTER_MODE_LOCKSTEP) || (cluster->mode == CLUSTER_MODE_SINGLECPU))
return;
if (!core->ipdata->tcm_is_double)
--
2.34.1
More information about the U-Boot
mailing list