nand/denali: Add a page check in denali_read_page & denali_read_page_raw
Linux-MTD Mailing List
linux-mtd at lists.infradead.org
Thu Aug 12 06:59:01 EDT 2010
Gitweb: http://git.infradead.org/?p=mtd-2.6.git;a=commit;h=7d8a26fd22c6944cb18a67c5b8d8255608a3ba98
Commit: 7d8a26fd22c6944cb18a67c5b8d8255608a3ba98
Parent: 628bfd4164502fa531b6d284cb6a18e337ec3f20
Author: Chuanxiao Dong <chuanxiao.dong at intel.com>
AuthorDate: Wed Aug 11 18:19:23 2010 +0800
Committer: David Woodhouse <David.Woodhouse at intel.com>
CommitDate: Thu Aug 12 11:10:40 2010 +0100
nand/denali: Add a page check in denali_read_page & denali_read_page_raw
Signed-off-by: Chuanxiao Dong <chuanxiao.dong at intel.com>
Signed-off-by: David Woodhouse <David.Woodhouse at intel.com>
---
drivers/mtd/nand/denali.c | 14 ++++++++++++++
1 files changed, 14 insertions(+), 0 deletions(-)
diff --git a/drivers/mtd/nand/denali.c b/drivers/mtd/nand/denali.c
index 5f7c8c8..017cde4 100644
--- a/drivers/mtd/nand/denali.c
+++ b/drivers/mtd/nand/denali.c
@@ -1149,6 +1149,13 @@ static int denali_read_page(struct mtd_info *mtd, struct nand_chip *chip,
INTR_STATUS0__ECC_ERR;
bool check_erased_page = false;
+ if (page != denali->page) {
+ dev_err(&denali->dev->dev, "IN %s: page %d is not"
+ " equal to denali->page %d, investigate!!",
+ __func__, page, denali->page);
+ BUG();
+ }
+
setup_ecc_for_xfer(denali, true, false);
denali_enable_dma(denali, true);
@@ -1193,6 +1200,13 @@ static int denali_read_page_raw(struct mtd_info *mtd, struct nand_chip *chip,
uint32_t irq_status = 0;
uint32_t irq_mask = INTR_STATUS0__DMA_CMD_COMP;
+ if (page != denali->page) {
+ dev_err(&denali->dev->dev, "IN %s: page %d is not"
+ " equal to denali->page %d, investigate!!",
+ __func__, page, denali->page);
+ BUG();
+ }
+
setup_ecc_for_xfer(denali, false, true);
denali_enable_dma(denali, true);
More information about the linux-mtd-cvs
mailing list