* reset mpc83xx plaform.
@ 2006-03-22 17:20 David Updegraff
2006-03-22 18:15 ` Kumar Gala
0 siblings, 1 reply; 2+ messages in thread
From: David Updegraff @ 2006-03-22 17:20 UTC (permalink / raw)
To: linuxppc-embedded
[-- Attachment #1: Type: text/plain, Size: 212 bytes --]
Hi.
I think there's some typo-errs. in arch/powerpc/platforms/83xx/misc.c.
In my case, these result in board lockup at 'reboot' instead of reset.
By my reading of the PDF, it needs to be patched thusly.
-dbu.
[-- Attachment #2: resetpatch --]
[-- Type: text/plain, Size: 822 bytes --]
diff --git a/arch/powerpc/platforms/83xx/misc.c b/arch/powerpc/platforms/83xx/misc.c
index 0eb3d99..d918d45 100644
--- a/arch/powerpc/platforms/83xx/misc.c
+++ b/arch/powerpc/platforms/83xx/misc.c
@@ -24,6 +24,7 @@ void mpc83xx_restart(char *cmd)
#define RST_OFFSET 0x00000900
#define RST_PROT_REG 0x00000018
#define RST_CTRL_REG 0x0000001c
+#define RST_ENBL_REG 0x00000020
__be32 __iomem *reg;
/* map reset register space */
@@ -34,8 +35,12 @@ void mpc83xx_restart(char *cmd)
/* enable software reset "RSTE" */
out_be32(reg + (RST_PROT_REG >> 2), 0x52535445);
+ /* wait for reset to get enabled */
+ while ((in_be32 (reg + (RST_ENBL_REG >> 2)) & 1) == 0 )
+ ;
+
/* set software hard reset */
- out_be32(reg + (RST_CTRL_REG >> 2), 0x52535445);
+ out_be32(reg + (RST_CTRL_REG >> 2), 3);
for (;;) ;
}
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: reset mpc83xx plaform.
2006-03-22 17:20 reset mpc83xx plaform David Updegraff
@ 2006-03-22 18:15 ` Kumar Gala
0 siblings, 0 replies; 2+ messages in thread
From: Kumar Gala @ 2006-03-22 18:15 UTC (permalink / raw)
To: David Updegraff; +Cc: linuxppc-embedded
On Mar 22, 2006, at 11:20 AM, David Updegraff wrote:
> Hi.
>
> I think there's some typo-errs. in arch/powerpc/platforms/83xx/misc.c.
> In my case, these result in board lockup at 'reboot' instead of reset.
>
> By my reading of the PDF, it needs to be patched thusly.
Yeah, this fix should be in what Paul just sent to linus for 2.6.17.
I guess I could push to get it into 2.6.16.x if desired.
- kumar
> diff --git a/arch/powerpc/platforms/83xx/misc.c b/arch/powerpc/
> platforms/83xx/misc.c
> index 0eb3d99..d918d45 100644
> --- a/arch/powerpc/platforms/83xx/misc.c
> +++ b/arch/powerpc/platforms/83xx/misc.c
> @@ -24,6 +24,7 @@ void mpc83xx_restart(char *cmd)
> #define RST_OFFSET 0x00000900
> #define RST_PROT_REG 0x00000018
> #define RST_CTRL_REG 0x0000001c
> +#define RST_ENBL_REG 0x00000020
> __be32 __iomem *reg;
>
> /* map reset register space */
> @@ -34,8 +35,12 @@ void mpc83xx_restart(char *cmd)
> /* enable software reset "RSTE" */
> out_be32(reg + (RST_PROT_REG >> 2), 0x52535445);
>
> + /* wait for reset to get enabled */
> + while ((in_be32 (reg + (RST_ENBL_REG >> 2)) & 1) == 0 )
> + ;
> +
> /* set software hard reset */
> - out_be32(reg + (RST_CTRL_REG >> 2), 0x52535445);
> + out_be32(reg + (RST_CTRL_REG >> 2), 3);
> for (;;) ;
> }
>
> _______________________________________________
> Linuxppc-embedded mailing list
> Linuxppc-embedded@ozlabs.org
> https://ozlabs.org/mailman/listinfo/linuxppc-embedded
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2006-03-22 18:14 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-03-22 17:20 reset mpc83xx plaform David Updegraff
2006-03-22 18:15 ` Kumar Gala
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.