summaryrefslogtreecommitdiff
path: root/include/post.h
diff options
context:
space:
mode:
authorValentin Longchamp <valentin.longchamp@keymile.com>2011-09-02 04:59:04 +0000
committerWolfgang Denk <wd@denx.de>2011-10-05 22:03:10 +0200
commit3e161ced8fd3276aa77e4276e9237ae972b21f33 (patch)
treea9b2782c67fac7b6d3a66b8bb296e99c66bd58ed /include/post.h
parentea3681a6e4f8367354092ff55b74441007319aad (diff)
downloadu-boot-imx-3e161ced8fd3276aa77e4276e9237ae972b21f33.zip
u-boot-imx-3e161ced8fd3276aa77e4276e9237ae972b21f33.tar.gz
u-boot-imx-3e161ced8fd3276aa77e4276e9237ae972b21f33.tar.bz2
POST: allow redefinition of post_word_load/store
The predefinde post_word_load/store functions do not fit all boards, so we introduce a way to define post_word_load/store as externs in post.h that then can be defined in board specific files. This is done with the CONFIG_POST_EXTERNAL_WORD_FUNCS #define Signed-off-by: Valentin Longchamp <valentin.longchamp@keymile.com> Signed-off-by: Holger Brunck <holger.brunck@keymile.com>
Diffstat (limited to 'include/post.h')
-rw-r--r--include/post.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/include/post.h b/include/post.h
index 3d23d22..e783b94 100644
--- a/include/post.h
+++ b/include/post.h
@@ -33,6 +33,7 @@
#if defined(CONFIG_POST) || defined(CONFIG_LOGBUFFER)
+#ifndef CONFIG_POST_EXTERNAL_WORD_FUNCS
#ifdef CONFIG_SYS_POST_WORD_ADDR
#define _POST_WORD_ADDR CONFIG_SYS_POST_WORD_ADDR
#else
@@ -85,6 +86,13 @@ static inline void post_word_store (ulong value)
{
out_le32((volatile void *)(_POST_WORD_ADDR), value);
}
+
+#else
+
+extern ulong post_word_load(void);
+extern void post_word_store(ulong value);
+
+#endif /* CONFIG_POST_EXTERNAL_WORD_FUNCS */
#endif /* defined (CONFIG_POST) || defined(CONFIG_LOGBUFFER) */
#endif /* __ASSEMBLY__ */