From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stefano Babic Date: Wed, 27 Nov 2013 13:51:06 +0100 Subject: [U-Boot] [PATCH 1/2] ARM: versatile: pass correct machine type for Versatile AB In-Reply-To: <201311271055.40073.marex@denx.de> References: <1385544812-22558-1-git-send-email-linus.walleij@linaro.org> <201311271055.40073.marex@denx.de> Message-ID: <5295EABA.10804@denx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de 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 >> Cc: Marek Vasut >> Signed-off-by: Linus Walleij >> --- >> 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 Best regards, Stefano Babic -- ===================================================================== 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 =====================================================================