summaryrefslogtreecommitdiff
path: root/board/freescale/m5373evb
diff options
context:
space:
mode:
authorTsiChung Liew <Tsi-Chung.Liew@freescale.com>2009-03-02 19:16:45 +0000
committerJohn Rigby <jrigby@freescale.com>2009-03-17 15:58:37 -0600
commit9017d9325a5067b2ab0d70a2d3c907620c9ab7f8 (patch)
treec97754e224acfe4d9ada80a0b6005b6ef8b9aed1 /board/freescale/m5373evb
parent42b68af1062f75bb4a91cf47e329a7e8100cd815 (diff)
downloadu-boot-imx-9017d9325a5067b2ab0d70a2d3c907620c9ab7f8.zip
u-boot-imx-9017d9325a5067b2ab0d70a2d3c907620c9ab7f8.tar.gz
u-boot-imx-9017d9325a5067b2ab0d70a2d3c907620c9ab7f8.tar.bz2
ColdFire: Fix M5329EVB and M5373EVB nand issue
The Nand flash was unable to read and write properly due to Nand Chip Select (nCE) setup was in reverse order. Also, increase the Nand time out value to 60. Signed-off-by: TsiChung Liew <Tsi-Chung.Liew@freescale.com>
Diffstat (limited to 'board/freescale/m5373evb')
-rw-r--r--board/freescale/m5373evb/nand.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/board/freescale/m5373evb/nand.c b/board/freescale/m5373evb/nand.c
index 3ebef05..df8c03b 100644
--- a/board/freescale/m5373evb/nand.c
+++ b/board/freescale/m5373evb/nand.c
@@ -47,10 +47,12 @@ static void nand_hwcontrol(struct mtd_info *mtdinfo, int cmd, unsigned int ctrl)
ulong IO_ADDR_W = (ulong) this->IO_ADDR_W;
IO_ADDR_W &= ~(SET_ALE | SET_CLE);
- *nCE &= 0xFFFB;
if (ctrl & NAND_NCE)
+ *nCE &= 0xFFFB;
+ else
*nCE |= 0x0004;
+
if (ctrl & NAND_CLE)
IO_ADDR_W |= SET_CLE;
if (ctrl & NAND_ALE)
@@ -82,7 +84,7 @@ int board_nand_init(struct nand_chip *nand)
gpio->pclrr_timer = 0;
gpio->podr_timer = 0;
- nand->chip_delay = 50;
+ nand->chip_delay = 60;
nand->ecc.mode = NAND_ECC_SOFT;
nand->cmd_ctrl = nand_hwcontrol;