[U-Boot] [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.
Cc: Stefano Babic sbabic@denx.de Cc: Marek Vasut marex@denx.de Signed-off-by: Linus Walleij linus.walleij@linaro.org --- board/armltd/versatile/versatile.c | 4 ++++ 1 file changed, 4 insertions(+)
diff --git a/board/armltd/versatile/versatile.c b/board/armltd/versatile/versatile.c index 30a3b904db4c..4e2d3421d8b1 100644 --- a/board/armltd/versatile/versatile.c +++ b/board/armltd/versatile/versatile.c @@ -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;

Dear 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 sbabic@denx.de Cc: Marek Vasut marex@denx.de Signed-off-by: Linus Walleij linus.walleij@linaro.org
board/armltd/versatile/versatile.c | 4 ++++ 1 file changed, 4 insertions(+)
diff --git a/board/armltd/versatile/versatile.c b/board/armltd/versatile/versatile.c index 30a3b904db4c..4e2d3421d8b1 100644 --- a/board/armltd/versatile/versatile.c +++ b/board/armltd/versatile/versatile.c @@ -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;
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:
Acked-by: Marek Vasut marex@denx.de
Best regards, Marek Vasut

On Wed, Nov 27, 2013 at 10:55 AM, Marek Vasut marex@denx.de wrote:
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.
Can you not detect which board it is dynamically to avoid the ifdef?
No :-/
Yours, Linus Walleij

On 27/11/2013 10:55, Marek Vasut wrote:
Dear 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 sbabic@denx.de Cc: Marek Vasut marex@denx.de Signed-off-by: Linus Walleij linus.walleij@linaro.org
board/armltd/versatile/versatile.c | 4 ++++ 1 file changed, 4 insertions(+)
diff --git a/board/armltd/versatile/versatile.c b/board/armltd/versatile/versatile.c index 30a3b904db4c..4e2d3421d8b1 100644 --- a/board/armltd/versatile/versatile.c +++ b/board/armltd/versatile/versatile.c @@ -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;
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.
Acked-by: Stefano Babic sbabic@denx.de
Best regards, Stefano Babic

On Wed, Nov 27, 2013 at 1:51 PM, Stefano Babic sbabic@denx.de wrote:
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

Dear Linus Walleij,
+CC Albert, he's the ARM guy. Stefano is the Freescale IMX guy :)
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 sbabic@denx.de Cc: Marek Vasut marex@denx.de Signed-off-by: Linus Walleij linus.walleij@linaro.org
board/armltd/versatile/versatile.c | 4 ++++ 1 file changed, 4 insertions(+)
diff --git a/board/armltd/versatile/versatile.c b/board/armltd/versatile/versatile.c index 30a3b904db4c..4e2d3421d8b1 100644 --- a/board/armltd/versatile/versatile.c +++ b/board/armltd/versatile/versatile.c @@ -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;
Best regards, Marek Vasut

On Wed, Nov 27, 2013 at 11:02 AM, Marek Vasut marex@denx.de wrote:
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

Hi Linus,
On Wed, 27 Nov 2013 10:33:32 +0100, Linus Walleij linus.walleij@linaro.org wrote:
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 sbabic@denx.de Cc: Marek Vasut marex@denx.de Signed-off-by: Linus Walleij linus.walleij@linaro.org
board/armltd/versatile/versatile.c | 4 ++++ 1 file changed, 4 insertions(+)
diff --git a/board/armltd/versatile/versatile.c b/board/armltd/versatile/versatile.c index 30a3b904db4c..4e2d3421d8b1 100644 --- a/board/armltd/versatile/versatile.c +++ b/board/armltd/versatile/versatile.c @@ -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;
Applied to u-boot-arm/next, thanks!
Amicalement,
participants (4)
-
Albert ARIBAUD
-
Linus Walleij
-
Marek Vasut
-
Stefano Babic