public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] [PATCH] mpc85xx: Fix booting on various boards
@ 2009-10-12 19:55 Anton Vorontsov
  2009-10-16 15:27 ` Kumar Gala
  0 siblings, 1 reply; 2+ messages in thread
From: Anton Vorontsov @ 2009-10-12 19:55 UTC (permalink / raw)
  To: u-boot

commit 0e870980a64584a591af775bb9c9fe9450124df9 ("8xxx: Removed
CONFIG_NUM_CPUS from 85xx/86xx") breaks U-Boot on various boards,
namely the ones that call get_sys_info() from board_early_init_f().

get_sys_info() calls cpu_numcores(), which depends on probecpu()
being called before. But probecpu() is called after board_early_init_f(),
and so cpu_numcores() returns random values, which in turn crashes
get_sys_info().

To fix the issue we place probecpu() before board_early_init_f()
in an initialization sequence.

Booting on the following boards should be revived now:
 mpc8540ads
 mpc8541cds
 mpc8548cds
 mpc8555cds
 mpc8560ads
 mpc8568mds
 mpc8569mds
 and maybe more.

Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com>
---
 lib_ppc/board.c |    8 +++-----
 1 files changed, 3 insertions(+), 5 deletions(-)

diff --git a/lib_ppc/board.c b/lib_ppc/board.c
index 8b8ddb5..37f0db9 100644
--- a/lib_ppc/board.c
+++ b/lib_ppc/board.c
@@ -251,14 +251,12 @@ static int init_func_watchdog_reset (void)
  */
 
 init_fnc_t *init_sequence[] = {
-
-#if defined(CONFIG_BOARD_EARLY_INIT_F)
-	board_early_init_f,
-#endif
-
 #if defined(CONFIG_MPC85xx) || defined(CONFIG_MPC86xx)
 	probecpu,
 #endif
+#if defined(CONFIG_BOARD_EARLY_INIT_F)
+	board_early_init_f,
+#endif
 #if !defined(CONFIG_8xx_CPUCLK_DEFAULT)
 	get_clocks,		/* get CPU and bus clocks (etc.) */
 #if defined(CONFIG_TQM8xxL) && !defined(CONFIG_TQM866M) \
-- 
1.6.3.3

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [U-Boot] [PATCH] mpc85xx: Fix booting on various boards
  2009-10-12 19:55 [U-Boot] [PATCH] mpc85xx: Fix booting on various boards Anton Vorontsov
@ 2009-10-16 15:27 ` Kumar Gala
  0 siblings, 0 replies; 2+ messages in thread
From: Kumar Gala @ 2009-10-16 15:27 UTC (permalink / raw)
  To: u-boot


On Oct 12, 2009, at 2:55 PM, Anton Vorontsov wrote:

> commit 0e870980a64584a591af775bb9c9fe9450124df9 ("8xxx: Removed
> CONFIG_NUM_CPUS from 85xx/86xx") breaks U-Boot on various boards,
> namely the ones that call get_sys_info() from board_early_init_f().
>
> get_sys_info() calls cpu_numcores(), which depends on probecpu()
> being called before. But probecpu() is called after  
> board_early_init_f(),
> and so cpu_numcores() returns random values, which in turn crashes
> get_sys_info().
>
> To fix the issue we place probecpu() before board_early_init_f()
> in an initialization sequence.
>
> Booting on the following boards should be revived now:
> mpc8540ads
> mpc8541cds
> mpc8548cds
> mpc8555cds
> mpc8560ads
> mpc8568mds
> mpc8569mds
> and maybe more.
>
> Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com>
> ---
> lib_ppc/board.c |    8 +++-----
> 1 files changed, 3 insertions(+), 5 deletions(-)

applied to 85xx.

- k

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2009-10-16 15:27 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-10-12 19:55 [U-Boot] [PATCH] mpc85xx: Fix booting on various boards Anton Vorontsov
2009-10-16 15:27 ` Kumar Gala

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox