diff mbox

[03/13] OMAP2+: PM: clean up usage of SRAM functions

Message ID 1305739950-11695-4-git-send-email-j-pihet@ti.com (mailing list archive)
State New, archived
Headers show

Commit Message

Jean Pihet May 18, 2011, 5:32 p.m. UTC
From: Jean Pihet <j-pihet@ti.com>

Clean-up SRAM functions usage to better isolate PM code, in order
to allow it to be used as a module.

Signed-off-by: Jean Pihet <j-pihet@ti.com>
---
 arch/arm/mach-omap2/pm34xx.c |    1 +
 arch/arm/plat-omap/sram.c    |    2 --
 2 files changed, 1 insertions(+), 2 deletions(-)

Comments

Kevin Hilman May 26, 2011, 8:34 p.m. UTC | #1
jean.pihet@newoldbits.com writes:

> From: Jean Pihet <j-pihet@ti.com>
>
> Clean-up SRAM functions usage to better isolate PM code, in order
> to allow it to be used as a module.

Could use some more description as to why this is needed. e.g. SRAM code
is built-in, but PM code pushed to SRAM is module, etc...

> Signed-off-by: Jean Pihet <j-pihet@ti.com>
> ---
>  arch/arm/mach-omap2/pm34xx.c |    1 +
>  arch/arm/plat-omap/sram.c    |    2 --
>  2 files changed, 1 insertions(+), 2 deletions(-)
>
> diff --git a/arch/arm/mach-omap2/pm34xx.c b/arch/arm/mach-omap2/pm34xx.c
> index 0c5e3a4..74169a2 100644
> --- a/arch/arm/mach-omap2/pm34xx.c
> +++ b/arch/arm/mach-omap2/pm34xx.c
> @@ -456,6 +456,7 @@ void omap_sram_idle(void)
>  			omap3_core_restore_context();
>  			omap3_cm_restore_context();
>  			omap3_sram_restore_context();
> +			omap_push_sram_idle();
>  			omap2_sms_restore_context();
>  		}
>  		omap_uart_resume_idle(0);
> diff --git a/arch/arm/plat-omap/sram.c b/arch/arm/plat-omap/sram.c
> index a3f50b3..f1a54bb 100644
> --- a/arch/arm/plat-omap/sram.c
> +++ b/arch/arm/plat-omap/sram.c
> @@ -390,7 +390,6 @@ void omap3_sram_restore_context(void)
>  	_omap3_sram_configure_core_dpll =
>  		omap_sram_push(omap3_sram_configure_core_dpll,
>  			       omap3_sram_configure_core_dpll_sz);
> -	omap_push_sram_idle();

OK, this removal is replaced by the one above..

>  }
>  #endif /* CONFIG_PM */
>  
> @@ -399,7 +398,6 @@ static int __init omap34xx_sram_init(void)
>  	_omap3_sram_configure_core_dpll =
>  		omap_sram_push(omap3_sram_configure_core_dpll,
>  			       omap3_sram_configure_core_dpll_sz);
> -	omap_push_sram_idle();

what replaces this one, which happens at init time?

Looking closer at pm34xx, there's alrady a call in omap3_pm_init(), you
should make that clear in the changelog too, otherwise it's a red flag
to see two removals and only one addition.

Kevin

>  	return 0;
>  }
>  #else
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/arch/arm/mach-omap2/pm34xx.c b/arch/arm/mach-omap2/pm34xx.c
index 0c5e3a4..74169a2 100644
--- a/arch/arm/mach-omap2/pm34xx.c
+++ b/arch/arm/mach-omap2/pm34xx.c
@@ -456,6 +456,7 @@  void omap_sram_idle(void)
 			omap3_core_restore_context();
 			omap3_cm_restore_context();
 			omap3_sram_restore_context();
+			omap_push_sram_idle();
 			omap2_sms_restore_context();
 		}
 		omap_uart_resume_idle(0);
diff --git a/arch/arm/plat-omap/sram.c b/arch/arm/plat-omap/sram.c
index a3f50b3..f1a54bb 100644
--- a/arch/arm/plat-omap/sram.c
+++ b/arch/arm/plat-omap/sram.c
@@ -390,7 +390,6 @@  void omap3_sram_restore_context(void)
 	_omap3_sram_configure_core_dpll =
 		omap_sram_push(omap3_sram_configure_core_dpll,
 			       omap3_sram_configure_core_dpll_sz);
-	omap_push_sram_idle();
 }
 #endif /* CONFIG_PM */
 
@@ -399,7 +398,6 @@  static int __init omap34xx_sram_init(void)
 	_omap3_sram_configure_core_dpll =
 		omap_sram_push(omap3_sram_configure_core_dpll,
 			       omap3_sram_configure_core_dpll_sz);
-	omap_push_sram_idle();
 	return 0;
 }
 #else