Nishant, On Tue, Nov 30, 2010 at 01:49, Nishanth Menon <nm@xxxxxx> wrote: > From: Peter 'p2' De Schrijver <peter.de-schrijver@xxxxxxxxx> > > This disables L2 cache before invalidating it and reenables it afterwards. > This is be done according to ARM documentation. Currently this is identified > as being needed on OMAP3630 as the disable/enable is done from "public side" > while, on OMAP3430, this is done in the "secure side". > > [nm@xxxxxx: ported to 2.6.37-rc2, added hooks to enable the logic only on 3630] > Signed-off-by: Nishanth Menon <nm@xxxxxx> > Signed-off-by: Eduardo Valentin <eduardo.valentin@xxxxxxxxx> > Signed-off-by: Peter 'p2' De Schrijver <peter.de-schrijver@xxxxxxxxx> > --- > v2: rebased out to this series independent of HS bugfixes > v1: http://marc.info/?l=linux-omap&m=129013171125204&w=2 > > arch/arm/mach-omap2/pm.h | 6 ++++++ > arch/arm/mach-omap2/pm34xx.c | 3 +++ > arch/arm/mach-omap2/sleep34xx.S | 30 ++++++++++++++++++++++++++++++ > 3 files changed, 39 insertions(+), 0 deletions(-) > > diff --git a/arch/arm/mach-omap2/pm.h b/arch/arm/mach-omap2/pm.h > index 0d75bfd..aff39d0 100644 > --- a/arch/arm/mach-omap2/pm.h > +++ b/arch/arm/mach-omap2/pm.h > @@ -85,4 +85,10 @@ extern unsigned int save_secure_ram_context_sz; > extern unsigned int omap24xx_cpu_suspend_sz; > extern unsigned int omap34xx_cpu_suspend_sz; > > +#if defined(CONFIG_PM) > +extern void enable_omap3630_toggle_l2_on_restore(void); > +#else > +static inline void enable_omap3630_toggle_l2_on_restore(void) { } > +#endif > + > #endif > diff --git a/arch/arm/mach-omap2/pm34xx.c b/arch/arm/mach-omap2/pm34xx.c > index bd426cc..e0ade5f 100644 > --- a/arch/arm/mach-omap2/pm34xx.c > +++ b/arch/arm/mach-omap2/pm34xx.c > @@ -988,6 +988,9 @@ static void pm_errata_configure(void) > if (cpu_is_omap34xx()) { > if (cpu_is_omap3630()) > pm34xx_errata |= RTA_ERRATUM_i608; > + /* Enable the l2 cache toggling in sleep logic */ > + if (cpu_is_omap3630()) > + enable_omap3630_toggle_l2_on_restore(); This can simply be like this: ... ... - if (cpu_is_omap3630()) + if (cpu_is_omap3630()) { pm34xx_errata |= RTA_ERRATUM_i608; + /* Enable the l2 cache toggling in sleep logic */ + enable_omap3630_toggle_l2_on_restore(); + } ... ... > } > } > -- 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