brcmnand: Clear EXT_ADDR error registers in PIO mode

Linux-MTD Mailing List linux-mtd at lists.infradead.org
Tue Jan 12 15:59:10 PST 2016


Gitweb:     http://git.infradead.org/?p=mtd-2.6.git;a=commit;h=0401669797488feb055521cade69b1d0e81669db
Commit:     0401669797488feb055521cade69b1d0e81669db
Parent:     fe7579d6122f2869d00b55842bca9e2a9be51607
Author:     Simon Arlott <simon at fire.lp0.eu>
AuthorDate: Mon Nov 16 22:05:39 2015 +0000
Committer:  Brian Norris <computersforpeace at gmail.com>
CommitDate: Mon Nov 30 17:52:29 2015 -0800

    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 <simon at fire.lp0.eu>
    Signed-off-by: Brian Norris <computersforpeace at gmail.com>
---
 drivers/mtd/nand/brcmnand/brcmnand.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/mtd/nand/brcmnand/brcmnand.c b/drivers/mtd/nand/brcmnand/brcmnand.c
index 626a80e..8feee1e 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));



More information about the linux-mtd-cvs mailing list