diff options
author | Stefan Roese <sr@denx.de> | 2008-01-09 10:25:46 +0100 |
---|---|---|
committer | Stefan Roese <sr@denx.de> | 2008-01-09 10:25:46 +0100 |
commit | 1754f50b710194f886b6f2831803d8960171a14d (patch) | |
tree | 6f537c90aeb8ef959dd70834f3cd3bb11d1ba133 /cpu/ppc4xx | |
parent | e02c521d94b45d7b05aa522e4ccde6b74bf5fe57 (diff) | |
download | u-boot-imx-1754f50b710194f886b6f2831803d8960171a14d.zip u-boot-imx-1754f50b710194f886b6f2831803d8960171a14d.tar.gz u-boot-imx-1754f50b710194f886b6f2831803d8960171a14d.tar.bz2 |
ppc4xx: Add CFG_POST_ALT_WORD_ADDR to support non OCM POST WORD storage
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>
Diffstat (limited to 'cpu/ppc4xx')
-rw-r--r-- | cpu/ppc4xx/commproc.c | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/cpu/ppc4xx/commproc.c b/cpu/ppc4xx/commproc.c index 68aab5b..22156dd 100644 --- a/cpu/ppc4xx/commproc.c +++ b/cpu/ppc4xx/commproc.c @@ -26,10 +26,21 @@ #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*/ |