aboutsummaryrefslogtreecommitdiffstats
path: root/arch/ppc/syslib/ppc83xx_setup.c
diff options
context:
space:
mode:
authorAnton Altaparmakov <aia21@cantab.net>2005-05-30 16:34:37 -0400
committerAnton Altaparmakov <aia21@cantab.net>2005-05-30 16:34:37 -0400
commit4ff4258a3e558814a3d48c50a59cd22f56bbea2f (patch)
tree35ac4a5d2b162687eef0c38aecf14f3a7c5afee0 /arch/ppc/syslib/ppc83xx_setup.c
parent442d207eb0b4e7047c4fedccd900c425e689d502 (diff)
parent5e485b7975472ba4a408523deb6541e70c451842 (diff)
Automatic merge with /usr/src/ntfs-2.6.git.
Diffstat (limited to 'arch/ppc/syslib/ppc83xx_setup.c')
-rw-r--r--arch/ppc/syslib/ppc83xx_setup.c28
1 files changed, 28 insertions, 0 deletions
diff --git a/arch/ppc/syslib/ppc83xx_setup.c b/arch/ppc/syslib/ppc83xx_setup.c
index c28f9d679484..843cf8873e60 100644
--- a/arch/ppc/syslib/ppc83xx_setup.c
+++ b/arch/ppc/syslib/ppc83xx_setup.c
@@ -29,6 +29,7 @@
29#include <asm/mmu.h> 29#include <asm/mmu.h>
30#include <asm/ppc_sys.h> 30#include <asm/ppc_sys.h>
31#include <asm/kgdb.h> 31#include <asm/kgdb.h>
32#include <asm/delay.h>
32 33
33#include <syslib/ppc83xx_setup.h> 34#include <syslib/ppc83xx_setup.h>
34 35
@@ -117,7 +118,34 @@ mpc83xx_early_serial_map(void)
117void 118void
118mpc83xx_restart(char *cmd) 119mpc83xx_restart(char *cmd)
119{ 120{
121 volatile unsigned char __iomem *reg;
122 unsigned char tmp;
123
124 reg = ioremap(BCSR_PHYS_ADDR, BCSR_SIZE);
125
120 local_irq_disable(); 126 local_irq_disable();
127
128 /*
129 * Unlock the BCSR bits so a PRST will update the contents.
130 * Otherwise the reset asserts but doesn't clear.
131 */
132 tmp = in_8(reg + BCSR_MISC_REG3_OFF);
133 tmp |= BCSR_MISC_REG3_CNFLOCK; /* low true, high false */
134 out_8(reg + BCSR_MISC_REG3_OFF, tmp);
135
136 /*
137 * Trigger a reset via a low->high transition of the
138 * PORESET bit.
139 */
140 tmp = in_8(reg + BCSR_MISC_REG2_OFF);
141 tmp &= ~BCSR_MISC_REG2_PORESET;
142 out_8(reg + BCSR_MISC_REG2_OFF, tmp);
143
144 udelay(1);
145
146 tmp |= BCSR_MISC_REG2_PORESET;
147 out_8(reg + BCSR_MISC_REG2_OFF, tmp);
148
121 for(;;); 149 for(;;);
122} 150}
123 151