[PATCH 5/5] Add hooks to PM layer and clock tree for PM counters

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Signed-off-by: Peter 'p2' De Schrijver <peter.de-schrijver@xxxxxxxxx>
---
 arch/arm/mach-omap2/clock.c       |    3 ++-
 arch/arm/mach-omap2/clockdomain.c |    4 ++--
 arch/arm/mach-omap2/pm34xx.c      |   10 +++++-----
 3 files changed, 9 insertions(+), 8 deletions(-)

diff --git a/arch/arm/mach-omap2/clock.c b/arch/arm/mach-omap2/clock.c
index d0006c4..1c94c02 100644
--- a/arch/arm/mach-omap2/clock.c
+++ b/arch/arm/mach-omap2/clock.c
@@ -1028,6 +1028,7 @@ void omap2_clk_disable_unused(struct clk *clk)
 
 	printk(KERN_INFO "Disabling unused clock \"%s\"\n", clk->name);
 	_omap2_clk_disable(clk);
-	pm_dbg_clk_state_switch(clk);
+	if (clk->clkdm.ptr != NULL)
+		pwrdm_clkdm_state_switch(clk->clkdm.ptr);
 }
 #endif
diff --git a/arch/arm/mach-omap2/clockdomain.c b/arch/arm/mach-omap2/clockdomain.c
index 9670ed1..74e0817 100644
--- a/arch/arm/mach-omap2/clockdomain.c
+++ b/arch/arm/mach-omap2/clockdomain.c
@@ -569,7 +569,7 @@ int omap2_clkdm_clk_enable(struct clockdomain *clkdm, struct clk *clk)
 	else
 		omap2_clkdm_wakeup(clkdm);
 
-	pm_dbg_clkdm_state_switch(clkdm);
+	pwrdm_clkdm_state_switch(clkdm);
 
 	return 0;
 }
@@ -622,7 +622,7 @@ int omap2_clkdm_clk_disable(struct clockdomain *clkdm, struct clk *clk)
 	else
 		omap2_clkdm_sleep(clkdm);
 
-	pm_dbg_clkdm_state_switch(clkdm);
+	pwrdm_clkdm_state_switch(clkdm);
 
 	return 0;
 }
diff --git a/arch/arm/mach-omap2/pm34xx.c b/arch/arm/mach-omap2/pm34xx.c
index 1b0272d..a2fa210 100644
--- a/arch/arm/mach-omap2/pm34xx.c
+++ b/arch/arm/mach-omap2/pm34xx.c
@@ -279,7 +279,7 @@ void omap_sram_idle(void)
 	disable_smartreflex(SR1);
 	disable_smartreflex(SR2);
 
-	pm_dbg_pre_suspend();
+	pwrdm_pre_suspend();
 
 	/* NEON control */
 	if (pwrdm_read_pwrst(neon_pwrdm) == PWRDM_POWER_ON)
@@ -362,7 +362,7 @@ void omap_sram_idle(void)
 	enable_smartreflex(SR1);
 	enable_smartreflex(SR2);
 
-	pm_dbg_post_suspend();
+	pwrdm_post_suspend();
 }
 
 /*
@@ -472,7 +472,7 @@ int set_pwrdm_state(struct powerdomain *pwrdm, u32 state)
 	if (sleep_switch) {
 		cm_rmw_mod_reg_bits(0x3, 0x3, pwrdm->prcm_offs, 0x48);
 		pwrdm_wait_transition(pwrdm);
-		pm_dbg_pwrdm_state_switch(pwrdm);
+		pwrdm_state_switch(pwrdm);
 	}
 
 err:
@@ -795,7 +795,7 @@ static ssize_t state_store(struct kobject *kobj, struct kobj_attribute *attr,
 	return n;
 }
 
-static int __init pwrdms_setup(struct powerdomain *pwrdm)
+static int __init pwrdms_setup(struct powerdomain *pwrdm, void *user)
 {
 	struct power_state *pwrst;
 	struct kobj_attribute *attr;
@@ -874,7 +874,7 @@ int __init omap3_pm_init(void)
 		goto err2;
 	}
 
-	ret = pwrdm_for_each(pwrdms_setup);
+	ret = pwrdm_for_each(pwrdms_setup, NULL);
 	if (ret) {
 		printk(KERN_ERR "Failed to setup powerdomains\n");
 		goto err2;
-- 
1.5.6.3

--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Arm (vger)]     [ARM Kernel]     [ARM MSM]     [Linux Tegra]     [Linux WPAN Networking]     [Linux Wireless Networking]     [Maemo Users]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux