Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 1655
b: refs/heads/master
c: f9e4a00
h: refs/heads/master
i:
  1653: ee26483
  1651: d885a4c
  1647: 1550b49
v: v3
  • Loading branch information
Kumar Gala authored and Linus Torvalds committed May 28, 2005
1 parent 5f3cfb4 commit 1f3c5af
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: ff945023c6a455679165b14d298316e262ceeb1f
refs/heads/master: f9e4a005827ec0b33f0c61fec1634a5a3421decd
6 changes: 6 additions & 0 deletions trunk/arch/ppc/platforms/83xx/mpc834x_sys.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,12 @@
#define BCSR_PHYS_ADDR ((uint)0xf8000000)
#define BCSR_SIZE ((uint)(32 * 1024))

#define BCSR_MISC_REG2_OFF 0x07
#define BCSR_MISC_REG2_PORESET 0x01

#define BCSR_MISC_REG3_OFF 0x08
#define BCSR_MISC_REG3_CNFLOCK 0x80

#ifdef CONFIG_PCI
/* PCI interrupt controller */
#define PIRQA MPC83xx_IRQ_IRQ4
Expand Down
28 changes: 28 additions & 0 deletions trunk/arch/ppc/syslib/ppc83xx_setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
#include <asm/mmu.h>
#include <asm/ppc_sys.h>
#include <asm/kgdb.h>
#include <asm/delay.h>

#include <syslib/ppc83xx_setup.h>

Expand Down Expand Up @@ -117,7 +118,34 @@ mpc83xx_early_serial_map(void)
void
mpc83xx_restart(char *cmd)
{
volatile unsigned char __iomem *reg;
unsigned char tmp;

reg = ioremap(BCSR_PHYS_ADDR, BCSR_SIZE);

local_irq_disable();

/*
* Unlock the BCSR bits so a PRST will update the contents.
* Otherwise the reset asserts but doesn't clear.
*/
tmp = in_8(reg + BCSR_MISC_REG3_OFF);
tmp |= BCSR_MISC_REG3_CNFLOCK; /* low true, high false */
out_8(reg + BCSR_MISC_REG3_OFF, tmp);

/*
* Trigger a reset via a low->high transition of the
* PORESET bit.
*/
tmp = in_8(reg + BCSR_MISC_REG2_OFF);
tmp &= ~BCSR_MISC_REG2_PORESET;
out_8(reg + BCSR_MISC_REG2_OFF, tmp);

udelay(1);

tmp |= BCSR_MISC_REG2_PORESET;
out_8(reg + BCSR_MISC_REG2_OFF, tmp);

for(;;);
}

Expand Down

0 comments on commit 1f3c5af

Please sign in to comment.