From f3443867e90d2979a7dd1c65b0d537777e1f9850 Mon Sep 17 00:00:00 2001 From: Stefan Roese Date: Sat, 7 Oct 2006 11:30:52 +0200 Subject: Add CONFIG_BOARD_RESET to configure board specific reset function Patch by Stefan Roese, 07 Oct 2006 --- cpu/ppc4xx/cpu.c | 20 ++++++++------------ 1 file changed, 8 insertions(+), 12 deletions(-) (limited to 'cpu/ppc4xx/cpu.c') diff --git a/cpu/ppc4xx/cpu.c b/cpu/ppc4xx/cpu.c index 94478db..4e81ce2 100644 --- a/cpu/ppc4xx/cpu.c +++ b/cpu/ppc4xx/cpu.c @@ -41,6 +41,10 @@ DECLARE_GLOBAL_DATA_PTR; #endif +#if defined(CONFIG_BOARD_RESET) +void board_reset(void); +#endif + #if defined(CONFIG_440) #define FREQ_EBC (sys_info.freqEPB) #else @@ -414,23 +418,15 @@ int ppc440spe_revB() { int do_reset (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) { -#if defined(CONFIG_YOSEMITE) || defined(CONFIG_YELLOWSTONE) - /*give reset to BCSR*/ - *(unsigned char*)(CFG_BCSR_BASE | 0x06) = 0x09; - +#if defined(CONFIG_BOARD_RESET) + board_reset(); #else - /* * Initiate system reset in debug control register DBCR */ - __asm__ __volatile__("lis 3, 0x3000" ::: "r3"); -#if defined(CONFIG_440) - __asm__ __volatile__("mtspr 0x134, 3"); -#else - __asm__ __volatile__("mtspr 0x3f2, 3"); -#endif + mtspr(dbcr0, 0x30000000); +#endif /* defined(CONFIG_BOARD_RESET) */ -#endif/* defined(CONFIG_YOSEMITE) || defined(CONFIG_YELLOWSTONE)*/ return 1; } -- cgit v1.1 From 1c2ce2262069510f31c7d3fd7efd3d58b8c0c148 Mon Sep 17 00:00:00 2001 From: Stefan Roese Date: Mon, 27 Nov 2006 14:12:17 +0100 Subject: [PATCH] Update Prodrive ALPR board support (440GX) Signed-off-by: Stefan Roese --- cpu/ppc4xx/cpu.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'cpu/ppc4xx/cpu.c') diff --git a/cpu/ppc4xx/cpu.c b/cpu/ppc4xx/cpu.c index faa5257..c45525d 100644 --- a/cpu/ppc4xx/cpu.c +++ b/cpu/ppc4xx/cpu.c @@ -426,8 +426,8 @@ int ppc440spe_revB() { int do_reset (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) { -#if defined(CONFIG_BOARD_RESET) - board_reset(); +#if defined(CFG_4xx_RESET_TYPE) + mtspr(dbcr0, CFG_4xx_RESET_TYPE << 28); #else /* * Initiate system reset in debug control register DBCR -- cgit v1.1 From 1f94d162e2b5f0edc28d9fb11482502c44d218e1 Mon Sep 17 00:00:00 2001 From: Stefan Roese Date: Mon, 27 Nov 2006 14:48:41 +0100 Subject: [PATCH] 4xx: Fix problem with board specific reset code Signed-off-by: Stefan Roese --- cpu/ppc4xx/cpu.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'cpu/ppc4xx/cpu.c') diff --git a/cpu/ppc4xx/cpu.c b/cpu/ppc4xx/cpu.c index c45525d..87299c1 100644 --- a/cpu/ppc4xx/cpu.c +++ b/cpu/ppc4xx/cpu.c @@ -426,6 +426,9 @@ int ppc440spe_revB() { int do_reset (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) { +#if defined(CONFIG_BOARD_RESET) + board_reset(); +#else /* defined(CONFIG_BOARD_RESET) */ #if defined(CFG_4xx_RESET_TYPE) mtspr(dbcr0, CFG_4xx_RESET_TYPE << 28); #else -- cgit v1.1 From 1729b92cde575476684bffe819d0b7791b57bff2 Mon Sep 17 00:00:00 2001 From: Stefan Roese Date: Mon, 27 Nov 2006 14:52:04 +0100 Subject: [PATCH] 4xx: Fix problem with board specific reset code (now for real) Signed-off-by: Stefan Roese --- cpu/ppc4xx/cpu.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'cpu/ppc4xx/cpu.c') diff --git a/cpu/ppc4xx/cpu.c b/cpu/ppc4xx/cpu.c index 87299c1..447383f 100644 --- a/cpu/ppc4xx/cpu.c +++ b/cpu/ppc4xx/cpu.c @@ -428,7 +428,7 @@ int do_reset (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) { #if defined(CONFIG_BOARD_RESET) board_reset(); -#else /* defined(CONFIG_BOARD_RESET) */ +#else #if defined(CFG_4xx_RESET_TYPE) mtspr(dbcr0, CFG_4xx_RESET_TYPE << 28); #else @@ -436,6 +436,7 @@ int do_reset (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) * Initiate system reset in debug control register DBCR */ mtspr(dbcr0, 0x30000000); +#endif /* defined(CFG_4xx_RESET_TYPE) */ #endif /* defined(CONFIG_BOARD_RESET) */ return 1; -- cgit v1.1