diff options
-rw-r--r-- | board/freescale/imx51/imx51.c | 21 | ||||
-rw-r--r-- | include/asm-arm/arch-mx51/mx51.h | 1 |
2 files changed, 19 insertions, 3 deletions
diff --git a/board/freescale/imx51/imx51.c b/board/freescale/imx51/imx51.c index 5c3c022..c8efa0f 100644 --- a/board/freescale/imx51/imx51.c +++ b/board/freescale/imx51/imx51.c @@ -53,7 +53,11 @@ static inline void setup_soc_rev(void) system_rev = 0x51000 | CHIP_REV_1_1; break; case 0x10: - system_rev = 0x51000 | CHIP_REV_2_0; + if ((__REG(GPIO1_BASE_ADDR + 0x0) & (0x1 << 22)) == 0) { + system_rev = 0x51000 | CHIP_REV_2_5; + } else { + system_rev = 0x51000 | CHIP_REV_2_0; + } break; default: system_rev = 0x51000 | CHIP_REV_1_0; @@ -457,7 +461,7 @@ int board_init(void) { setup_soc_rev(); - gd->bd->bi_arch_number = MACH_TYPE_MX51_3DS; /* board id for linux */ + gd->bd->bi_arch_number = MACH_TYPE_MX51_BABBAGE; /* board id for linux */ /* address of boot parameters */ gd->bd->bi_boot_params = PHYS_SDRAM_1 + 0x100; @@ -477,7 +481,18 @@ int board_late_init(void) int checkboard(void) { - printf("Board: MX51 3STACK ["); + printf("Board: MX51 BABBAGE "); + + if (system_rev & CHIP_REV_2_5) { + printf("2.5 ["); + } else if (system_rev & CHIP_REV_2_0) { + printf("2.0 ["); + } else if (system_rev & CHIP_REV_1_1) { + printf("1.1 ["); + } else { + printf("1.0 ["); + } + switch (__REG(SRC_BASE_ADDR + 0x8)) { case 0x0001: printf("POR"); diff --git a/include/asm-arm/arch-mx51/mx51.h b/include/asm-arm/arch-mx51/mx51.h index 14c2b2d..533919a 100644 --- a/include/asm-arm/arch-mx51/mx51.h +++ b/include/asm-arm/arch-mx51/mx51.h @@ -392,6 +392,7 @@ #define CHIP_REV_1_0 0x10 #define CHIP_REV_1_1 0x11 #define CHIP_REV_2_0 0x20 +#define CHIP_REV_2_5 0x120 #define BOARD_REV_1_0 0x0 #define BOARD_REV_2_0 0x1 |