diff options
author | Wolfgang Denk <wd@denx.de> | 2010-04-27 23:02:12 +0200 |
---|---|---|
committer | Wolfgang Denk <wd@denx.de> | 2010-04-27 23:02:12 +0200 |
commit | 8e98f5f70b269a77416a990b90ad8d853c5a0d73 (patch) | |
tree | ee7332a16533f59cdc111bdf8796179333aaede9 /arch/powerpc/cpu/mpc512x/common.c | |
parent | c303176aa0cf8c5fc38e7c2d5e181e89cca72ef6 (diff) | |
parent | 29fd7ceb3c1cb7ffaffce1047e806d1e85e3ab4b (diff) | |
download | u-boot-imx-8e98f5f70b269a77416a990b90ad8d853c5a0d73.zip u-boot-imx-8e98f5f70b269a77416a990b90ad8d853c5a0d73.tar.gz u-boot-imx-8e98f5f70b269a77416a990b90ad8d853c5a0d73.tar.bz2 |
Merge branch 'master' of git://git.denx.de/u-boot-mpc5xxx
Diffstat (limited to 'arch/powerpc/cpu/mpc512x/common.c')
-rw-r--r-- | arch/powerpc/cpu/mpc512x/common.c | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/arch/powerpc/cpu/mpc512x/common.c b/arch/powerpc/cpu/mpc512x/common.c new file mode 100644 index 0000000..180d323 --- /dev/null +++ b/arch/powerpc/cpu/mpc512x/common.c @@ -0,0 +1,25 @@ +#include <common.h> +#include <asm/io.h> + +#if defined(CONFIG_POST) || defined(CONFIG_LOGBUFFER) + +#if defined(CONFIG_SYS_POST_WORD_ADDR) +# define _POST_ADDR (CONFIG_SYS_POST_WORD_ADDR) +#else +#error echo "No POST word address defined" +#endif + +void post_word_store(ulong a) +{ + volatile void *save_addr = (volatile void *)(_POST_ADDR); + + out_be32(save_addr, a); +} + +ulong post_word_load(void) +{ + volatile void *save_addr = (volatile void *)(_POST_ADDR); + + return in_be32(save_addr); +} +#endif /* CONFIG_POST || CONFIG_LOGBUFFER */ |