diff options
author | Wolfgang Denk <wd@denx.de> | 2008-12-30 23:30:47 +0100 |
---|---|---|
committer | Wolfgang Denk <wd@denx.de> | 2008-12-30 23:30:47 +0100 |
commit | f85cd46918241842546e5021d0b88db2be50a048 (patch) | |
tree | 09bd0d7b2bcd71dd2c905c28c5bf8b10aff91944 /drivers/mtd/nand | |
parent | 22bab87db1b065aa66b15c2b47c89247289d4839 (diff) | |
parent | d9011f9b75561a0bd9254934c2bb2bc799d4f645 (diff) | |
download | u-boot-imx-f85cd46918241842546e5021d0b88db2be50a048.zip u-boot-imx-f85cd46918241842546e5021d0b88db2be50a048.tar.gz u-boot-imx-f85cd46918241842546e5021d0b88db2be50a048.tar.bz2 |
Merge branch 'master' of git://git.denx.de/u-boot-mpc85xx
Diffstat (limited to 'drivers/mtd/nand')
-rw-r--r-- | drivers/mtd/nand/fsl_elbc_nand.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/mtd/nand/fsl_elbc_nand.c b/drivers/mtd/nand/fsl_elbc_nand.c index 367c7d7..3f318e0 100644 --- a/drivers/mtd/nand/fsl_elbc_nand.c +++ b/drivers/mtd/nand/fsl_elbc_nand.c @@ -718,7 +718,7 @@ static void fsl_elbc_ctrl_init(void) int board_nand_init(struct nand_chip *nand) { struct fsl_elbc_mtd *priv; - uint32_t br, or; + uint32_t br = 0, or = 0; if (!elbc_ctrl) { fsl_elbc_ctrl_init(); @@ -737,11 +737,13 @@ int board_nand_init(struct nand_chip *nand) * if we could pass more than one datum to the NAND driver... */ for (priv->bank = 0; priv->bank < MAX_BANKS; priv->bank++) { + phys_addr_t base_addr = virt_to_phys(nand->IO_ADDR_R); + br = in_be32(&elbc_ctrl->regs->bank[priv->bank].br); or = in_be32(&elbc_ctrl->regs->bank[priv->bank].or); if ((br & BR_V) && (br & BR_MSEL) == BR_MS_FCM && - (br & or & BR_BA) == (phys_addr_t)nand->IO_ADDR_R) + (br & or & BR_BA) == BR_PHYS_ADDR(base_addr)) break; } |