aboutsummaryrefslogtreecommitdiff
path: root/board
diff options
context:
space:
mode:
authorFabio Estevam2012-05-08 03:40:49 +0000
committerAlbert ARIBAUD2012-05-15 08:31:34 +0200
commit54cd1dee8f9537c2e3d5bfe2029bf31b2b1cf2f3 (patch)
treedeb53e4d51a34d3451268a28cc23727b3bb025ff /board
parent768a05971030c0c57e05063f20449b8d4138293e (diff)
mx53loco: Add CONFIG_REVISION_TAG
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@magniel.com> Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com> Acked-by: Stefano Babic <sbabic@denx.de>
Diffstat (limited to 'board')
-rw-r--r--board/freescale/mx53loco/mx53loco.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/board/freescale/mx53loco/mx53loco.c b/board/freescale/mx53loco/mx53loco.c
index a49b00a8125..fb138957dbe 100644
--- a/board/freescale/mx53loco/mx53loco.c
+++ b/board/freescale/mx53loco/mx53loco.c
@@ -62,6 +62,18 @@ void dram_init_banksize(void)
gd->bd->bi_dram[1].size = PHYS_SDRAM_2_SIZE;
}
+u32 get_board_rev(void)
+{
+ struct iim_regs *iim = (struct iim_regs *)IMX_IIM_BASE;
+ struct fuse_bank *bank = &iim->bank[0];
+ struct fuse_bank0_regs *fuse =
+ (struct fuse_bank0_regs *)bank->fuse_regs;
+
+ int rev = readl(&fuse->gp[6]);
+
+ return (get_cpu_rev() & ~(0xF << 8)) | (rev & 0xF) << 8;
+}
+
static void setup_iomux_uart(void)
{
/* UART1 RXD */