* how to use head_fsl_booke.S:abort to restart
@ 2008-03-25 16:15 Philippe De Muyter
2008-03-25 16:34 ` Haiying Wang
0 siblings, 1 reply; 5+ messages in thread
From: Philippe De Muyter @ 2008-03-25 16:15 UTC (permalink / raw)
To: linuxppc-dev
Hi all,
I have a mpc8540 board that could reboot when driven by a ARCH=ppc linux,
but that hangs now in arch/powerpc/sysdev/fsl_soc.c:fsl_rstcr_restart when
asked to reboot with a ARCH=powerpc linux.
I have found that if I call arch/powerpc/kernel/head_fsl_booke.S:abort from
there, my board reboots correctly, but I feel that's not the right place
to put that call. Where/how should I do that ?
Philippe
PS : Does arch/powerpc/sysdev/fsl_soc.c:fsl_rstcr_restart actually work
for mpc8540_ads boards ?
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: how to use head_fsl_booke.S:abort to restart
2008-03-25 16:15 how to use head_fsl_booke.S:abort to restart Philippe De Muyter
@ 2008-03-25 16:34 ` Haiying Wang
2008-03-25 20:20 ` Philippe De Muyter
0 siblings, 1 reply; 5+ messages in thread
From: Haiying Wang @ 2008-03-25 16:34 UTC (permalink / raw)
To: Philippe De Muyter; +Cc: linuxppc-dev
8540 doesn't have RSTCR register. You should not use fsl_rstcr_restart
for reboot your 8540 board.
Haiying
On Tue, 2008-03-25 at 17:15 +0100, Philippe De Muyter wrote:
> Hi all,
>
> I have a mpc8540 board that could reboot when driven by a ARCH=ppc linux,
> but that hangs now in arch/powerpc/sysdev/fsl_soc.c:fsl_rstcr_restart when
> asked to reboot with a ARCH=powerpc linux.
>
> I have found that if I call arch/powerpc/kernel/head_fsl_booke.S:abort from
> there, my board reboots correctly, but I feel that's not the right place
> to put that call. Where/how should I do that ?
>
> Philippe
>
> PS : Does arch/powerpc/sysdev/fsl_soc.c:fsl_rstcr_restart actually work
> for mpc8540_ads boards ?
> _______________________________________________
> Linuxppc-dev mailing list
> Linuxppc-dev@ozlabs.org
> https://ozlabs.org/mailman/listinfo/linuxppc-dev
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: how to use head_fsl_booke.S:abort to restart
2008-03-25 16:34 ` Haiying Wang
@ 2008-03-25 20:20 ` Philippe De Muyter
2008-03-25 20:48 ` Haiying Wang
0 siblings, 1 reply; 5+ messages in thread
From: Philippe De Muyter @ 2008-03-25 20:20 UTC (permalink / raw)
To: Haiying Wang; +Cc: linuxppc-dev
Hi Haiying,
On Tue, Mar 25, 2008 at 12:34:55PM -0400, Haiying Wang wrote:
> 8540 doesn't have RSTCR register. You should not use fsl_rstcr_restart
> for reboot your 8540 board.
>
That's what I was thinking also (see my Post-Scriptum below), but current
linux/powerpc sources use fsl_rstcr_restart for the mpc8540_ads board :(
Philippe
> On Tue, 2008-03-25 at 17:15 +0100, Philippe De Muyter wrote:
> > Hi all,
> >
> > I have a mpc8540 board that could reboot when driven by a ARCH=ppc linux,
> > but that hangs now in arch/powerpc/sysdev/fsl_soc.c:fsl_rstcr_restart when
> > asked to reboot with a ARCH=powerpc linux.
> >
> > I have found that if I call arch/powerpc/kernel/head_fsl_booke.S:abort from
> > there, my board reboots correctly, but I feel that's not the right place
> > to put that call. Where/how should I do that ?
> >
> > Philippe
> >
> > PS : Does arch/powerpc/sysdev/fsl_soc.c:fsl_rstcr_restart actually work
> > for mpc8540_ads boards ?
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: how to use head_fsl_booke.S:abort to restart
2008-03-25 20:20 ` Philippe De Muyter
@ 2008-03-25 20:48 ` Haiying Wang
2008-03-26 8:05 ` Philippe De Muyter
0 siblings, 1 reply; 5+ messages in thread
From: Haiying Wang @ 2008-03-25 20:48 UTC (permalink / raw)
To: Philippe De Muyter, kumar.gala; +Cc: linuxppc-dev
Ok, I see the problem here. For 8540/60 which has e500 v1 core, it
doesn't use RSTCR to assert HRESET_REQ signal to reset the whole system.
We probably need to add abort() in fsl_rstcr_restart() for those
silicons:
diff --git a/arch/powerpc/sysdev/fsl_soc.c
b/arch/powerpc/sysdev/fsl_soc.c
index 2c5388c..c2d07cd 100644
--- a/arch/powerpc/sysdev/fsl_soc.c
+++ b/arch/powerpc/sysdev/fsl_soc.c
@@ -1434,7 +1434,8 @@ void fsl_rstcr_restart(char *cmd)
if (rstcr)
/* set reset control register */
out_be32(rstcr, 0x2); /* HRESET_REQ */
-
+ else
+ abort();
while (1) ;
}
#endif
I don't have 8540 board to test.
Haiying
On Tue, 2008-03-25 at 21:20 +0100, Philippe De Muyter wrote:
> Hi Haiying,
>
> On Tue, Mar 25, 2008 at 12:34:55PM -0400, Haiying Wang wrote:
> > 8540 doesn't have RSTCR register. You should not use fsl_rstcr_restart
> > for reboot your 8540 board.
> >
> That's what I was thinking also (see my Post-Scriptum below), but current
> linux/powerpc sources use fsl_rstcr_restart for the mpc8540_ads board :(
>
> Philippe
>
> > On Tue, 2008-03-25 at 17:15 +0100, Philippe De Muyter wrote:
> > > Hi all,
> > >
> > > I have a mpc8540 board that could reboot when driven by a ARCH=ppc linux,
> > > but that hangs now in arch/powerpc/sysdev/fsl_soc.c:fsl_rstcr_restart when
> > > asked to reboot with a ARCH=powerpc linux.
> > >
> > > I have found that if I call arch/powerpc/kernel/head_fsl_booke.S:abort from
> > > there, my board reboots correctly, but I feel that's not the right place
> > > to put that call. Where/how should I do that ?
> > >
> > > Philippe
> > >
> > > PS : Does arch/powerpc/sysdev/fsl_soc.c:fsl_rstcr_restart actually work
> > > for mpc8540_ads boards ?
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: how to use head_fsl_booke.S:abort to restart
2008-03-25 20:48 ` Haiying Wang
@ 2008-03-26 8:05 ` Philippe De Muyter
0 siblings, 0 replies; 5+ messages in thread
From: Philippe De Muyter @ 2008-03-26 8:05 UTC (permalink / raw)
To: Haiying Wang; +Cc: linuxppc-dev, kumar.gala
Hi Haiying,
On Tue, Mar 25, 2008 at 04:48:23PM -0400, Haiying Wang wrote:
> Ok, I see the problem here. For 8540/60 which has e500 v1 core, it
> doesn't use RSTCR to assert HRESET_REQ signal to reset the whole system.
> We probably need to add abort() in fsl_rstcr_restart() for those
> silicons:
>
> diff --git a/arch/powerpc/sysdev/fsl_soc.c
> b/arch/powerpc/sysdev/fsl_soc.c
> index 2c5388c..c2d07cd 100644
> --- a/arch/powerpc/sysdev/fsl_soc.c
> +++ b/arch/powerpc/sysdev/fsl_soc.c
> @@ -1434,7 +1434,8 @@ void fsl_rstcr_restart(char *cmd)
> if (rstcr)
> /* set reset control register */
> out_be32(rstcr, 0x2); /* HRESET_REQ */
> -
> + else
> + abort();
> while (1) ;
> }
> #endif
I have a 8540 board, and that works, but as your patch is written,
compilation fails with :
arch/powerpc/sysdev/fsl_soc.c: In function 'fsl_rstcr_restart':
arch/powerpc/sysdev/fsl_soc.c:1445: error: implicit declaration
of function 'abort'
arch/powerpc/sysdev/fsl_soc.c:1445: warning: incompatible implicit
declaration of built-in function 'abort'
make[1]: *** [arch/powerpc/sysdev/fsl_soc.o] Error 1
make: *** [arch/powerpc/sysdev] Error 2
and if I fix that with :
arch_initcall(setup_rstcr);
+extern void abort(void);
+
void fsl_rstcr_restart(char *cmd)
{
it compiles and does reboot, but at startup I still get the following
annoying message :
rstcr compatible register does not exist!
Philippe
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2008-03-26 8:05 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-03-25 16:15 how to use head_fsl_booke.S:abort to restart Philippe De Muyter
2008-03-25 16:34 ` Haiying Wang
2008-03-25 20:20 ` Philippe De Muyter
2008-03-25 20:48 ` Haiying Wang
2008-03-26 8:05 ` Philippe De Muyter
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.