ARM: versatile: pass correct machine type for Versatile AB
PATCH 1/2 ARM: versatile: pass correct machine type for Versatile AB
When U-Boot is configured for Versatile AB, it will still pass the machine ID of Versatile PB to the kernel. After this simple fix the system boots correctly.
--- board/armltd/versatile/versatile.c | 4 ++++ 1 file changed, 4 insertions(+)
board/armltd/versatile/versatile.c +4 -0
@@ -52,7 +52,11 @@ int board_early_init_f (void)int board_init (void ) {/* arch number of Versatile Board */ +#ifdef CONFIG_ARCH_VERSATILE_AB + gd->bd->bi_arch_number =MACH_TYPE_VERSATILE_AB ; +#else gd->bd->bi_arch_number =MACH_TYPE_VERSATILE_PB ; +#endif /* adress of boot parameters */ gd->bd->bi_boot_params =0x00000100 ;
Signature · 1 line
1.8.3.1
PATCH 1/2 ARM: versatile: pass correct machine type for Versatile AB
Dear Linus Walleij,
Quoted 18 lines
When U-Boot is configured for Versatile AB, it will still pass the machine ID of Versatile PB to the kernel. After this simple fix the system boots correctly.
Cc Stefano Babic <[email protected]>Cc Marek Vasut <[email protected]>Signed-off-by Linus Walleij <[email protected]>--- board/armltd/versatile/versatile.c | 4 ++++ 1 file changed, 4 insertions(+)(quoted diff) +0
-0
b/board/armltd/versatile/versatile.cindex30a3b904db4c..4e2d3421d8b1100644board/armltd/versatile/versatile.c +0
-0@@ -52,7 +52,11 @@ int board_early_init_f (void)int board_init (void )
board/armltd/versatile/versatile.c int board_early_init_f (void) · line 62
Quoted 10 lines
board/armltd/versatile/versatile.c +4
-0{/* arch number of Versatile Board */ +#ifdef CONFIG_ARCH_VERSATILE_AB + gd->bd->bi_arch_number =MACH_TYPE_VERSATILE_AB ; +#else gd->bd->bi_arch_number =MACH_TYPE_VERSATILE_PB ; +#endif /* adress of boot parameters */ gd->bd->bi_boot_params =0x00000100 ;
We should just switch to DT, but I do understand the motivation here. Can you not detect which board it is dynamically to avoid the ifdef?
Otherwise:
Best regards,
Marek Vasut
PATCH 1/2 ARM: versatile: pass correct machine type for Versatile AB
Quoted 1 line · Marek Vasut
We should just switch to DT, but I do understand the motivation here.
I will be working on cleanups and DT next, this is just to get a working baseline.
Quoted 2 lines
Can you
not detect which board it is dynamically to avoid the ifdef?
No :-/
Yours,
Linus Walleij
PATCH 1/2 ARM: versatile: pass correct machine type for Versatile AB
In reply to Marek VasutQuoted 28 lines · Marek Vasut
Dear Linus Walleij,
Quoted 26 lines
When U-Boot is configured for Versatile AB, it will still pass the machine ID of Versatile PB to the kernel. After this simple fix the system boots correctly.
Cc Stefano Babic <[email protected]>Cc Marek Vasut <[email protected]>Signed-off-by Linus Walleij <[email protected]>--- board/armltd/versatile/versatile.c | 4 ++++ 1 file changed, 4 insertions(+)(quoted diff) +0
-0
b/board/armltd/versatile/versatile.cindex30a3b904db4c..4e2d3421d8b1100644board/armltd/versatile/versatile.c +4
-0@@ -52,7 +52,11 @@ int board_early_init_f (void)int board_init (void ) {/* arch number of Versatile Board */ +#ifdef CONFIG_ARCH_VERSATILE_AB + gd->bd->bi_arch_number =MACH_TYPE_VERSATILE_AB ; +#else gd->bd->bi_arch_number =MACH_TYPE_VERSATILE_PB ; +#endif
Quoted 6 lines
board/armltd/versatile/versatile.c int board_early_init_f (void) · line 62
Quoted 2 lines
board/armltd/versatile/versatile.c +0
-0/* adress of boot parameters */ gd->bd->bi_boot_params =0x00000100 ;We should just switch to DT, but I do understand the motivation here. Can you not detect which board it is dynamically to avoid the ifdef?
I do not know if it is possible, but if yes, we did not need in the past to introduce CONFIG_ARCH_VERSATILE_AB.
Best regards,
Stefano Babic
Signature · 5 lines
===================================================================== DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de =====================================================================
PATCH 1/2 ARM: versatile: pass correct machine type for Versatile AB
Quoted 2 lines · Stefano Babic
I do not know if it is possible, but if yes, we did not need in the past to introduce
CONFIG_ARCH_VERSATILE_AB.
The boards are similar enough that they will boot to prompt, but they will register the wrong set of peripherals, and some stuff will not work...
Linus Walleij
PATCH 1/2 ARM: versatile: pass correct machine type for Versatile AB
In reply to Linus WalleijDear Linus Walleij,
+CC Albert, he's the ARM guy. Stefano is the Freescale IMX guy :)
Quoted 18 lines
When U-Boot is configured for Versatile AB, it will still pass the machine ID of Versatile PB to the kernel. After this simple fix the system boots correctly.
Cc Stefano Babic <[email protected]>Cc Marek Vasut <[email protected]>Signed-off-by Linus Walleij <[email protected]>--- board/armltd/versatile/versatile.c | 4 ++++ 1 file changed, 4 insertions(+)(quoted diff) +0
-0
b/board/armltd/versatile/versatile.cindex30a3b904db4c..4e2d3421d8b1100644board/armltd/versatile/versatile.c +0
-0@@ -52,7 +52,11 @@ int board_early_init_f (void)int board_init (void )
board/armltd/versatile/versatile.c int board_early_init_f (void) · line 62
Quoted 10 lines
board/armltd/versatile/versatile.c +4
-0{/* arch number of Versatile Board */ +#ifdef CONFIG_ARCH_VERSATILE_AB + gd->bd->bi_arch_number =MACH_TYPE_VERSATILE_AB ; +#else gd->bd->bi_arch_number =MACH_TYPE_VERSATILE_PB ; +#endif /* adress of boot parameters */ gd->bd->bi_boot_params =0x00000100 ;
Best regards,
Marek Vasut
PATCH 1/2 ARM: versatile: pass correct machine type for Versatile AB
Quoted 3 lines · Marek Vasut
Dear Linus Walleij,
+CC Albert, he's the ARM guy. Stefano is the Freescale IMX guy :)
I just saw in the git log that Stefano had a few commits to these boards...
Yours,
Linus Walleij
PATCH 1/2 ARM: versatile: pass correct machine type for Versatile AB
In reply to Linus WalleijHi Linus,
Quoted 17 lines · Linus Walleij
When U-Boot is configured for Versatile AB, it will still pass the machine ID of Versatile PB to the kernel. After this simple fix the system boots correctly.
Cc Stefano Babic <[email protected]>Cc Marek Vasut <[email protected]>Signed-off-by Linus Walleij <[email protected]>--- board/armltd/versatile/versatile.c | 4 ++++ 1 file changed, 4 insertions(+)board/armltd/versatile/versatile.c +0
-0@@ -52,7 +52,11 @@ int board_early_init_f (void)int board_init (void )
board/armltd/versatile/versatile.c int board_early_init_f (void) · line 62
Quoted 10 lines
board/armltd/versatile/versatile.c +4
-0{/* arch number of Versatile Board */ +#ifdef CONFIG_ARCH_VERSATILE_AB + gd->bd->bi_arch_number =MACH_TYPE_VERSATILE_AB ; +#else gd->bd->bi_arch_number =MACH_TYPE_VERSATILE_PB ; +#endif /* adress of boot parameters */ gd->bd->bi_boot_params =0x00000100 ;
Applied to u-boot-arm/next, thanks!
Amicalement,
Signature · 1 line
Albert.