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>

authored by Chuanxiao Dong and committed by David Woodhouse 7d8a26fd 628bfd41

+14
+14
drivers/mtd/nand/denali.c
··· 1149 1149 INTR_STATUS0__ECC_ERR; 1150 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 1159 setup_ecc_for_xfer(denali, true, false); 1153 1160 1154 1161 denali_enable_dma(denali, true); ··· 1199 1192 1200 1193 uint32_t irq_status = 0; 1201 1194 uint32_t irq_mask = INTR_STATUS0__DMA_CMD_COMP; 1195 + 1196 + if (page != denali->page) { 1197 + dev_err(&denali->dev->dev, "IN %s: page %d is not" 1198 + " equal to denali->page %d, investigate!!", 1199 + __func__, page, denali->page); 1200 + BUG(); 1201 + } 1202 1202 1203 1203 setup_ecc_for_xfer(denali, false, true); 1204 1204 denali_enable_dma(denali, true);