From a7fc31a95a55983ddd0015d3778e0fe1c2d220dc Mon Sep 17 00:00:00 2001 From: Lily Zhang Date: Sun, 27 Dec 2009 17:21:58 +0800 Subject: ENGR00118739 Correct the board version of MX51 EVK The SD card in MMC Slot2 can not be detected. This is because the board version of MX51 EVK doesn't keep synchronization with kernel. So the card detect PIN is not configured well. Here Bit 11-Bit 8 in system_rev indicates the board version. The fix is to set Bit 11 -Bit8 as 1 for MX51 EVK board. Signed-off-by: Lily Zhang --- board/freescale/mx51_bbg/mx51_bbg.c | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) (limited to 'board/freescale/mx51_bbg/mx51_bbg.c') diff --git a/board/freescale/mx51_bbg/mx51_bbg.c b/board/freescale/mx51_bbg/mx51_bbg.c index 4279ac6..60fc704 100644 --- a/board/freescale/mx51_bbg/mx51_bbg.c +++ b/board/freescale/mx51_bbg/mx51_bbg.c @@ -121,11 +121,7 @@ static inline void setup_soc_rev(void) system_rev = 0x51000 | CHIP_REV_1_1; break; case 0x10: - if ((__REG(GPIO1_BASE_ADDR + 0x0) & (0x1 << 22)) == 0) { - system_rev = 0x51000 | CHIP_REV_2_5; - } else { - system_rev = 0x51000 | CHIP_REV_2_0; - } + system_rev = 0x51000 | CHIP_REV_2_0; break; case 0x20: system_rev = 0x51000 | CHIP_REV_3_0; @@ -135,9 +131,11 @@ static inline void setup_soc_rev(void) } } -static inline void set_board_rev(int rev) +static inline void set_board_rev() { - system_rev |= (rev & 0xF) << 8; + if ((__REG(GPIO1_BASE_ADDR + 0x0) & (0x1 << 22)) == 0) + system_rev |= BOARD_REV_2_0 << BOARD_VER_OFFSET; + } inline int is_soc_rev(int rev) @@ -664,6 +662,7 @@ int board_init(void) { setup_boot_device(); setup_soc_rev(); + set_board_rev(); gd->bd->bi_arch_number = MACH_TYPE_MX51_BABBAGE; /* board id for linux */ /* address of boot parameters */ @@ -886,13 +885,14 @@ int checkboard(void) { printf("Board: MX51 BABBAGE "); - if (system_rev & CHIP_REV_3_0) { + if (is_soc_rev(CHIP_REV_3_0) == 0) { printf("3.0 ["); - } else if (system_rev & CHIP_REV_2_5) { + } else if ((is_soc_rev(CHIP_REV_2_0) == 0) + && (system_rev & (BOARD_REV_2_0 << BOARD_VER_OFFSET))) { printf("2.5 ["); - } else if (system_rev & CHIP_REV_2_0) { + } else if (is_soc_rev(CHIP_REV_2_0) == 0) { printf("2.0 ["); - } else if (system_rev & CHIP_REV_1_1) { + } else if (is_soc_rev(CHIP_REV_1_1) == 0) { printf("1.1 ["); } else { printf("1.0 ["); -- cgit v1.1