diff options
author | Chuanxiao Dong <chuanxiao.dong@intel.com> | 2010-08-11 06:19:23 -0400 |
---|---|---|
committer | David Woodhouse <David.Woodhouse@intel.com> | 2010-08-12 06:10:40 -0400 |
commit | 7d8a26fd22c6944cb18a67c5b8d8255608a3ba98 (patch) | |
tree | 51291248a39228cb7bd097fb2402c177e5d48bfb /drivers/mtd | |
parent | 628bfd4164502fa531b6d284cb6a18e337ec3f20 (diff) |
nand/denali: Add a page check in denali_read_page & denali_read_page_raw
Signed-off-by: Chuanxiao Dong <chuanxiao.dong@intel.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Diffstat (limited to 'drivers/mtd')
-rw-r--r-- | 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 5f7c8c8b8b67..017cde48f75d 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, | |||
1149 | INTR_STATUS0__ECC_ERR; | 1149 | INTR_STATUS0__ECC_ERR; |
1150 | bool check_erased_page = false; | 1150 | bool check_erased_page = false; |
1151 | 1151 | ||
1152 | if (page != denali->page) { | ||
1153 | dev_err(&denali->dev->dev, "IN %s: page %d is not" | ||
1154 | " equal to denali->page %d, investigate!!", | ||
1155 | __func__, page, denali->page); | ||
1156 | BUG(); | ||
1157 | } | ||
1158 | |||
1152 | setup_ecc_for_xfer(denali, true, false); | 1159 | setup_ecc_for_xfer(denali, true, false); |
1153 | 1160 | ||
1154 | denali_enable_dma(denali, true); | 1161 | denali_enable_dma(denali, true); |
@@ -1193,6 +1200,13 @@ static int denali_read_page_raw(struct mtd_info *mtd, struct nand_chip *chip, | |||
1193 | uint32_t irq_status = 0; | 1200 | uint32_t irq_status = 0; |
1194 | uint32_t irq_mask = INTR_STATUS0__DMA_CMD_COMP; | 1201 | uint32_t irq_mask = INTR_STATUS0__DMA_CMD_COMP; |
1195 | 1202 | ||
1203 | if (page != denali->page) { | ||
1204 | dev_err(&denali->dev->dev, "IN %s: page %d is not" | ||
1205 | " equal to denali->page %d, investigate!!", | ||
1206 | __func__, page, denali->page); | ||
1207 | BUG(); | ||
1208 | } | ||
1209 | |||
1196 | setup_ecc_for_xfer(denali, false, true); | 1210 | setup_ecc_for_xfer(denali, false, true); |
1197 | denali_enable_dma(denali, true); | 1211 | denali_enable_dma(denali, true); |
1198 | 1212 | ||