summaryrefslogtreecommitdiff
path: root/board/freescale
diff options
context:
space:
mode:
authorLily Zhang <r58066@freescale.com>2009-12-27 17:21:58 +0800
committerLily Zhang <r58066@freescale.com>2009-12-27 17:34:10 +0800
commita7fc31a95a55983ddd0015d3778e0fe1c2d220dc (patch)
tree825424608852d43b29df2dcf3dbad4e01159df76 /board/freescale
parent5c5128b60555aa6a793eac9e507d5c984bd5f3ec (diff)
downloadu-boot-imx-a7fc31a95a55983ddd0015d3778e0fe1c2d220dc.zip
u-boot-imx-a7fc31a95a55983ddd0015d3778e0fe1c2d220dc.tar.gz
u-boot-imx-a7fc31a95a55983ddd0015d3778e0fe1c2d220dc.tar.bz2
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 <r58066@freescale.com>
Diffstat (limited to 'board/freescale')
-rw-r--r--board/freescale/mx51_bbg/mx51_bbg.c22
1 files changed, 11 insertions, 11 deletions
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 [");