summaryrefslogtreecommitdiffstats
path: root/drivers/soc/qcom/rpmh-rsc.c
diff options
context:
space:
mode:
authorAbel Vesa <abel.vesa@linaro.org>2022-11-16 12:22:46 +0100
committerBjorn Andersson <andersson@kernel.org>2022-12-05 22:12:17 +0100
commit323dc2dcdb503323097855174908b52d84477760 (patch)
tree3600e3a0d98798afe10c0d82275a773665c4ce9c /drivers/soc/qcom/rpmh-rsc.c
parentsoc: qcom: rpmh-rsc: Add support for RSC v3 register offsets (diff)
downloadlinux-323dc2dcdb503323097855174908b52d84477760.tar.xz
linux-323dc2dcdb503323097855174908b52d84477760.zip
soc: qcom: rpmh-rsc: Avoid unnecessary checks on irq-done response
The RSC interrupt is issued only after the request is complete. For fire-n-forget requests, the irq-done interrupt is sent after issuing the RPMH request and for response-required request, the interrupt is triggered only after all the requests are complete. These unnecessary checks in the interrupt handler issues AHB reads from a critical path. Lets remove them and clean up error handling in rpmh_request data structures. Co-developed-by: Lina Iyer <ilina@codeaurora.org> Signed-off-by: Lina Iyer <ilina@codeaurora.org> Signed-off-by: Abel Vesa <abel.vesa@linaro.org> Signed-off-by: Bjorn Andersson <andersson@kernel.org> Link: https://lore.kernel.org/r/20221116112246.2640648-2-abel.vesa@linaro.org
Diffstat (limited to 'drivers/soc/qcom/rpmh-rsc.c')
-rw-r--r--drivers/soc/qcom/rpmh-rsc.c22
1 files changed, 3 insertions, 19 deletions
diff --git a/drivers/soc/qcom/rpmh-rsc.c b/drivers/soc/qcom/rpmh-rsc.c
index cc24874d0a95..0f8b2249f889 100644
--- a/drivers/soc/qcom/rpmh-rsc.c
+++ b/drivers/soc/qcom/rpmh-rsc.c
@@ -439,10 +439,9 @@ static void enable_tcs_irq(struct rsc_drv *drv, int tcs_id, bool enable)
static irqreturn_t tcs_tx_done(int irq, void *p)
{
struct rsc_drv *drv = p;
- int i, j, err = 0;
+ int i;
unsigned long irq_status;
const struct tcs_request *req;
- struct tcs_cmd *cmd;
irq_status = readl_relaxed(drv->tcs_base + drv->regs[RSC_DRV_IRQ_STATUS]);
@@ -451,22 +450,7 @@ static irqreturn_t tcs_tx_done(int irq, void *p)
if (WARN_ON(!req))
goto skip;
- err = 0;
- for (j = 0; j < req->num_cmds; j++) {
- u32 sts;
-
- cmd = &req->cmds[j];
- sts = read_tcs_cmd(drv, drv->regs[RSC_DRV_CMD_STATUS], i, j);
- if (!(sts & CMD_STATUS_ISSUED) ||
- ((req->wait_for_compl || cmd->wait) &&
- !(sts & CMD_STATUS_COMPL))) {
- pr_err("Incomplete request: %s: addr=%#x data=%#x",
- drv->name, cmd->addr, cmd->data);
- err = -EIO;
- }
- }
-
- trace_rpmh_tx_done(drv, i, req, err);
+ trace_rpmh_tx_done(drv, i, req);
/*
* If wake tcs was re-purposed for sending active
@@ -491,7 +475,7 @@ skip:
spin_unlock(&drv->lock);
wake_up(&drv->tcs_wait);
if (req)
- rpmh_tx_done(req, err);
+ rpmh_tx_done(req);
}
return IRQ_HANDLED;