Skip to content

Commit 49cff12

Browse files
mathieupoirierandersson
authored andcommitted
Revert "remoteproc: Add support for runtime PM"
This reverts commit a99a37f. Removing PM runtime operations from the remoteproc core in order to: 1) Keep all power management operations in platform drivers. That way we do not loose flexibility in an area that is very HW specific. 2) Avoid making the support for remote processor managed by external entities more complex that it already is. 3) Fix regression introduced for the Omap remoteproc driver. Acked-by: Suman Anna <[email protected]> Tested-by: Suman Anna <[email protected]> Signed-off-by: Mathieu Poirier <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Bjorn Andersson <[email protected]>
1 parent 4605ad8 commit 49cff12

File tree

1 file changed

+1
-16
lines changed

1 file changed

+1
-16
lines changed

drivers/remoteproc/remoteproc_core.c

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@
2929
#include <linux/devcoredump.h>
3030
#include <linux/rculist.h>
3131
#include <linux/remoteproc.h>
32-
#include <linux/pm_runtime.h>
3332
#include <linux/iommu.h>
3433
#include <linux/idr.h>
3534
#include <linux/elf.h>
@@ -1383,12 +1382,6 @@ static int rproc_fw_boot(struct rproc *rproc, const struct firmware *fw)
13831382
if (ret)
13841383
return ret;
13851384

1386-
ret = pm_runtime_get_sync(dev);
1387-
if (ret < 0) {
1388-
dev_err(dev, "pm_runtime_get_sync failed: %d\n", ret);
1389-
return ret;
1390-
}
1391-
13921385
dev_info(dev, "Booting fw image %s, size %zd\n", name, fw->size);
13931386

13941387
/*
@@ -1398,7 +1391,7 @@ static int rproc_fw_boot(struct rproc *rproc, const struct firmware *fw)
13981391
ret = rproc_enable_iommu(rproc);
13991392
if (ret) {
14001393
dev_err(dev, "can't enable iommu: %d\n", ret);
1401-
goto put_pm_runtime;
1394+
return ret;
14021395
}
14031396

14041397
/* Prepare rproc for firmware loading if needed */
@@ -1452,8 +1445,6 @@ static int rproc_fw_boot(struct rproc *rproc, const struct firmware *fw)
14521445
rproc_unprepare_device(rproc);
14531446
disable_iommu:
14541447
rproc_disable_iommu(rproc);
1455-
put_pm_runtime:
1456-
pm_runtime_put(dev);
14571448
return ret;
14581449
}
14591450

@@ -1891,8 +1882,6 @@ void rproc_shutdown(struct rproc *rproc)
18911882

18921883
rproc_disable_iommu(rproc);
18931884

1894-
pm_runtime_put(dev);
1895-
18961885
/* Free the copy of the resource table */
18971886
kfree(rproc->cached_table);
18981887
rproc->cached_table = NULL;
@@ -2183,9 +2172,6 @@ struct rproc *rproc_alloc(struct device *dev, const char *name,
21832172

21842173
rproc->state = RPROC_OFFLINE;
21852174

2186-
pm_runtime_no_callbacks(&rproc->dev);
2187-
pm_runtime_enable(&rproc->dev);
2188-
21892175
return rproc;
21902176

21912177
put_device:
@@ -2205,7 +2191,6 @@ EXPORT_SYMBOL(rproc_alloc);
22052191
*/
22062192
void rproc_free(struct rproc *rproc)
22072193
{
2208-
pm_runtime_disable(&rproc->dev);
22092194
put_device(&rproc->dev);
22102195
}
22112196
EXPORT_SYMBOL(rproc_free);

0 commit comments

Comments
 (0)