The interrupt mask is incorrect in case of HW error correction.
The driver will time out waiting for the wrong interrupts.

Signed-off-by: Steffen Trumtrar <s.trumt...@pengutronix.de>
---
 drivers/mtd/nand/nand_denali.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/mtd/nand/nand_denali.c b/drivers/mtd/nand/nand_denali.c
index bf9a05d85264..ceb5a8b87e42 100644
--- a/drivers/mtd/nand/nand_denali.c
+++ b/drivers/mtd/nand/nand_denali.c
@@ -1102,8 +1102,9 @@ static int denali_read_page(struct mtd_info *mtd, struct 
nand_chip *chip,
        size_t size = denali->mtd.writesize + denali->mtd.oobsize;
 
        uint32_t irq_status;
-       uint32_t irq_mask = INTR_STATUS__ECC_TRANSACTION_DONE |
-                           INTR_STATUS__ECC_ERR;
+       uint32_t irq_mask = denali->have_hw_ecc_fixup ?
+               (INTR_STATUS__DMA_CMD_COMP) :
+               (INTR_STATUS__ECC_TRANSACTION_DONE | INTR_STATUS__ECC_ERR);
        bool check_erased_page = false;
 
        if (page != denali->page) {
-- 
2.9.3


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

Reply via email to