dmaengine: rcar-dmac: PM-related cleanups
Subsystems (2)
Geert Uytterhoeven
maintainercover dmaengine: rcar-dmac: PM-related cleanups
Hi all,
This patch series contains various cleanups related to power management for the Renesas R-Car DMAC driver.
ARM64 platforms.
This has been tested on R-Car Gen2, Gen3, and Gen4.
Thanks for your comments!
Geert Uytterhoeven (2):
dmaengine: rcar-dmac: Remove dummy Runtime PM callback
dmaengine: rcar-dmac: Convert to NOIRQ_SYSTEM_SLEEP/RUNTIME_PM_OPS()
drivers/dma/sh/rcar-dmac.c | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-)
Signature · 12 lines
2.43.0
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus TorvaldsGeert Uytterhoeven
maintainerPATCH 1/2 dmaengine: rcar-dmac: Remove dummy Runtime PM callback
Since commit 63d00be69348fda4 ("PM: runtime: Allow unassigned ->runtime_suspend|resume callbacks"), unassigned .runtime_{suspend,resume}() callbacks are treated the same as dummy callbacks that just return zero.
--- drivers/dma/sh/rcar-dmac.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-)
drivers/dma/sh/rcar-dmac.c +1 -7
@@ -1729,11 +1729,6 @@ static struct dma_chan *rcar_dmac_of_xlate(struct of_phandle_args *dma_spec,*/ #ifdef CONFIG_PM -static int rcar_dmac_runtime_suspend (struct device *dev) -{ -return 0 ; -} -static int rcar_dmac_runtime_resume (struct device *dev) {struct rcar_dmac *dmac =dev_get_drvdata (dev);
@@ -1750,8 +1745,7 @@ static const struct dev_pm_ops rcar_dmac_pm = {*/ SET_NOIRQ_SYSTEM_SLEEP_PM_OPS (pm_runtime_force_suspend, pm_runtime_force_resume) -SET_RUNTIME_PM_OPS (rcar_dmac_runtime_suspend, rcar_dmac_runtime_resume, - NULL) + SET_RUNTIME_PM_OPS(NULL, rcar_dmac_runtime_resume, NULL) };/* -----------------------------------------------------------------------------
Signature · 1 line
2.43.0
Geert Uytterhoeven
maintainerPATCH 2/2 dmaengine: rcar-dmac: Convert to NOIRQ_SYSTEM_SLEEP/RUNTIME_PM_OPS()
In reply to Geert UytterhoevenConvert the Renesas R-Car DMA Controller driver from SET_NOIRQ_SYSTEM_SLEEP_PM_OPS() and SET_RUNTIME_PM_OPS() to NOIRQ_SYSTEM_SLEEP_PM_OPS(), RUNTIME_PM_OPS(), and pm_ptr(). This lets us drop the check for CONFIG_PM, and reduces kernel size in case CONFIG_PM is disabled, while increasing build coverage.
--- drivers/dma/sh/rcar-dmac.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-)
drivers/dma/sh/rcar-dmac.c +4 -6
@@ -1728,14 +1728,12 @@ static struct dma_chan *rcar_dmac_of_xlate(struct of_phandle_args *dma_spec,* Power management */ -#ifdef CONFIG_PM static int rcar_dmac_runtime_resume (struct device *dev) {struct rcar_dmac *dmac =dev_get_drvdata (dev);return rcar_dmac_init (dmac); } -#endif static const struct dev_pm_ops rcar_dmac_pm = {/*
@@ -1743,9 +1741,9 @@ static const struct dev_pm_ops rcar_dmac_pm = {* - Wait for the current transfer to complete and stop the device, * - Resume transfers, if any. */ -SET_NOIRQ_SYSTEM_SLEEP_PM_OPS (pm_runtime_force_suspend, - pm_runtime_force_resume) - SET_RUNTIME_PM_OPS(NULL, rcar_dmac_runtime_resume, NULL) +NOIRQ_SYSTEM_SLEEP_PM_OPS (pm_runtime_force_suspend, + pm_runtime_force_resume) + RUNTIME_PM_OPS(NULL, rcar_dmac_runtime_resume, NULL) };/* -----------------------------------------------------------------------------
@@ -2030,7 +2028,7 @@ MODULE_DEVICE_TABLE(of, rcar_dmac_of_ids);static struct platform_driver rcar_dmac_driver = { .driver = { - .pm = &rcar_dmac_pm, + .pm =pm_ptr (&rcar_dmac_pm), .name ="rcar-dmac" , .of_match_table = rcar_dmac_of_ids, },
Signature · 1 line
2.43.0
Quoted 9 lines · Geert Uytterhoeven
Hi all,
This patch series contains various cleanups related to power management for the Renesas R-Car DMAC driver.
ARM64 platforms.This has been tested on R-Car Gen2, Gen3, and Gen4.
[...]
Applied, thanks!
[1/2] dmaengine: rcar-dmac: Remove dummy Runtime PM callback
commit: b78c6286acd7ef93ddb064b5ad08b993eab33482
[2/2] dmaengine: rcar-dmac: Convert to NOIRQ_SYSTEM_SLEEP/RUNTIME_PM_OPS()
commit: c3c328d2383fa7f68ec93574152924cd8f5fe82cBest regards,
Signature · 1 line
~Vinod