summaryrefslogtreecommitdiff
path: root/drivers/remoteproc
diff options
context:
space:
mode:
authorSean Anderson <seanga2@gmail.com>2020-09-15 10:45:08 -0400
committerTom Rini <trini@konsulko.com>2020-09-30 08:53:40 -0400
commit44f1c38a32b21c00af435625ba8885f3dc008107 (patch)
treeb59933c79d78da6de6e646ddd9a80ce5a8bc1dcc /drivers/remoteproc
parentb608c54b522c04098ba34471beed214127672931 (diff)
downloadu-boot-44f1c38a32b21c00af435625ba8885f3dc008107.tar.gz
u-boot-44f1c38a32b21c00af435625ba8885f3dc008107.tar.bz2
u-boot-44f1c38a32b21c00af435625ba8885f3dc008107.zip
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 <seanga2@gmail.com> Tested-by: Patrick Delaunay <patrick.delaunay@st.com>
Diffstat (limited to 'drivers/remoteproc')
-rw-r--r--drivers/remoteproc/ti_k3_r5f_rproc.c24
1 files changed, 14 insertions, 10 deletions
diff --git a/drivers/remoteproc/ti_k3_r5f_rproc.c b/drivers/remoteproc/ti_k3_r5f_rproc.c
index 8e21a38be7..9332a63d21 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);