1
Add device awake calls in case of rproc boot and rproc shutdown path.
1
Add device awake calls in case of rproc boot and rproc shutdown path.
2
Currently, device awake call is only present in the recovery path
2
Currently, device awake call is only present in the recovery path
3
of remoteproc. If a user stops and starts rproc by using the sysfs
3
of remoteproc. If a user stops and starts rproc by using the sysfs
4
interface, then on pm suspension the firmware loading fails. Keep the
4
interface, then on pm suspension the firmware loading fails as the
5
device awake in such a case just like it is done for the recovery path.
5
request_firmware call under adsp_load returns failure. Add device
6
awake calls to fix this.
6
7
7
Fixes: a781e5aa59110 ("remoteproc: core: Prevent system suspend during remoteproc recovery")
8
Signed-off-by: Souradeep Chowdhury <quic_schowdhu@quicinc.com>
8
Signed-off-by: Souradeep Chowdhury <quic_schowdhu@quicinc.com>
9
Cc: stable@vger.kernel.org
10
---
9
---
11
Changes in v3
10
Changes in v4
12
11
13
*Add the stability mailing list in commit message
12
*Remove stability from mailing list
14
13
*Remove the extra tab in v3
15
drivers/remoteproc/remoteproc_core.c | 6 +++++-
14
*Change the commit description
16
1 file changed, 5 insertions(+), 1 deletion(-)
15
16
drivers/remoteproc/remoteproc_core.c | 4 ++++
17
1 file changed, 4 insertions(+)
17
18
18
diff --git a/drivers/remoteproc/remoteproc_core.c b/drivers/remoteproc/remoteproc_core.c
19
diff --git a/drivers/remoteproc/remoteproc_core.c b/drivers/remoteproc/remoteproc_core.c
19
index XXXXXXX..XXXXXXX 100644
20
index XXXXXXX..XXXXXXX 100644
20
--- a/drivers/remoteproc/remoteproc_core.c
21
--- a/drivers/remoteproc/remoteproc_core.c
21
+++ b/drivers/remoteproc/remoteproc_core.c
22
+++ b/drivers/remoteproc/remoteproc_core.c
22
@@ -XXX,XX +XXX,XX @@ int rproc_boot(struct rproc *rproc)
23
@@ -XXX,XX +XXX,XX @@ int rproc_boot(struct rproc *rproc)
23
        pr_err("invalid rproc handle\n");
24
        return -EINVAL;
24
        return -EINVAL;
25
    }
25
    }
26
-
26
27
+    
28
+    pm_stay_awake(rproc->dev.parent);
27
+    pm_stay_awake(rproc->dev.parent);
29
    dev = &rproc->dev;
28
    dev = &rproc->dev;
30
29
31
    ret = mutex_lock_interruptible(&rproc->lock);
30
    ret = mutex_lock_interruptible(&rproc->lock);
32
@@ -XXX,XX +XXX,XX @@ int rproc_boot(struct rproc *rproc)
31
@@ -XXX,XX +XXX,XX @@ int rproc_boot(struct rproc *rproc)
...
...
diff view generated by jsdifflib