forked from OERV-BSP/u-boot
remoteproc: k3-r5: Add support for single cpu mode
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@ti.com>
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user