ARM: mach-shmobile: Runtime PM prototype V2
Subsystems (5)
Magnus Damm
maintainerRFC PATCH 1/1 ARM: mach-shmobile: Runtime PM prototype V2
From: Magnus Damm <[email protected]>
This is V2 of the SH-Mobile ARM Runtime PM prototype. Only clocks are managed at this point. New in V2 is per-device data using devres. This unfortunately needs a small workaround, if the devres approach looks ok then I'll submit code to remove the WARN_ON in dd.c.
Signed-off-by Magnus Damm <[email protected]>
---
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 | 157 +++++++++++++++++++++++++++++++++ drivers/base/dd.c | 2 4 files changed, 160 insertions(+), 3 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 +157 -0
157 lines not on this page · raw message
drivers/base/dd.c +1 -1
@@ -108,7 +108,7 @@ static int really_probe(struct device *datomic_inc (&probe_count);pr_debug ("bus: '%s': %s: probing driver %s with device %s\n" , drv->bus->name, __func__, drv->name,dev_name (dev)); -WARN_ON (!list_empty (&dev->devres_head)); +//WARN_ON(!list_empty(&dev->devres_head)); dev->driver = drv;if (driver_sysfs_add (dev)) {