]> git.ipfire.org Git - people/ms/u-boot.git/blame - arch/powerpc/cpu/mpc512x/common.c
cmd_mmc: use common usage function
[people/ms/u-boot.git] / arch / powerpc / cpu / mpc512x / common.c
CommitLineData
2ebdb9a9
AG
1#include <common.h>
2#include <asm/io.h>
3
4#if defined(CONFIG_POST) || defined(CONFIG_LOGBUFFER)
5
6#if defined(CONFIG_SYS_POST_WORD_ADDR)
7# define _POST_ADDR (CONFIG_SYS_POST_WORD_ADDR)
8#else
9#error echo "No POST word address defined"
10#endif
11
12void post_word_store(ulong a)
13{
14 volatile void *save_addr = (volatile void *)(_POST_ADDR);
15
16 out_be32(save_addr, a);
17}
18
19ulong post_word_load(void)
20{
21 volatile void *save_addr = (volatile void *)(_POST_ADDR);
22
23 return in_be32(save_addr);
24}
25#endif /* CONFIG_POST || CONFIG_LOGBUFFER */