From: Simon Arlott Date: Mon, 16 Nov 2015 22:05:39 +0000 (+0000) Subject: brcmnand: Clear EXT_ADDR error registers in PIO mode X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=0401669797488feb055521cade69b1d0e81669db;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git brcmnand: Clear EXT_ADDR error registers in PIO mode If an error occurs in flash above 4GB in PIO mode then the EXT_ADDR registers will be set to the location of the error and never cleared. Reset them to 0 before reading. Signed-off-by: Simon Arlott Signed-off-by: Brian Norris --- diff --git a/drivers/mtd/nand/brcmnand/brcmnand.c b/drivers/mtd/nand/brcmnand/brcmnand.c index 626a80eb76a1..8feee1e489cb 100644 --- a/drivers/mtd/nand/brcmnand/brcmnand.c +++ b/drivers/mtd/nand/brcmnand/brcmnand.c @@ -1405,6 +1405,8 @@ static int brcmnand_read_by_pio(struct mtd_info *mtd, struct nand_chip *chip, /* Clear error addresses */ brcmnand_write_reg(ctrl, BRCMNAND_UNCORR_ADDR, 0); brcmnand_write_reg(ctrl, BRCMNAND_CORR_ADDR, 0); + brcmnand_write_reg(ctrl, BRCMNAND_UNCORR_EXT_ADDR, 0); + brcmnand_write_reg(ctrl, BRCMNAND_CORR_EXT_ADDR, 0); brcmnand_write_reg(ctrl, BRCMNAND_CMD_EXT_ADDRESS, (host->cs << 16) | ((addr >> 32) & 0xffff));