mirror of
https://github.com/Stichting-MINIX-Research-Foundation/u-boot.git
synced 2025-09-13 22:16:45 -04:00
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>
This commit is contained in:
parent
aaa8eec532
commit
4f41e7ea1a
@ -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 =
|
chip->bbt_erase_shift = chip->phys_erase_shift =
|
||||||
ffs(mtd->erasesize) - 1;
|
ffs(mtd->erasesize) - 1;
|
||||||
if (chip->chipsize & 0xffffffff)
|
if (chip->chipsize & 0xffffffff)
|
||||||
chip->chip_shift = ffs(chip->chipsize) - 1;
|
chip->chip_shift = ffs((unsigned)chip->chipsize) - 1;
|
||||||
else
|
else
|
||||||
chip->chip_shift = ffs((unsigned)(chip->chipsize >> 32)) + 31;
|
chip->chip_shift = ffs((unsigned)(chip->chipsize >> 32)) + 31;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user