summaryrefslogtreecommitdiff
path: root/drivers/mtd/nand
diff options
context:
space:
mode:
authorSandeep Paulraj <s-paulraj@ti.com>2009-11-07 14:24:06 -0500
committerScott Wood <scottwood@freescale.com>2009-11-13 16:56:15 -0600
commit4f41e7ea1a17ba7207ca41379bf344b317e72c12 (patch)
treef69c73e8ee24c564184edea4b3d0835334e705da /drivers/mtd/nand
parentaaa8eec532876c47acfd31bf9b573a00eaad92ae (diff)
downloadu-boot-imx-4f41e7ea1a17ba7207ca41379bf344b317e72c12.zip
u-boot-imx-4f41e7ea1a17ba7207ca41379bf344b317e72c12.tar.gz
u-boot-imx-4f41e7ea1a17ba7207ca41379bf344b317e72c12.tar.bz2
NAND: Correct the "chip_shift" calculation
This patch updates the "chip_shift" calculation in the NAND driver. This is being done to sync up the NAND driver with the kernel NAND driver. Signed-off-by: Sandeep Paulraj <s-paulraj@ti.com>
Diffstat (limited to 'drivers/mtd/nand')
-rw-r--r--drivers/mtd/nand/nand_base.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/mtd/nand/nand_base.c b/drivers/mtd/nand/nand_base.c
index 30a3e9e..d5c53fe 100644
--- a/drivers/mtd/nand/nand_base.c
+++ b/drivers/mtd/nand/nand_base.c
@@ -2628,7 +2628,7 @@ static struct nand_flash_dev *nand_get_flash_type(struct mtd_info *mtd,
chip->bbt_erase_shift = chip->phys_erase_shift =
ffs(mtd->erasesize) - 1;
if (chip->chipsize & 0xffffffff)
- chip->chip_shift = ffs(chip->chipsize) - 1;
+ chip->chip_shift = ffs((unsigned)chip->chipsize) - 1;
else
chip->chip_shift = ffs((unsigned)(chip->chipsize >> 32)) + 31;