nand/denali: Fixed driver r/w bug
Subsystems (2)
PATCH v2 3/6 nand/denali: Fixed driver r/w bug
From 2e36a92751c8002164396c003dd1472392af1b26 Mon Sep 17 00:00:00 2001
From: Chuanxiao Dong <[email protected]>
Date: Thu, 12 Aug 2010 18:01:28 +0800
Subject: [PATCH 3/6] nand/denali: Fixed driver r/w bug
This issue is happened when using large NAND and some ONFI nand:
1) Large NAND need 32bits number to represent page id
2) Some Micro ONFI nand has a special OOB size
Signed-off-by Chuanxiao Dong <[email protected]>
--- drivers/mtd/nand/denali.c | 6 +++++- drivers/mtd/nand/denali.h | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-)
drivers/mtd/nand/denali.c +5 -1
@@ -2021,7 +2021,11 @@ static int denali_pci_probe(struct pci_dev *dev, const struct pci_device_id *id)* MTD known nothing about multi nand, * so we should tell it the real pagesize * and anything necessery -*/ +* Some NAND chip has a spectial OOB size, so here do +* a recheck +* */ + denali->mtd.oobsize =ioread32 (denali->flash_reg + +DEVICE_SPARE_AREA_SIZE ); denali->devnum =ioread32 (denali->flash_reg +DEVICES_CONNECTED ); denali->nand.chipsize <<= (denali->devnum -1 ); denali->nand.page_shift += (denali->devnum -1 );
drivers/mtd/nand/denali.h +1 -1
@@ -744,7 +744,7 @@ struct denali_nand_info {struct pci_dev *dev;int total_used_banks;uint32_t block;/* stored for future use */ -uint16_t page; +uint32_t page;void __iomem *flash_reg;/* Mapped io reg base address */ void __iomem *flash_mem;/* Mapped io reg base address */
Signature · 1 line
1.6.6.1