* [U-Boot] [PATCH V3] OMAP5: reset: Use cold reset in case of 5430ES1.0
@ 2012-03-07 6:52 R Sricharan
2012-03-07 18:22 ` Menon, Nishanth
0 siblings, 1 reply; 4+ messages in thread
From: R Sricharan @ 2012-03-07 6:52 UTC (permalink / raw)
To: u-boot
Warm reset is not functional in case of omap5430ES1.0.
So use cold reset instead.
Signed-off-by: R Sricharan <r.sricharan@ti.com>
---
[v3]
Addressed Tom Rini's comments.<trini@ti.com>
arch/arm/cpu/armv7/omap-common/reset.S | 3 +++
arch/arm/cpu/armv7/omap5/hwinit.c | 15 +++++++++++++++
2 files changed, 18 insertions(+), 0 deletions(-)
diff --git a/arch/arm/cpu/armv7/omap-common/reset.S b/arch/arm/cpu/armv7/omap-common/reset.S
index 838b122..f2a522a 100644
--- a/arch/arm/cpu/armv7/omap-common/reset.S
+++ b/arch/arm/cpu/armv7/omap-common/reset.S
@@ -23,6 +23,8 @@
#include <config.h>
+#ifndef CONFIG_OMAP54XX
+.type reset_cpu, %function
.global reset_cpu
reset_cpu:
ldr r1, rstctl @ get addr for global reset
@@ -36,3 +38,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..d03e746 100644
--- a/arch/arm/cpu/armv7/omap5/hwinit.c
+++ b/arch/arm/cpu/armv7/omap5/hwinit.c
@@ -35,6 +35,7 @@
#include <asm/sizes.h>
#include <asm/utils.h>
#include <asm/arch/gpio.h>
+#include <linux/compiler.h>
DECLARE_GLOBAL_DATA_PTR;
@@ -160,3 +161,17 @@ void init_omap_revision(void)
*omap_si_rev = OMAP5430_SILICON_ID_INVALID;
}
}
+
+void __weak reset_cpu(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);
+}
--
1.7.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [U-Boot] [PATCH V3] OMAP5: reset: Use cold reset in case of 5430ES1.0
2012-03-07 6:52 [U-Boot] [PATCH V3] OMAP5: reset: Use cold reset in case of 5430ES1.0 R Sricharan
@ 2012-03-07 18:22 ` Menon, Nishanth
2012-03-07 18:45 ` Tom Rini
0 siblings, 1 reply; 4+ messages in thread
From: Menon, Nishanth @ 2012-03-07 18:22 UTC (permalink / raw)
To: u-boot
On Wed, Mar 7, 2012 at 00:52, R Sricharan <r.sricharan@ti.com> wrote:
> Warm reset is not functional in case of omap5430ES1.0.
> So use cold reset instead.
>
> Signed-off-by: R Sricharan <r.sricharan@ti.com>
> ---
> ?[v3]
> ? ? Addressed Tom Rini's comments.<trini@ti.com>
>
> ?arch/arm/cpu/armv7/omap-common/reset.S | ? ?3 +++
> ?arch/arm/cpu/armv7/omap5/hwinit.c ? ? ?| ? 15 +++++++++++++++
> ?2 files changed, 18 insertions(+), 0 deletions(-)
>
> diff --git a/arch/arm/cpu/armv7/omap-common/reset.S b/arch/arm/cpu/armv7/omap-common/reset.S
> index 838b122..f2a522a 100644
> --- a/arch/arm/cpu/armv7/omap-common/reset.S
> +++ b/arch/arm/cpu/armv7/omap-common/reset.S
> @@ -23,6 +23,8 @@
>
> ?#include <config.h>
>
> +#ifndef CONFIG_OMAP54XX
> +.type ?reset_cpu, %function
> ?.global reset_cpu
> ?reset_cpu:
> ? ? ? ?ldr ? ? r1, rstctl ? ? ? ? ? ? ? ? ? ? ?@ get addr for global reset
> @@ -36,3 +38,4 @@ rstctl:
> ? ? ? ?.word ? PRM_RSTCTRL
> ?rstbit:
> ? ? ? ?.word ? PRM_RSTCTRL_RESET
> +#endif
instead of doing the #ifdeffery, why not make this a C file with weak
and override it in omap5 as needed?
> diff --git a/arch/arm/cpu/armv7/omap5/hwinit.c b/arch/arm/cpu/armv7/omap5/hwinit.c
> index 7da7075..d03e746 100644
> --- a/arch/arm/cpu/armv7/omap5/hwinit.c
> +++ b/arch/arm/cpu/armv7/omap5/hwinit.c
> @@ -35,6 +35,7 @@
> ?#include <asm/sizes.h>
> ?#include <asm/utils.h>
> ?#include <asm/arch/gpio.h>
> +#include <linux/compiler.h>
>
> ?DECLARE_GLOBAL_DATA_PTR;
>
> @@ -160,3 +161,17 @@ void init_omap_revision(void)
> ? ? ? ? ? ? ? ?*omap_si_rev = OMAP5430_SILICON_ID_INVALID;
> ? ? ? ?}
> ?}
> +
> +void __weak reset_cpu(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);
> +}
Regards,
Nishanth Menon
^ permalink raw reply [flat|nested] 4+ messages in thread
* [U-Boot] [PATCH V3] OMAP5: reset: Use cold reset in case of 5430ES1.0
2012-03-07 18:22 ` Menon, Nishanth
@ 2012-03-07 18:45 ` Tom Rini
2012-03-08 5:49 ` Sricharan R
0 siblings, 1 reply; 4+ messages in thread
From: Tom Rini @ 2012-03-07 18:45 UTC (permalink / raw)
To: u-boot
On 03/07/2012 11:22 AM, Menon, Nishanth wrote:
> On Wed, Mar 7, 2012 at 00:52, R Sricharan<r.sricharan@ti.com> wrote:
>> Warm reset is not functional in case of omap5430ES1.0.
>> So use cold reset instead.
>>
>> Signed-off-by: R Sricharan<r.sricharan@ti.com>
>> ---
>> [v3]
>> Addressed Tom Rini's comments.<trini@ti.com>
>>
>> arch/arm/cpu/armv7/omap-common/reset.S | 3 +++
>> arch/arm/cpu/armv7/omap5/hwinit.c | 15 +++++++++++++++
>> 2 files changed, 18 insertions(+), 0 deletions(-)
>>
>> diff --git a/arch/arm/cpu/armv7/omap-common/reset.S b/arch/arm/cpu/armv7/omap-common/reset.S
>> index 838b122..f2a522a 100644
>> --- a/arch/arm/cpu/armv7/omap-common/reset.S
>> +++ b/arch/arm/cpu/armv7/omap-common/reset.S
>> @@ -23,6 +23,8 @@
>>
>> #include<config.h>
>>
>> +#ifndef CONFIG_OMAP54XX
>> +.type reset_cpu, %function
>> .global reset_cpu
>> reset_cpu:
>> ldr r1, rstctl @ get addr for global reset
>> @@ -36,3 +38,4 @@ rstctl:
>> .word PRM_RSTCTRL
>> rstbit:
>> .word PRM_RSTCTRL_RESET
>> +#endif
>
> instead of doing the #ifdeffery, why not make this a C file with weak
> and override it in omap5 as needed?
Agreed, thanks.
--
Tom
^ permalink raw reply [flat|nested] 4+ messages in thread
* [U-Boot] [PATCH V3] OMAP5: reset: Use cold reset in case of 5430ES1.0
2012-03-07 18:45 ` Tom Rini
@ 2012-03-08 5:49 ` Sricharan R
0 siblings, 0 replies; 4+ messages in thread
From: Sricharan R @ 2012-03-08 5:49 UTC (permalink / raw)
To: u-boot
Thanks,
Sricharan
> -----Original Message-----
> From: Tom Rini [mailto:trini at ti.com]
> Sent: Thursday, March 08, 2012 12:15 AM
> To: Menon, Nishanth
> Cc: R Sricharan; u-boot at lists.denx.de
> Subject: Re: [U-Boot] [PATCH V3] OMAP5: reset: Use cold reset in case
> of 5430ES1.0
>
> On 03/07/2012 11:22 AM, Menon, Nishanth wrote:
> > On Wed, Mar 7, 2012 at 00:52, R Sricharan<r.sricharan@ti.com> wrote:
> >> Warm reset is not functional in case of omap5430ES1.0.
> >> So use cold reset instead.
> >>
> >> Signed-off-by: R Sricharan<r.sricharan@ti.com>
> >> ---
> >> [v3]
> >> Addressed Tom Rini's comments.<trini@ti.com>
> >>
> >> arch/arm/cpu/armv7/omap-common/reset.S | 3 +++
> >> arch/arm/cpu/armv7/omap5/hwinit.c | 15 +++++++++++++++
> >> 2 files changed, 18 insertions(+), 0 deletions(-)
> >>
> >> diff --git a/arch/arm/cpu/armv7/omap-common/reset.S
> b/arch/arm/cpu/armv7/omap-common/reset.S
> >> index 838b122..f2a522a 100644
> >> --- a/arch/arm/cpu/armv7/omap-common/reset.S
> >> +++ b/arch/arm/cpu/armv7/omap-common/reset.S
> >> @@ -23,6 +23,8 @@
> >>
> >> #include<config.h>
> >>
> >> +#ifndef CONFIG_OMAP54XX
> >> +.type reset_cpu, %function
> >> .global reset_cpu
> >> reset_cpu:
> >> ldr r1, rstctl @ get addr for
> global reset
> >> @@ -36,3 +38,4 @@ rstctl:
> >> .word PRM_RSTCTRL
> >> rstbit:
> >> .word PRM_RSTCTRL_RESET
> >> +#endif
> >
> > instead of doing the #ifdeffery, why not make this a C file with weak
> > and override it in omap5 as needed?
>
> Agreed, thanks.
>
Ok. Will repost this one as well.
> --
> Tom
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2012-03-08 5:49 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-03-07 6:52 [U-Boot] [PATCH V3] OMAP5: reset: Use cold reset in case of 5430ES1.0 R Sricharan
2012-03-07 18:22 ` Menon, Nishanth
2012-03-07 18:45 ` Tom Rini
2012-03-08 5:49 ` Sricharan R
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox