[PATCH 2/2] 83xx: Don't ioremap() from the reset function.
Scott Wood
scottwood at freescale.com
Tue Feb 6 07:43:39 EST 2007
ioremap() is not safe to call from interrupt context, so instead use the
whole-soc mapping to access the reset registers.
Signed-off-by: Scott Wood <scottwood at freescale.com>
---
arch/powerpc/platforms/83xx/misc.c | 17 +++++++++--------
1 files changed, 9 insertions(+), 8 deletions(-)
diff --git a/arch/powerpc/platforms/83xx/misc.c b/arch/powerpc/platforms/83xx/misc.c
index f0c6df6..a4b14c1 100644
--- a/arch/powerpc/platforms/83xx/misc.c
+++ b/arch/powerpc/platforms/83xx/misc.c
@@ -23,18 +23,19 @@ void mpc83xx_restart(char *cmd)
#define RST_OFFSET 0x00000900
#define RST_PROT_REG 0x00000018
#define RST_CTRL_REG 0x0000001c
- __be32 __iomem *reg;
- /* map reset register space */
- reg = ioremap(get_immrbase() + 0x900, 0xff);
+ if (mpc83xx_immr) {
+ __be32 __iomem *reg = mpc83xx_immr + RST_OFFSET;
- local_irq_disable();
+ local_irq_disable();
- /* enable software reset "RSTE" */
- out_be32(reg + (RST_PROT_REG >> 2), 0x52535445);
+ /* enable software reset "RSTE" */
+ out_be32(reg + (RST_PROT_REG >> 2), 0x52535445);
+
+ /* set software hard reset */
+ out_be32(reg + (RST_CTRL_REG >> 2), 0x2);
+ }
- /* set software hard reset */
- out_be32(reg + (RST_CTRL_REG >> 2), 0x2);
for (;;) ;
}
--
1.4.4
More information about the Linuxppc-dev
mailing list