public inbox for linux-omap@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 08/12] update sram restore function
@ 2008-09-01 13:41 Rajendra Nayak
  2008-09-04  9:21 ` Kevin Hilman
  0 siblings, 1 reply; 2+ messages in thread
From: Rajendra Nayak @ 2008-09-01 13:41 UTC (permalink / raw)
  To: linux-omap

This patch updates the context restore function for sram

Signed-off-by: Rajendra Nayak <rnayak@ti.com>
---
 arch/arm/mach-omap2/pm34xx.c |   12 ++++++++----
 arch/arm/plat-omap/sram.c    |   10 +++++++---
 2 files changed, 15 insertions(+), 7 deletions(-)

Index: linux-omap-2.6/arch/arm/mach-omap2/pm34xx.c
===================================================================
--- linux-omap-2.6.orig/arch/arm/mach-omap2/pm34xx.c	2008-09-01
18:11:35.000000000 +0530
+++ linux-omap-2.6/arch/arm/mach-omap2/pm34xx.c	2008-09-01 18:11:54.000000000
+0530
@@ -50,7 +50,7 @@ struct power_state {

 static LIST_HEAD(pwrst_list);

-static void (*_omap_sram_idle)(u32 *addr, int save_state);
+void (*_omap_sram_idle)(u32 *addr, int save_state);

 static void (*saved_idle)(void);

@@ -798,6 +798,12 @@ static int __init pwrdms_setup(struct po
 	return set_pwrdm_state(pwrst->pwrdm, pwrst->next_state);
 }

+void omap_push_sram_idle()
+{
+	_omap_sram_idle = omap_sram_push(omap34xx_cpu_suspend,
+					omap34xx_cpu_suspend_sz);
+}
+
 int __init omap3_pm_init(void)
 {
 	struct power_state *pwrst;
@@ -835,9 +841,7 @@ int __init omap3_pm_init(void)
 	per_pwrdm = pwrdm_lookup("per_pwrdm");
 	core_pwrdm = pwrdm_lookup("core_pwrdm");

-	_omap_sram_idle = omap_sram_push(omap34xx_cpu_suspend,
-					omap34xx_cpu_suspend_sz);
-
+	omap_push_sram_idle();
 	suspend_set_ops(&omap_pm_ops);

 #ifndef CONFIG_CPU_IDLE
Index: linux-omap-2.6/arch/arm/plat-omap/sram.c
===================================================================
--- linux-omap-2.6.orig/arch/arm/plat-omap/sram.c	2008-09-01 18:11:28.000000000
+0530
+++ linux-omap-2.6/arch/arm/plat-omap/sram.c	2008-09-01 18:11:54.000000000 +0530
@@ -26,6 +26,7 @@
 #include <mach/board.h>

 #include <mach/control.h>
+#include <mach/pm.h>

 #if defined(CONFIG_ARCH_OMAP2) || defined(CONFIG_ARCH_OMAP3)
 # include "../mach-omap2/prm.h"
@@ -75,6 +76,8 @@ extern unsigned long omapfb_reserve_sram
 					 unsigned long sram_size,
 					 unsigned long pstart_avail,
 					 unsigned long size_avail);
+extern void (*_omap_sram_idle)(u32 *addr, int save_state);
+extern void omap_push_sram_idle();

 /*
  * Depending on the target RAMFS firewall setup, the public usable amount of
@@ -367,14 +370,14 @@ u32 omap3_configure_core_dpll(u32 sdrc_r
 					       sdrc_actim_ctrlb, m2);
  }

-/* REVISIT: Should this be same as omap34xx_sram_init() after off-idle? */
-void restore_sram_functions(void)
+void omap3_restore_sram_ctx(void)
 {
 	omap_sram_ceil = omap_sram_base + omap_sram_size;

 	_omap3_sram_configure_core_dpll =
 		omap_sram_push(omap3_sram_configure_core_dpll,
 			       omap3_sram_configure_core_dpll_sz);
+	omap_push_sram_idle();
 }

 int __init omap3_sram_init(void)
@@ -382,7 +385,8 @@ int __init omap3_sram_init(void)
 	_omap3_sram_configure_core_dpll =
 		omap_sram_push(omap3_sram_configure_core_dpll,
 			       omap3_sram_configure_core_dpll_sz);
-
+	_omap_sram_idle = omap_sram_push(omap34xx_cpu_suspend,
+				omap34xx_cpu_suspend_sz);
 	return 0;
 }
 #else



^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH 08/12] update sram restore function
  2008-09-01 13:41 [PATCH 08/12] update sram restore function Rajendra Nayak
@ 2008-09-04  9:21 ` Kevin Hilman
  0 siblings, 0 replies; 2+ messages in thread
From: Kevin Hilman @ 2008-09-04  9:21 UTC (permalink / raw)
  To: Rajendra Nayak; +Cc: linux-omap

