summaryrefslogtreecommitdiff
path: root/drivers/soc/imx
diff options
context:
space:
mode:
authorLeonard Crestez <leonard.crestez@nxp.com>2018-02-07 21:27:45 +0200
committerLeonard Crestez <leonard.crestez@nxp.com>2018-08-24 12:41:33 +0300
commit3af8d8d122e9636e42c0e15c7e2525be4537a102 (patch)
tree522c5c96130f4915d014edfbd637639e99c77329 /drivers/soc/imx
parent2123e05a56abd00917ac590bb0635df3002a045b (diff)
MLK-17623: imx8 scu: Explicitly make irq optional
The MU works just fine without interrupts because sc_call_rpc will poll waiting for a response. Make this explicit because it allows easier emulation for virtualization. The request_irq error is just reported but doesn't fail the probe, however failing to set that irq as a wake source is fatal. This was introduced recently: commit 3b20aa779f33 ("MLK-17072-1: soc: imx: sc: ipc: enable MU interrupt as wakeup source") Signed-off-by: Leonard Crestez <leonard.crestez@nxp.com> Acked-by: Peng Fan <peng.fan@nxp.com>
Diffstat (limited to 'drivers/soc/imx')
-rw-r--r--drivers/soc/imx/sc/main/ipc.c31
1 files changed, 18 insertions, 13 deletions
diff --git a/drivers/soc/imx/sc/main/ipc.c b/drivers/soc/imx/sc/main/ipc.c
index 40ddf2f229ac..55516d2880e4 100644
--- a/drivers/soc/imx/sc/main/ipc.c
+++ b/drivers/soc/imx/sc/main/ipc.c
@@ -287,7 +287,7 @@ static irqreturn_t imx8_scu_mu_isr(int irq, void *param)
int __init imx8_mu_init(void)
{
struct device_node *np;
- u32 irq;
+ int irq;
int err;
sc_err_t sciErr;
@@ -308,18 +308,23 @@ int __init imx8_mu_init(void)
irq = of_irq_get(np, 0);
- err = request_irq(irq, imx8_scu_mu_isr,
- IRQF_EARLY_RESUME, "imx8_mu_isr", NULL);
-
- if (err) {
- pr_info("imx8_mu_init :request_irq failed %d, err = %d\n", irq,
- err);
- }
-
- err = irq_set_irq_wake(irq, 1);
- if (err) {
- pr_info("set mu irq wake up error %d.\n", err);
- return err;
+ if (irq <= 0) {
+ /* SCU works just fine without irq */
+ pr_warn("imx8_mu_init: no irq: %d\n", irq);
+ } else {
+ err = request_irq(irq, imx8_scu_mu_isr,
+ IRQF_EARLY_RESUME, "imx8_mu_isr", NULL);
+ if (err) {
+ pr_err("imx8_mu_init: request_irq %d failed: %d\n",
+ irq, err);
+ return err;
+ }
+
+ err = irq_set_irq_wake(irq, 1);
+ if (err) {
+ pr_err("imx8mu_init: set_irq_wake failed: %d\n", err);
+ return err;
+ }
}
if (!scu_mu_init) {