Message ID | 1330612723-11328-19-git-send-email-r.sricharan@ti.com |
---|---|
State | Not Applicable |
Delegated to: | Tom Rini |
Headers | show |
On Thu, Mar 01, 2012 at 08:08:43PM +0530, R Sricharan wrote: > Warm reset is not functional in case of omap5430ES1.0. > So use cold reset instead. [snip] > --- a/arch/arm/cpu/armv7/omap-common/reset.S > +++ b/arch/arm/cpu/armv7/omap-common/reset.S > @@ -23,6 +23,7 @@ > > #include <config.h> > > +#ifndef CONFIG_OMAP54XX > .global reset_cpu As Aneesh shows in the THUMB2 support thread, there's directives to make ASM+weak work. Please use them. > +static void reset_cpu_omap5(ulong addr) Add <linux/compiler.h> and just call this 'void __weak reset_cpu(ulong addr)' Thanks!
diff --git a/arch/arm/cpu/armv7/omap-common/reset.S b/arch/arm/cpu/armv7/omap-common/reset.S index 838b122..3dce2a5 100644 --- a/arch/arm/cpu/armv7/omap-common/reset.S +++ b/arch/arm/cpu/armv7/omap-common/reset.S @@ -23,6 +23,7 @@ #include <config.h> +#ifndef CONFIG_OMAP54XX .global reset_cpu reset_cpu: ldr r1, rstctl @ get addr for global reset @@ -36,3 +37,4 @@ rstctl: .word PRM_RSTCTRL rstbit: .word PRM_RSTCTRL_RESET +#endif diff --git a/arch/arm/cpu/armv7/omap5/hwinit.c b/arch/arm/cpu/armv7/omap5/hwinit.c index 7da7075..a7c1996 100644 --- a/arch/arm/cpu/armv7/omap5/hwinit.c +++ b/arch/arm/cpu/armv7/omap5/hwinit.c @@ -160,3 +160,19 @@ void init_omap_revision(void) *omap_si_rev = OMAP5430_SILICON_ID_INVALID; } } + +static void reset_cpu_omap5(ulong addr) +{ + u32 omap_rev = omap_revision(); + + /* + * WARM reset is not functional in case of OMAP5430 ES1.0 soc. + * So use cold reset in case instead. + */ + if (omap_rev == OMAP5430_ES1_0) + writel(PRM_RSTCTRL_RESET << 0x1, PRM_RSTCTRL); + else + writel(PRM_RSTCTRL_RESET, PRM_RSTCTRL); +} +void reset_cpu(ulong addr) + __attribute__((weak, alias("reset_cpu_omap5")));
Warm reset is not functional in case of omap5430ES1.0. So use cold reset instead. Signed-off-by: R Sricharan <r.sricharan@ti.com> --- arch/arm/cpu/armv7/omap-common/reset.S | 2 ++ arch/arm/cpu/armv7/omap5/hwinit.c | 16 ++++++++++++++++ 2 files changed, 18 insertions(+), 0 deletions(-)