From: David Updegraff <dave@cray.com>
To: linuxppc-embedded@ozlabs.org
Subject: reset mpc83xx plaform.
Date: Wed, 22 Mar 2006 11:20:08 -0600 [thread overview]
Message-ID: <dvs108$8d8$1@sea.gmane.org> (raw)
[-- 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 (;;) ;
}
next reply other threads:[~2006-03-22 17:20 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-03-22 17:20 David Updegraff [this message]
2006-03-22 18:15 ` reset mpc83xx plaform Kumar Gala
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='dvs108$8d8$1@sea.gmane.org' \
--to=dave@cray.com \
--cc=linuxppc-embedded@ozlabs.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.