1 From 7603c2bd0f61fb4c14b4cc2e39d4fc8cc4729cdd Mon Sep 17 00:00:00 2001
2 From: Terry Lv <r65388@freescale.com>
3 Date: Thu, 23 Jul 2009 14:53:18 +0800
4 Subject: [PATCH] ENGR00114367: Add BABBAGE machine id, BBG2.5 rev id for rootfs init.
6 Update mach-types for BBG board.
8 Signed-off-by: Terry Lv <r65388@freescale.com>
10 board/freescale/imx51/imx51.c | 21 ++++++++++++++++++---
11 include/asm-arm/arch-mx51/mx51.h | 1 +
12 2 files changed, 19 insertions(+), 3 deletions(-)
14 diff --git a/board/freescale/imx51/imx51.c b/board/freescale/imx51/imx51.c
15 index 5c3c022..c8efa0f 100644
16 --- a/board/freescale/imx51/imx51.c
17 +++ b/board/freescale/imx51/imx51.c
18 @@ -53,7 +53,11 @@ static inline void setup_soc_rev(void)
19 system_rev = 0x51000 | CHIP_REV_1_1;
22 - system_rev = 0x51000 | CHIP_REV_2_0;
23 + if ((__REG(GPIO1_BASE_ADDR + 0x0) & (0x1 << 22)) == 0) {
24 + system_rev = 0x51000 | CHIP_REV_2_5;
26 + system_rev = 0x51000 | CHIP_REV_2_0;
30 system_rev = 0x51000 | CHIP_REV_1_0;
31 @@ -457,7 +461,7 @@ int board_init(void)
35 - gd->bd->bi_arch_number = MACH_TYPE_MX51_3DS; /* board id for linux */
36 + gd->bd->bi_arch_number = MACH_TYPE_MX51_BABBAGE; /* board id for linux */
37 /* address of boot parameters */
38 gd->bd->bi_boot_params = PHYS_SDRAM_1 + 0x100;
40 @@ -477,7 +481,18 @@ int board_late_init(void)
44 - printf("Board: MX51 3STACK [");
45 + printf("Board: MX51 BABBAGE ");
47 + if (system_rev & CHIP_REV_2_5) {
49 + } else if (system_rev & CHIP_REV_2_0) {
51 + } else if (system_rev & CHIP_REV_1_1) {
57 switch (__REG(SRC_BASE_ADDR + 0x8)) {
60 diff --git a/include/asm-arm/arch-mx51/mx51.h b/include/asm-arm/arch-mx51/mx51.h
61 index 14c2b2d..533919a 100644
62 --- a/include/asm-arm/arch-mx51/mx51.h
63 +++ b/include/asm-arm/arch-mx51/mx51.h
65 #define CHIP_REV_1_0 0x10
66 #define CHIP_REV_1_1 0x11
67 #define CHIP_REV_2_0 0x20
68 +#define CHIP_REV_2_5 0x120
70 #define BOARD_REV_1_0 0x0
71 #define BOARD_REV_2_0 0x1