[PATCH] ARM: Fix wrong initialisation of bi_arch_number
Chander Kashyap
chander.kashyap at linaro.org
Wed Jul 27 11:40:59 CEST 2011
bi_arch_number is initialised using
@arch/arm/lib/board.c
\#ifdef CONFIG_MACH_TYPE
gd->bd->bi_arch_number =3D CONFIG_MACH_TYPE; /* board id for Linux =
*/
\#endif
bd structure is not intialized by this time.
This leads to u-boot hanging when CONFIG_MACH_TYPE is defined.
Signed-off-by: Chander Kashyap <chander.kashyap at linaro.org>
---
arch/arm/lib/board.c | 7 +++----
1 files changed, 3 insertions(+), 4 deletions(-)
diff --git a/arch/arm/lib/board.c b/arch/arm/lib/board.c
index bcbf697..98a9bcc 100644
--- a/arch/arm/lib/board.c
+++ b/arch/arm/lib/board.c
@@ -281,10 +281,6 @@ void board_init_f (ulong bootflag)
gd->mon_len =3D _bss_end_ofs;
-#ifdef CONFIG_MACH_TYPE
- gd->bd->bi_arch_number =3D CONFIG_MACH_TYPE; /* board id for Linux */
-#endif
-
for (init_fnc_ptr =3D init_sequence; *init_fnc_ptr; ++init_fnc_ptr) {
if ((*init_fnc_ptr)() !=3D 0) {
hang ();
@@ -380,6 +376,9 @@ void board_init_f (ulong bootflag)
gd->bd =3D bd;
debug ("Reserving %zu Bytes for Board Info at: %08lx\n",
sizeof (bd_t), addr_sp);
+#ifdef CONFIG_MACH_TYPE
+ gd->bd->bi_arch_number =3D CONFIG_MACH_TYPE; /* board id for Linux */
+#endif
addr_sp -=3D sizeof (gd_t);
id =3D (gd_t *) addr_sp;
debug ("Reserving %zu Bytes for Global Data at: %08lx\n",
--=20
1.7.4.1
--
with warm regards,
Chander Kashyap
More information about the U-Boot
mailing list