All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] brcmnand: Clear EXT_ADDR error registers in PIO mode
@ 2015-11-16 22:05 Simon Arlott
  2015-11-17  0:40 ` Brian Norris
  2015-12-01  1:53 ` Brian Norris
  0 siblings, 2 replies; 7+ messages in thread
From: Simon Arlott @ 2015-11-16 22:05 UTC (permalink / raw)
  To: Brian Norris, David Woodhouse
  Cc: linux-mtd, Linux Kernel Mailing List, Kevin Cernekee

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@fire.lp0.eu>
---
 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 12c6190..2c8f67f 100644
--- a/drivers/mtd/nand/brcmnand/brcmnand.c
+++ b/drivers/mtd/nand/brcmnand/brcmnand.c
@@ -1400,6 +1400,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));
-- 
2.1.4

-- 
Simon Arlott

^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2015-12-01  1:53 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-11-16 22:05 [PATCH] brcmnand: Clear EXT_ADDR error registers in PIO mode Simon Arlott
2015-11-17  0:40 ` Brian Norris
2015-11-17  7:41   ` Simon Arlott
2015-11-17 17:55     ` Brian Norris
2015-11-20 18:42       ` Simon Arlott
2015-12-01  1:47         ` Brian Norris
2015-12-01  1:53 ` Brian Norris

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.