[U-Boot] [PATCH 4/4] mx53loco: Add CONFIG_REVISION_TAG

Liu Hui-R64343 r64343 at freescale.com
Wed May 9 11:15:34 CEST 2012


>-----Original Message-----
>From: Fabio Estevam [mailto:festevam at gmail.com]
>Sent: Tuesday, May 08, 2012 4:26 AM
>To: u-boot at lists.denx.de
>Cc: sbabic at denx.de; Liu Hui-R64343; Estevam Fabio-R49496
>Subject: [PATCH 4/4] mx53loco: Add CONFIG_REVISION_TAG
>
>From: Fabio Estevam <fabio.estevam at freescale.com>
>
>FSL 2.6.35 kernel assumes that the bootloader passes the
>CONFIG_REVISION_TAG information.
>
>The kernel uses this data to distinguish between Dialog versus mc34708
>based boards, and also to distinguish between revA and revB of the mc34708
>based boards.
>
>Suggested-by: Yu Li <yk at magniel.com>
>Signed-off-by: Fabio Estevam <fabio.estevam at freescale.com>
>---
> board/freescale/mx53loco/mx53loco.c |    7 +++++++
> include/configs/mx53loco.h          |    1 +
> 2 files changed, 8 insertions(+), 0 deletions(-)
>
>diff --git a/board/freescale/mx53loco/mx53loco.c
>b/board/freescale/mx53loco/mx53loco.c
>index 4d3b73d..2f2c00c 100644
>--- a/board/freescale/mx53loco/mx53loco.c
>+++ b/board/freescale/mx53loco/mx53loco.c
>@@ -62,6 +62,13 @@ void dram_init_banksize(void)
> 	gd->bd->bi_dram[1].size = PHYS_SDRAM_2_SIZE;  }
>
>+u32 get_board_rev(void)
>+{
>+	/* TODO: Convert the register to proper io accessor */
>+	int rev = readl(IIM_BASE_ADDR + 0x878);
>+	return (get_cpu_rev() & ~(0xF << 8)) | (rev & 0xF) << 8; }
>+

As you said, could you please use accessor for it? 


> static void setup_iomux_uart(void)
> {
> 	/* UART1 RXD */
>diff --git a/include/configs/mx53loco.h b/include/configs/mx53loco.h index
>87f6ed1..eab0e27 100644
>--- a/include/configs/mx53loco.h
>+++ b/include/configs/mx53loco.h
>@@ -43,6 +43,7 @@
> #define CONFIG_BOARD_EARLY_INIT_F
> #define CONFIG_BOARD_LATE_INIT
> #define CONFIG_MXC_GPIO
>+#define CONFIG_REVISION_TAG
>
> #define CONFIG_MXC_UART
> #define CONFIG_MXC_UART_BASE	UART1_BASE
>--
>1.7.1
>




More information about the U-Boot mailing list