* [PATCH] omap3: pm: Use exported set_cr() instead of a custom one.
@ 2011-02-11 15:12 Santosh Shilimkar
2011-02-11 15:12 ` [PATCH] omap3: cpuidle: Add description field to each C-state Santosh Shilimkar
2011-02-15 0:08 ` [PATCH] omap3: pm: Use exported set_cr() instead of a custom one Kevin Hilman
0 siblings, 2 replies; 6+ messages in thread
From: Santosh Shilimkar @ 2011-02-11 15:12 UTC (permalink / raw)
To: linux-arm-kernel
Remove the custom restore_control_register() and use the exported
set_cr() instead to set the system control register(SCTRL) value.
No functional change.
Signed-off-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
Cc: Kevin Hilman <khilman@ti.com>
---
arch/arm/mach-omap2/pm34xx.c | 7 +------
1 files changed, 1 insertions(+), 6 deletions(-)
diff --git a/arch/arm/mach-omap2/pm34xx.c b/arch/arm/mach-omap2/pm34xx.c
index 2f864e4..63a3e1d 100644
--- a/arch/arm/mach-omap2/pm34xx.c
+++ b/arch/arm/mach-omap2/pm34xx.c
@@ -311,11 +311,6 @@ static irqreturn_t prcm_interrupt_handler (int irq, void *dev_id)
return IRQ_HANDLED;
}
-static void restore_control_register(u32 val)
-{
- __asm__ __volatile__ ("mcr p15, 0, %0, c1, c0, 0" : : "r" (val));
-}
-
/* Function to restore the table entry that was modified for enabling MMU */
static void restore_table_entry(void)
{
@@ -337,7 +332,7 @@ static void restore_table_entry(void)
control_reg_value = __raw_readl(scratchpad_address
+ OMAP343X_CONTROL_REG_VALUE_OFFSET);
/* This will enable caches and prediction */
- restore_control_register(control_reg_value);
+ set_cr(control_reg_value);
}
void omap_sram_idle(void)
--
1.6.0.4
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH] omap3: cpuidle: Add description field to each C-state.
2011-02-11 15:12 [PATCH] omap3: pm: Use exported set_cr() instead of a custom one Santosh Shilimkar
@ 2011-02-11 15:12 ` Santosh Shilimkar
2011-02-11 17:07 ` Jarkko Nikula
2011-03-04 1:41 ` Kevin Hilman
2011-02-15 0:08 ` [PATCH] omap3: pm: Use exported set_cr() instead of a custom one Kevin Hilman
1 sibling, 2 replies; 6+ messages in thread
From: Santosh Shilimkar @ 2011-02-11 15:12 UTC (permalink / raw)
To: linux-arm-kernel
Add a description field to each idle C-state. This helps to give
better data with PowerTop and one don't have to refer to the code
to link what Cx means from system point of view while analysing
PowerTop data.
No functional change.
Signed-off-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
Cc: Kevin Hilman <khilman@ti.com>
---
arch/arm/mach-omap2/cpuidle34xx.c | 9 +++++++++
1 files changed, 9 insertions(+), 0 deletions(-)
diff --git a/arch/arm/mach-omap2/cpuidle34xx.c b/arch/arm/mach-omap2/cpuidle34xx.c
index f7b22a1..3e4ec31 100644
--- a/arch/arm/mach-omap2/cpuidle34xx.c
+++ b/arch/arm/mach-omap2/cpuidle34xx.c
@@ -58,6 +58,7 @@ struct omap3_processor_cx {
u32 core_state;
u32 threshold;
u32 flags;
+ const char *desc;
};
struct omap3_processor_cx omap3_power_states[OMAP3_MAX_STATES];
@@ -365,6 +366,7 @@ void omap_init_power_states(void)
omap3_power_states[OMAP3_STATE_C1].mpu_state = PWRDM_POWER_ON;
omap3_power_states[OMAP3_STATE_C1].core_state = PWRDM_POWER_ON;
omap3_power_states[OMAP3_STATE_C1].flags = CPUIDLE_FLAG_TIME_VALID;
+ omap3_power_states[OMAP3_STATE_C1].desc = "MPU ON + CORE ON";
/* C2 . MPU WFI + Core inactive */
omap3_power_states[OMAP3_STATE_C2].valid =
@@ -380,6 +382,7 @@ void omap_init_power_states(void)
omap3_power_states[OMAP3_STATE_C2].core_state = PWRDM_POWER_ON;
omap3_power_states[OMAP3_STATE_C2].flags = CPUIDLE_FLAG_TIME_VALID |
CPUIDLE_FLAG_CHECK_BM;
+ omap3_power_states[OMAP3_STATE_C2].desc = "MPU ON + CORE ON";
/* C3 . MPU CSWR + Core inactive */
omap3_power_states[OMAP3_STATE_C3].valid =
@@ -395,6 +398,7 @@ void omap_init_power_states(void)
omap3_power_states[OMAP3_STATE_C3].core_state = PWRDM_POWER_ON;
omap3_power_states[OMAP3_STATE_C3].flags = CPUIDLE_FLAG_TIME_VALID |
CPUIDLE_FLAG_CHECK_BM;
+ omap3_power_states[OMAP3_STATE_C3].desc = "MPU RET + CORE ON";
/* C4 . MPU OFF + Core inactive */
omap3_power_states[OMAP3_STATE_C4].valid =
@@ -410,6 +414,7 @@ void omap_init_power_states(void)
omap3_power_states[OMAP3_STATE_C4].core_state = PWRDM_POWER_ON;
omap3_power_states[OMAP3_STATE_C4].flags = CPUIDLE_FLAG_TIME_VALID |
CPUIDLE_FLAG_CHECK_BM;
+ omap3_power_states[OMAP3_STATE_C4].desc = "MPU OFF + CORE ON";
/* C5 . MPU CSWR + Core CSWR*/
omap3_power_states[OMAP3_STATE_C5].valid =
@@ -425,6 +430,7 @@ void omap_init_power_states(void)
omap3_power_states[OMAP3_STATE_C5].core_state = PWRDM_POWER_RET;
omap3_power_states[OMAP3_STATE_C5].flags = CPUIDLE_FLAG_TIME_VALID |
CPUIDLE_FLAG_CHECK_BM;
+ omap3_power_states[OMAP3_STATE_C5].desc = "MPU RET + CORE RET";
/* C6 . MPU OFF + Core CSWR */
omap3_power_states[OMAP3_STATE_C6].valid =
@@ -440,6 +446,7 @@ void omap_init_power_states(void)
omap3_power_states[OMAP3_STATE_C6].core_state = PWRDM_POWER_RET;
omap3_power_states[OMAP3_STATE_C6].flags = CPUIDLE_FLAG_TIME_VALID |
CPUIDLE_FLAG_CHECK_BM;
+ omap3_power_states[OMAP3_STATE_C6].desc = "MPU OFF + CORE RET";
/* C7 . MPU OFF + Core OFF */
omap3_power_states[OMAP3_STATE_C7].valid =
@@ -455,6 +462,7 @@ void omap_init_power_states(void)
omap3_power_states[OMAP3_STATE_C7].core_state = PWRDM_POWER_OFF;
omap3_power_states[OMAP3_STATE_C7].flags = CPUIDLE_FLAG_TIME_VALID |
CPUIDLE_FLAG_CHECK_BM;
+ omap3_power_states[OMAP3_STATE_C7].desc = "MPU OFF + CORE OFF";
/*
* Erratum i583: implementation for ES rev < Es1.2 on 3630. We cannot
@@ -512,6 +520,7 @@ int __init omap3_idle_init(void)
if (cx->type == OMAP3_STATE_C1)
dev->safe_state = state;
sprintf(state->name, "C%d", count+1);
+ strncpy(state->desc, cx->desc, CPUIDLE_DESC_LEN);
count++;
}
--
1.6.0.4
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH] omap3: cpuidle: Add description field to each C-state.
2011-02-11 15:12 ` [PATCH] omap3: cpuidle: Add description field to each C-state Santosh Shilimkar
@ 2011-02-11 17:07 ` Jarkko Nikula
2011-02-12 7:42 ` Santosh Shilimkar
2011-03-04 1:41 ` Kevin Hilman
1 sibling, 1 reply; 6+ messages in thread
From: Jarkko Nikula @ 2011-02-11 17:07 UTC (permalink / raw)
To: linux-arm-kernel
On Fri, 11 Feb 2011 20:42:12 +0530
Santosh Shilimkar <santosh.shilimkar@ti.com> wrote:
> Add a description field to each idle C-state. This helps to give
> better data with PowerTop and one don't have to refer to the code
> to link what Cx means from system point of view while analysing
> PowerTop data.
>
> No functional change.
>
Out of curiosity what powertop version is required to get these handy
descriptions visible?
As I see these in /sys/devices/system/cpu/cpu0/cpuidle/stateX/desc it's
fair to give my tested by
Tested-by: Jarkko Nikula <jhnikula@gmail.com>
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH] omap3: cpuidle: Add description field to each C-state.
2011-02-11 17:07 ` Jarkko Nikula
@ 2011-02-12 7:42 ` Santosh Shilimkar
0 siblings, 0 replies; 6+ messages in thread
From: Santosh Shilimkar @ 2011-02-12 7:42 UTC (permalink / raw)
To: linux-arm-kernel
> -----Original Message-----
> From: Jarkko Nikula [mailto:jhnikula at gmail.com]
> Sent: Friday, February 11, 2011 10:37 PM
> To: Santosh Shilimkar
> Cc: linux-omap at vger.kernel.org; khilman at ti.com; linux-arm-
> kernel at lists.infradead.org
> Subject: Re: [PATCH] omap3: cpuidle: Add description field to each
> C-state.
>
> On Fri, 11 Feb 2011 20:42:12 +0530
> Santosh Shilimkar <santosh.shilimkar@ti.com> wrote:
>
> > Add a description field to each idle C-state. This helps to give
> > better data with PowerTop and one don't have to refer to the code
> > to link what Cx means from system point of view while analysing
> > PowerTop data.
> >
> > No functional change.
> >
> Out of curiosity what powertop version is required to get these
> handy descriptions visible?
>
It should work with most of the power Top version. I have a
older 1.13 version.
> As I see these in /sys/devices/system/cpu/cpu0/cpuidle/stateX/desc
> it's fair to give my tested by
>
> Tested-by: Jarkko Nikula <jhnikula@gmail.com>
Thanks !!
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH] omap3: cpuidle: Add description field to each C-state.
2011-02-11 15:12 ` [PATCH] omap3: cpuidle: Add description field to each C-state Santosh Shilimkar
2011-02-11 17:07 ` Jarkko Nikula
@ 2011-03-04 1:41 ` Kevin Hilman
1 sibling, 0 replies; 6+ messages in thread
From: Kevin Hilman @ 2011-03-04 1:41 UTC (permalink / raw)
To: linux-arm-kernel
On Fri, 2011-02-11 at 20:42 +0530, Santosh Shilimkar wrote:
> Add a description field to each idle C-state. This helps to give
> better data with PowerTop and one don't have to refer to the code
> to link what Cx means from system point of view while analysing
> PowerTop data.
>
> No functional change.
>
> Signed-off-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
> Cc: Kevin Hilman <khilman@ti.com>
Looks good, queuing for 2.6.39 (branch: for_2.6.39/pm-misc)
Kevin
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH] omap3: pm: Use exported set_cr() instead of a custom one.
2011-02-11 15:12 [PATCH] omap3: pm: Use exported set_cr() instead of a custom one Santosh Shilimkar
2011-02-11 15:12 ` [PATCH] omap3: cpuidle: Add description field to each C-state Santosh Shilimkar
@ 2011-02-15 0:08 ` Kevin Hilman
1 sibling, 0 replies; 6+ messages in thread
From: Kevin Hilman @ 2011-02-15 0:08 UTC (permalink / raw)
To: linux-arm-kernel
Santosh Shilimkar <santosh.shilimkar@ti.com> writes:
> Remove the custom restore_control_register() and use the exported
> set_cr() instead to set the system control register(SCTRL) value.
>
> No functional change.
>
> Signed-off-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
> Cc: Kevin Hilman <khilman@ti.com>
Tested/validated on ?
Kevin
> ---
> arch/arm/mach-omap2/pm34xx.c | 7 +------
> 1 files changed, 1 insertions(+), 6 deletions(-)
>
> diff --git a/arch/arm/mach-omap2/pm34xx.c b/arch/arm/mach-omap2/pm34xx.c
> index 2f864e4..63a3e1d 100644
> --- a/arch/arm/mach-omap2/pm34xx.c
> +++ b/arch/arm/mach-omap2/pm34xx.c
> @@ -311,11 +311,6 @@ static irqreturn_t prcm_interrupt_handler (int irq, void *dev_id)
> return IRQ_HANDLED;
> }
>
> -static void restore_control_register(u32 val)
> -{
> - __asm__ __volatile__ ("mcr p15, 0, %0, c1, c0, 0" : : "r" (val));
> -}
> -
> /* Function to restore the table entry that was modified for enabling MMU */
> static void restore_table_entry(void)
> {
> @@ -337,7 +332,7 @@ static void restore_table_entry(void)
> control_reg_value = __raw_readl(scratchpad_address
> + OMAP343X_CONTROL_REG_VALUE_OFFSET);
> /* This will enable caches and prediction */
> - restore_control_register(control_reg_value);
> + set_cr(control_reg_value);
> }
>
> void omap_sram_idle(void)
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2011-03-04 1:41 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-02-11 15:12 [PATCH] omap3: pm: Use exported set_cr() instead of a custom one Santosh Shilimkar
2011-02-11 15:12 ` [PATCH] omap3: cpuidle: Add description field to each C-state Santosh Shilimkar
2011-02-11 17:07 ` Jarkko Nikula
2011-02-12 7:42 ` Santosh Shilimkar
2011-03-04 1:41 ` Kevin Hilman
2011-02-15 0:08 ` [PATCH] omap3: pm: Use exported set_cr() instead of a custom one Kevin Hilman
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).