[U-Boot] [PATCH 1/2] nitrogen6x: Pass the correct CPU revision to the kernel

Eric Nelson eric.nelson at boundarydevices.com
Tue Mar 26 16:24:33 CET 2013


Hi Fabio,

On 03/15/2013 02:06 PM, Fabio Estevam wrote:
> From: Fabio Estevam <fabio.estevam at freescale.com>
>
> As nitrogen6x boards support different i.MX6 flavors (quad, dual-lite and solo)
> the correct CPU revision needs to passed to the kernel, so call get_cpu_rev()
> instead of hardcoding it.
>
> Freescale 3.0.35 kernel assumes that the CPU revision is passed passed from the
> bootloader.
>
> Signed-off-by: Fabio Estevam <fabio.estevam at freescale.com>
> ---
>   board/boundary/nitrogen6x/nitrogen6x.c |    2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/board/boundary/nitrogen6x/nitrogen6x.c b/board/boundary/nitrogen6x/nitrogen6x.c
> index 229c237..fec0e3a 100644
> --- a/board/boundary/nitrogen6x/nitrogen6x.c
> +++ b/board/boundary/nitrogen6x/nitrogen6x.c
> @@ -330,7 +330,7 @@ int board_mmc_init(bd_t *bis)
>
>   u32 get_board_rev(void)
>   {
> -	return 0x63000;
> +	return get_cpu_rev();
>   }
>
>   #ifdef CONFIG_MXC_SPI
>

Since this convention is shared among at least SABRE Lite, SABRE SD,
Nitrogen6x and Wandboard, wouldn't a weak function in imx-common/cpu.c
be a better choice?

+#ifdef CONFIG_REVISION_TAG
+u32 __weak get_board_rev(void)
+{
+       return get_cpu_rev();
+}
+#endif

Then boards could override things, but will do the reasonable thing
without the extra code.



More information about the U-Boot mailing list