From 44f1c38a32b21c00af435625ba8885f3dc008107 Mon Sep 17 00:00:00 2001 From: Sean Anderson Date: Tue, 15 Sep 2020 10:45:08 -0400 Subject: [PATCH] remoteproc: k3-r5: Fix not calling dev_xxx with a device Usually we can get a device from the current core, but some dev_dbg calls have been converted to debug, since we are called on a cluster. Signed-off-by: Sean Anderson Tested-by: Patrick Delaunay --- drivers/remoteproc/ti_k3_r5f_rproc.c | 24 ++++++++++++++---------- 1 file changed, 14 insertions(+), 10 deletions(-) diff --git a/drivers/remoteproc/ti_k3_r5f_rproc.c b/drivers/remoteproc/ti_k3_r5f_rproc.c index 8e21a38..9332a63 100644 --- a/drivers/remoteproc/ti_k3_r5f_rproc.c +++ b/drivers/remoteproc/ti_k3_r5f_rproc.c @@ -165,7 +165,7 @@ static int k3_r5f_lockstep_release(struct k3_r5f_cluster *cluster) { int ret, c; - dev_dbg(dev, "%s\n", __func__); + debug("%s\n", __func__); for (c = NR_CORES - 1; c >= 0; c--) { ret = ti_sci_proc_power_domain_on(&cluster->cores[c]->tsp); @@ -201,7 +201,7 @@ static int k3_r5f_split_release(struct k3_r5f_core *core) { int ret; - dev_dbg(dev, "%s\n", __func__); + dev_dbg(core->dev, "%s\n", __func__); ret = ti_sci_proc_power_domain_on(&core->tsp); if (ret) { @@ -246,25 +246,29 @@ static int k3_r5f_core_sanity_check(struct k3_r5f_core *core) struct k3_r5f_cluster *cluster = core->cluster; if (core->in_use) { - dev_err(dev, "Invalid op: Trying to load/start on already running core %d\n", + dev_err(core->dev, + "Invalid op: Trying to load/start on already running core %d\n", core->tsp.proc_id); return -EINVAL; } if (cluster->mode == CLUSTER_MODE_LOCKSTEP && !cluster->cores[1]) { - printf("Secondary core is not probed in this cluster\n"); + dev_err(core->dev, + "Secondary core is not probed in this cluster\n"); return -EAGAIN; } if (cluster->mode == CLUSTER_MODE_LOCKSTEP && !is_primary_core(core)) { - dev_err(dev, "Invalid op: Trying to start secondary core %d in lockstep mode\n", + dev_err(core->dev, + "Invalid op: Trying to start secondary core %d in lockstep 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(dev, "Invalid seq: Enable primary core before loading secondary core\n"); + dev_err(core->dev, + "Invalid seq: Enable primary core before loading secondary core\n"); return -EINVAL; } } @@ -432,7 +436,7 @@ static int k3_r5f_split_reset(struct k3_r5f_core *core) { int ret; - dev_dbg(dev, "%s\n", __func__); + dev_dbg(core->dev, "%s\n", __func__); if (reset_assert(&core->reset)) ret = -EINVAL; @@ -447,7 +451,7 @@ static int k3_r5f_lockstep_reset(struct k3_r5f_cluster *cluster) { int ret = 0, c; - dev_dbg(dev, "%s\n", __func__); + debug("%s\n", __func__); for (c = 0; c < NR_CORES; c++) if (reset_assert(&cluster->cores[c]->reset)) @@ -579,7 +583,7 @@ static int k3_r5f_rproc_configure(struct k3_r5f_core *core) u64 boot_vec = 0; int ret; - dev_dbg(dev, "%s\n", __func__); + dev_dbg(core->dev, "%s\n", __func__); ret = ti_sci_proc_request(&core->tsp); if (ret < 0) @@ -672,7 +676,7 @@ static int k3_r5f_of_to_priv(struct k3_r5f_core *core) { int ret; - dev_dbg(dev, "%s\n", __func__); + dev_dbg(core->dev, "%s\n", __func__); core->atcm_enable = dev_read_u32_default(core->dev, "atcm-enable", 0); core->btcm_enable = dev_read_u32_default(core->dev, "btcm-enable", 1); -- 2.7.4