All of lore.kernel.org
 help / color / mirror / Atom feed
From: Valentin Longchamp <valentin.longchamp@keymile.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v2 1/8] POST/arm: adaptations needed for POST on ARM to work
Date: Thu,  1 Sep 2011 17:39:20 +0200	[thread overview]
Message-ID: <1314891567-6476-2-git-send-email-valentin.longchamp@keymile.com> (raw)
In-Reply-To: <1314891567-6476-1-git-send-email-valentin.longchamp@keymile.com>

For post to run on ARM, 3 things are needed:
- post_log_word to be defined in gd
- a post.h include in arch/arm/lib/board.c
- most ARM boards will set POST_WORD in RAM, 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>
Cc: Mike Frysinger <vapier@gentoo.org>
---
Changes for v2:
 - introduced CONFIG_POST_EXTERNAL_WORD_FUNCS
---
 arch/arm/include/asm/global_data.h |    4 ++++
 arch/arm/lib/board.c               |    2 ++
 include/post.h                     |    8 ++++++++
 3 files changed, 14 insertions(+), 0 deletions(-)

diff --git a/arch/arm/include/asm/global_data.h b/arch/arm/include/asm/global_data.h
index ef9959e..4ab17ae 100644
--- a/arch/arm/include/asm/global_data.h
+++ b/arch/arm/include/asm/global_data.h
@@ -75,6 +75,10 @@ typedef	struct	global_data {
 #endif
 	void		**jt;		/* jump table */
 	char		env_buf[32];	/* buffer for getenv() before reloc. */
+#if defined(CONFIG_POST) || defined(CONFIG_LOGBUFFER)
+	unsigned long	post_log_word; /* Record POST activities */
+	unsigned long	post_init_f_time; /* When post_init_f started */
+#endif
 } gd_t;
 
 /*
diff --git a/arch/arm/lib/board.c b/arch/arm/lib/board.c
index 41ef492..f929acd 100644
--- a/arch/arm/lib/board.c
+++ b/arch/arm/lib/board.c
@@ -49,6 +49,8 @@
 #include <nand.h>
 #include <onenand_uboot.h>
 #include <mmc.h>
+#include <post.h>
+#include <logbuff.h>
 
 #ifdef CONFIG_BITBANGMII
 #include <miiphy.h>
diff --git a/include/post.h b/include/post.h
index bb3138d..d859f9f 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__ */
 
-- 
1.7.1

  reply	other threads:[~2011-09-01 15:39 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-09-01 15:39 [U-Boot] [PATCH v2 0/8] POST: support for km_arm and mem_regions test definition Valentin Longchamp
2011-09-01 15:39 ` Valentin Longchamp [this message]
2011-09-01 22:11   ` [U-Boot] [PATCH v2 1/8] POST/arm: adaptations needed for POST on ARM to work Mike Frysinger
2011-09-02 12:31     ` Valentin Longchamp
2011-09-01 15:39 ` [U-Boot] [PATCH v2 2/8] POST: add post_log_res field for post results in global data Valentin Longchamp
2011-09-01 22:12   ` Mike Frysinger
2011-09-01 22:35     ` Graeme Russ
2011-09-01 15:39 ` [U-Boot] [PATCH v2 3/8] POST: make env test flags fetching optional Valentin Longchamp
2011-09-01 22:12   ` Mike Frysinger
2011-09-01 15:39 ` [U-Boot] [PATCH v2 4/8] POST: drivers/memory.c coding style cleanup Valentin Longchamp
2011-09-01 15:39 ` [U-Boot] [PATCH v2 5/8] POST: add new memory regions test Valentin Longchamp
2011-09-01 22:09   ` Mike Frysinger
2011-09-01 15:39 ` [U-Boot] [PATCH v2 6/8] POST/km_arm: add POST memory tests infrastructure Valentin Longchamp
2011-09-01 22:10   ` Mike Frysinger
2011-09-02 12:39     ` Valentin Longchamp
2011-09-02 15:25       ` Mike Frysinger
2011-09-01 15:39 ` [U-Boot] [PATCH v2 7/8] km_arm: change CONFIG_SYS_TEXT_BASE to end of RAM Valentin Longchamp
2011-09-01 15:39 ` [U-Boot] [PATCH v2 8/8] km_arm: enable POST for these boards Valentin Longchamp

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1314891567-6476-2-git-send-email-valentin.longchamp@keymile.com \
    --to=valentin.longchamp@keymile.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.