diff mbox

[U-Boot,04/10] arm: Move fdt check earlier so that board_early_init_f() can use it

Message ID 1351813330-23741-4-git-send-email-sjg@chromium.org
State Superseded, archived
Delegated to: Albert ARIBAUD
Headers show

Commit Message

Simon Glass Nov. 1, 2012, 11:42 p.m. UTC
We want to use the fdt inside board_early_init_f(), so check for its
presence earlier in the pre-reloc init sequence.

Signed-off-by: Simon Glass <sjg@chromium.org>
---
 arch/arm/lib/board.c |    7 +++----
 1 files changed, 3 insertions(+), 4 deletions(-)

Comments

Wolfgang Denk Nov. 3, 2012, 2:56 p.m. UTC | #1
Dear Simon Glass,

In message <1351813330-23741-4-git-send-email-sjg@chromium.org> you wrote:
> We want to use the fdt inside board_early_init_f(), so check for its
> presence earlier in the pre-reloc init sequence.
> 
> Signed-off-by: Simon Glass <sjg@chromium.org>
> ---
>  arch/arm/lib/board.c |    7 +++----
>  1 files changed, 3 insertions(+), 4 deletions(-)

NAK as is.  Please make sure to keep all architectures in sync.  The
long term goal is still to merge the lib/board.c files into a single,
common one.

Best regards,

Wolfgang Denk
Simon Glass Nov. 3, 2012, 9:53 p.m. UTC | #2
Hi Wolfgang,

On Sat, Nov 3, 2012 at 7:56 AM, Wolfgang Denk <wd@denx.de> wrote:
> Dear Simon Glass,
>
> In message <1351813330-23741-4-git-send-email-sjg@chromium.org> you wrote:
>> We want to use the fdt inside board_early_init_f(), so check for its
>> presence earlier in the pre-reloc init sequence.
>>
>> Signed-off-by: Simon Glass <sjg@chromium.org>
>> ---
>>  arch/arm/lib/board.c |    7 +++----
>>  1 files changed, 3 insertions(+), 4 deletions(-)
>
> NAK as is.  Please make sure to keep all architectures in sync.  The
> long term goal is still to merge the lib/board.c files into a single,
> common one.

So far ARM and microblaze are the only only ones that use
CONFIG_OF_CONTROL. Microblaze does not have the same init loop, and in
particular does not have the board_early_init_f() call. So a patch for
microblaze would have no meaning.

I have just sent patches to the list to enable CONFIG_OF_CONTROL for
x86. I will make the same change to a v2 patch there, and squash it
in.

Regarding the generic board series, there was quite a bit of
discussion at the time and it ended up being more work than I had time
for then. Also I found it very difficult to find all the little errors
in board builds when i was making global changes across the tree. Now
that I have by builder and a bit more time I plan to take another look
at this, probably early next month. When I left it, I had pulled out
the common fields in global_data, and got everything building. But it
still needs work. I am keen to get this done since it is annoying to
have to send 14 patches every time you want to add a new feature!

So we don't have to take this patch, but it would be useful in the meantime.

Regards,
Simon

>
> Best regards,
>
> Wolfgang Denk
>
> --
> DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
> HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
> Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd@denx.de
> In the future, you're going to get computers as prizes  in  breakfast
> cereals.  You'll  throw  them out because your house will be littered
> with them.                                             - Robert Lucky
diff mbox

Patch

diff --git a/arch/arm/lib/board.c b/arch/arm/lib/board.c
index 6e048aa..2ec6a43 100644
--- a/arch/arm/lib/board.c
+++ b/arch/arm/lib/board.c
@@ -226,13 +226,12 @@  int arch_cpu_init(void)
 
 init_fnc_t *init_sequence[] = {
 	arch_cpu_init,		/* basic arch cpu dependent setup */
-
-#if defined(CONFIG_BOARD_EARLY_INIT_F)
-	board_early_init_f,
-#endif
 #ifdef CONFIG_OF_CONTROL
 	fdtdec_check_fdt,
 #endif
+#if defined(CONFIG_BOARD_EARLY_INIT_F)
+	board_early_init_f,
+#endif
 	timer_init,		/* initialize timer */
 #ifdef CONFIG_BOARD_POSTCLK_INIT
 	board_postclk_init,