From: Valentin Longchamp Date: Wed, 3 Aug 2011 14:37:00 +0200 Subject: [U-Boot] [PATCH 1/8] POST/arm: adaptations needed for POST on ARM to work In-Reply-To: <1312375027-27693-1-git-send-email-valentin.longchamp@keymile.com> References: <1312375027-27693-1-git-send-email-valentin.longchamp@keymile.com> Message-ID: <1312375027-27693-2-git-send-email-valentin.longchamp@keymile.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de 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 need gd->ram, and thus DECLARE_GLOBAL_DATA_PTR is needed in post.h Signed-off-by: Valentin Longchamp Signed-off-by: Holger Brunck --- arch/arm/include/asm/global_data.h | 4 ++++ arch/arm/lib/board.c | 2 ++ include/post.h | 6 ++++++ 3 files changed, 12 insertions(+), 0 deletions(-) diff --git a/arch/arm/include/asm/global_data.h b/arch/arm/include/asm/global_data.h index 4fc51fd..b2c336a 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 90709d0..db8abac 100644 --- a/arch/arm/lib/board.c +++ b/arch/arm/lib/board.c @@ -48,6 +48,8 @@ #include #include #include +#include +#include #ifdef CONFIG_BITBANGMII #include diff --git a/include/post.h b/include/post.h index 3f259b7..0801956 100644 --- a/include/post.h +++ b/include/post.h @@ -76,6 +76,12 @@ #endif #endif /* CONFIG_SYS_POST_WORD_ADDR */ +/* + * some ARM implementations have to use gd->ram_size, since POST_WORD is + * defined in RAM + */ +DECLARE_GLOBAL_DATA_PTR; + static inline ulong post_word_load (void) { return in_le32((volatile void *)(_POST_WORD_ADDR)); -- 1.7.1