[U-Boot-Users] [PATCH 4/11] Add board specific reset support to ppc4xx CPU

Keith J Outwater kjoutwater at raytheon.com
Fri May 5 19:23:06 CEST 2006


The patch below adds support for a board specific reset function for 
ppc4xx CPUs.  This is useful, for example, in systems with a Xilinx FPGA 
which contains a PPC405 processor and is configured by a Xilinx SystemACE 
controller.  The board specific reset function can instruct the SystemACE 
to reload the FPGA configuration bitstream, effectively resetting the 
system.

diff --git a/CHANGELOG b/CHANGELOG
index c774dd0..26fc5cc 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -2,6 +2,9 @@
 Changes since U-Boot 1.1.4:
 ======================================================================
 
+* Add support for a board specific reset function for PPC4XX CPUs.
+  Patch by Keith Outwater, 04 May 2006
+
 * Coding Style cleanup
 
 * Write RTC seconds first to maintain settings integrity per
diff --git a/README b/README
index 3ffef62..8c7fdb2 100644
--- a/README
+++ b/README
@@ -1312,6 +1312,11 @@ The following options need to be configu
                SPI configuration items (port pins to use, etc). For
                an example, see include/configs/sacsng.h.
 
+- Board Specific Reset Function: CONFIG_BSP_RESET (ppc4xx)
+               Specify that a board specific function will reset the 
board.
+               If defined, the function bsp_do_reset() will be called 
with
+               the same args and return value as do_reset().
+
 - FPGA Support: CONFIG_FPGA_COUNT
 
                Specify the number of FPGA devices to support.
diff --git a/cpu/ppc4xx/cpu.c b/cpu/ppc4xx/cpu.c
index 0cd72b0..14b42be 100644
--- a/cpu/ppc4xx/cpu.c
+++ b/cpu/ppc4xx/cpu.c
@@ -116,6 +116,10 @@ #if defined(CONFIG_440)
 static int do_chip_reset(unsigned long sys0, unsigned long sys1);
 #endif
 
+#if defined(CONFIG_BSP_RESET)
+extern void bsp_do_reset(cmd_tbl_t *cmdtp, int flag, int argc, char 
*argv[]);
+#endif
+
 
 int checkcpu (void)
 {
@@ -300,6 +304,11 @@ #endif /* !defined(CONFIG_405) */
 
 int do_reset (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
 {
+#if defined(CONFIG_BSP_RESET)
+       bsp_do_reset(cmdtp, flag, argc, argv);
+       return 1;
+#else
+
 #if defined(CONFIG_YOSEMITE) || defined(CONFIG_YELLOWSTONE)
        /*give reset to BCSR*/
        *(unsigned char*)(CFG_BCSR_BASE | 0x06) = 0x09;
@@ -317,6 +326,7 @@ #else
 #endif
 
 #endif/* defined(CONFIG_YOSEMITE) || defined(CONFIG_YELLOWSTONE)*/
+#endif /* #if defined(CONFIG_BSP_RESET) */
        return 1;
 }
 
Signed-off-by: Keith Outwater <outwater4 at comcast.net>





More information about the U-Boot mailing list