ARM: mach-shmobile: Runtime PM V3
Magnus Damm
maintainerPATCH 1/1 ARM: mach-shmobile: Runtime PM V3
From: Magnus Damm <[email protected]>
This is the SH-Mobile ARM Runtime PM implementation V3. Only clocks are managed at this point. If Runtime PM is disabled then the clocks will be enabled before ->probe() and disabled after ->remove().
Signed-off-by Magnus Damm <[email protected]>
---
Depends on "Driver core: Add BUS_NOTIFY_BIND_DRIVER"
https://patchwork.kernel.org/patch/113865/
Changes since V2:
- make use of BUS_NOTIFY_BIND_DRIVER
- clean up runtime-pm-disabled using BUS_NOTIFY_UNBOUND_DRIVER
Changes since V1:
- use devres for per-device data
- support case of runtime pm disabled
arch/arm/mach-shmobile/Makefile | 2 arch/arm/mach-shmobile/clock-sh7372.c | 2 arch/arm/mach-shmobile/pm_runtime.c | 169 +++++++++++++++++++++++++++++++++ 3 files changed, 171 insertions(+), 2 deletions(-)
arch/arm/mach-shmobile/Makefile +1 -1
@@ -3,7 +3,7 @@ # # Common objects -obj-y := timer.o console.o clock.o +obj-y := timer.o console.o clock.o pm_runtime.o # CPU objects obj-$(CONFIG_ARCH_SH7367) += setup-sh7367.o clock-sh7367.o intc-sh7367.o
arch/arm/mach-shmobile/clock-sh7372.c +1 -1
@@ -274,7 +274,7 @@ static struct clk mstp_clks[MSTP_NR] = { [MSTP201] = MSTP(&div6_clks[DIV6_SUB], SMSTPCR2, 1, 0), /* SCIFA3 */ [MSTP200] = MSTP(&div6_clks[DIV6_SUB], SMSTPCR2, 0, 0), /* SCIFA4 */ [MSTP329] = MSTP(&r_clk, SMSTPCR3, 29, 0), /* CMT10 */ - [MSTP328] = MSTP(&div6_clks[DIV6_SPU], SMSTPCR3, 28, CLK_ENABLE_ON_INIT), /* FSIA */ + [MSTP328] = MSTP(&div6_clks[DIV6_SPU], SMSTPCR3, 28, 0), /* FSIA */ [MSTP323] = MSTP(&div6_clks[DIV6_SUB], SMSTPCR3, 23, 0), /* IIC1 */ [MSTP322] = MSTP(&div6_clks[DIV6_SUB], SMSTPCR3, 22, 0), /* USB0 */ [MSTP314] = MSTP(&div4_clks[DIV4_HP], SMSTPCR3, 14, 0), /* SDHI0 */
arch/arm/mach-shmobile/pm_runtime.c new file +169 -0
169 lines not on this page · raw message