"Rajendra Nayak" <rnayak@ti.com> writes:

> This patch updates the context restore function for sram
>
> Signed-off-by: Rajendra Nayak <rnayak@ti.com>
> ---
>  arch/arm/mach-omap2/pm34xx.c |   12 ++++++++----
>  arch/arm/plat-omap/sram.c    |   10 +++++++---
>  2 files changed, 15 insertions(+), 7 deletions(-)
>
> Index: linux-omap-2.6/arch/arm/mach-omap2/pm34xx.c
> ===================================================================
> --- linux-omap-2.6.orig/arch/arm/mach-omap2/pm34xx.c	2008-09-01
> 18:11:35.000000000 +0530
> +++ linux-omap-2.6/arch/arm/mach-omap2/pm34xx.c	2008-09-01 18:11:54.000000000
> +0530
> @@ -50,7 +50,7 @@ struct power_state {
>
>  static LIST_HEAD(pwrst_list);
>
> -static void (*_omap_sram_idle)(u32 *addr, int save_state);
> +void (*_omap_sram_idle)(u32 *addr, int save_state);

Why remove the static here?  This shouldn't need to be exposed if
omap_push_sram_idle() is exposed.

>  static void (*saved_idle)(void);
>
> @@ -798,6 +798,12 @@ static int __init pwrdms_setup(struct po
>  	return set_pwrdm_state(pwrst->pwrdm, pwrst->next_state);
>  }
>
> +void omap_push_sram_idle()
> +{
> +	_omap_sram_idle = omap_sram_push(omap34xx_cpu_suspend,
> +					omap34xx_cpu_suspend_sz);
> +}
> +
>  int __init omap3_pm_init(void)
>  {
>  	struct power_state *pwrst;
> @@ -835,9 +841,7 @@ int __init omap3_pm_init(void)
>  	per_pwrdm = pwrdm_lookup("per_pwrdm");
>  	core_pwrdm = pwrdm_lookup("core_pwrdm");
>
> -	_omap_sram_idle = omap_sram_push(omap34xx_cpu_suspend,
> -					omap34xx_cpu_suspend_sz);
> -
> +	omap_push_sram_idle();
>  	suspend_set_ops(&omap_pm_ops);
>
>  #ifndef CONFIG_CPU_IDLE
> Index: linux-omap-2.6/arch/arm/plat-omap/sram.c
> ===================================================================
> --- linux-omap-2.6.orig/arch/arm/plat-omap/sram.c	2008-09-01 18:11:28.000000000
> +0530
> +++ linux-omap-2.6/arch/arm/plat-omap/sram.c	2008-09-01 18:11:54.000000000 +0530
> @@ -26,6 +26,7 @@
>  #include <mach/board.h>
>
>  #include <mach/control.h>
> +#include <mach/pm.h>
>
>  #if defined(CONFIG_ARCH_OMAP2) || defined(CONFIG_ARCH_OMAP3)
>  # include "../mach-omap2/prm.h"
> @@ -75,6 +76,8 @@ extern unsigned long omapfb_reserve_sram
>  					 unsigned long sram_size,
>  					 unsigned long pstart_avail,
>  					 unsigned long size_avail);
> +extern void (*_omap_sram_idle)(u32 *addr, int save_state);
> +extern void omap_push_sram_idle();
>
>  /*
>   * Depending on the target RAMFS firewall setup, the public usable amount of
> @@ -367,14 +370,14 @@ u32 omap3_configure_core_dpll(u32 sdrc_r
>  					       sdrc_actim_ctrlb, m2);
>   }
>
> -/* REVISIT: Should this be same as omap34xx_sram_init() after off-idle? */
> -void restore_sram_functions(void)
> +void omap3_restore_sram_ctx(void)
>  {
>  	omap_sram_ceil = omap_sram_base + omap_sram_size;
>
>  	_omap3_sram_configure_core_dpll =
>  		omap_sram_push(omap3_sram_configure_core_dpll,
>  			       omap3_sram_configure_core_dpll_sz);
> +	omap_push_sram_idle();
>  }
>
>  int __init omap3_sram_init(void)
> @@ -382,7 +385,8 @@ int __init omap3_sram_init(void)
>  	_omap3_sram_configure_core_dpll =
>  		omap_sram_push(omap3_sram_configure_core_dpll,
>  			       omap3_sram_configure_core_dpll_sz);
> -
> +	_omap_sram_idle = omap_sram_push(omap34xx_cpu_suspend,
> +				omap34xx_cpu_suspend_sz);
>  	return 0;
>  }
>  #else

Why not omap_push_sram_idle() here?

>
> --
> 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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2008-09-04  9:21 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-09-01 13:41 [PATCH 08/12] update sram restore function Rajendra Nayak
2008-09-04  9:21 ` Kevin Hilman

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox