aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/sysdev
diff options
context:
space:
mode:
authorStefan Roese <sr@denx.de>2008-03-27 10:43:31 -0400
committerJosh Boyer <jwboyer@linux.vnet.ibm.com>2008-04-02 21:44:56 -0400
commit93173ce272e54f81460986ff5040d16ab79488a9 (patch)
tree7bb4e15ac4cf3853f81e358fb1b21aa2fef6b4ce /arch/powerpc/sysdev
parentd2477b5cc8ca95b8c15133ffbbebf0bd9783f560 (diff)
[POWERPC] 4xx: Create common ppc4xx_reset_system() in ppc4xx_soc.c
This patch creates a common system reset routine for all 40x and 44x systems. Previously only a 44x routine existed. But since this system reset via the debug control register is common for 40x and 44x let's share this code for all those platforms in ppc4xx_soc.c. This patch also enables CONFIG_4xx_SOC for all 40x and 44x platforms. Tested on Kilauea (405EX) and Canyonlands (440EX). Signed-off-by: Stefan Roese <sr@denx.de> Signed-off-by: Josh Boyer <jwboyer@linux.vnet.ibm.com>
Diffstat (limited to 'arch/powerpc/sysdev')
-rw-r--r--arch/powerpc/sysdev/ppc4xx_soc.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/arch/powerpc/sysdev/ppc4xx_soc.c b/arch/powerpc/sysdev/ppc4xx_soc.c
index 4b8617e44314..5b32adc9a9b2 100644
--- a/arch/powerpc/sysdev/ppc4xx_soc.c
+++ b/arch/powerpc/sysdev/ppc4xx_soc.c
@@ -23,6 +23,7 @@
23 23
24#include <asm/dcr.h> 24#include <asm/dcr.h>
25#include <asm/dcr-regs.h> 25#include <asm/dcr-regs.h>
26#include <asm/reg.h>
26 27
27static u32 dcrbase_l2c; 28static u32 dcrbase_l2c;
28 29
@@ -187,3 +188,13 @@ static int __init ppc4xx_l2c_probe(void)
187 return 0; 188 return 0;
188} 189}
189arch_initcall(ppc4xx_l2c_probe); 190arch_initcall(ppc4xx_l2c_probe);
191
192/*
193 * At present, this routine just applies a system reset.
194 */
195void ppc4xx_reset_system(char *cmd)
196{
197 mtspr(SPRN_DBCR0, mfspr(SPRN_DBCR0) | DBCR0_RST_SYSTEM);
198 while (1)
199 ; /* Just in case the reset doesn't work */
200}