]> git.kernelconcepts.de Git - karo-tx-uboot.git/commitdiff
ppc4xx: Add CFG_POST_ALT_WORD_ADDR to support non OCM POST WORD storage
authorStefan Roese <sr@denx.de>
Wed, 9 Jan 2008 09:25:46 +0000 (10:25 +0100)
committerStefan Roese <sr@denx.de>
Wed, 9 Jan 2008 09:25:46 +0000 (10:25 +0100)
The privious 4xx POST implementation only supported storing the POST
WORD in OCM. Since we need to reserve the OCM on LWMON5 for the logbuffer
we need to store the POST WORD in some other non volatile location.
This patch adds CFG_POST_ALT_WORD_ADDR to specify an address for such
a location.

Signed-off-by: Stefan Roese <sr@denx.de>
cpu/ppc4xx/commproc.c

index 68aab5b7eab2d6ebda4daf6abe2d8d45f9ac051d..22156dd9ded363c8ae9b467314326a69f211cc6f 100644 (file)
 
 #include <common.h>
 #include <commproc.h>
-
+#include <asm/io.h>
 
 #if defined(CONFIG_POST) || defined(CONFIG_LOGBUFFER)
 
+#if defined(CFG_POST_ALT_WORD_ADDR)
+void post_word_store (ulong a)
+{
+       out_be32((void *)CFG_POST_ALT_WORD_ADDR, a);
+}
+
+ulong post_word_load (void)
+{
+       return in_be32((void *)CFG_POST_ALT_WORD_ADDR);
+}
+#else /* CFG_POST_ALT_WORD_ADDR */
 void post_word_store (ulong a)
 {
        volatile void *save_addr = (volatile void *)(CFG_OCM_DATA_ADDR + CFG_POST_WORD_ADDR);
@@ -41,6 +52,7 @@ ulong post_word_load (void)
        volatile void *save_addr = (volatile void *)(CFG_OCM_DATA_ADDR + CFG_POST_WORD_ADDR);
        return *(volatile ulong *) save_addr;
 }
+#endif /* CFG_POST_ALT_WORD_ADDR */
 
 #endif /* CONFIG_POST || CONFIG_LOGBUFFER*/