Commit 752b957a authored by Barry Song's avatar Barry Song Committed by David Woodhouse

mtd: Blackfin NFC: wait for the ECC reset to finish

When resetting the ECC registers/counters, the bit will automatically
clear itself once the reset has actually finished.  So make sure we
wait for that to occur before doing anything else rather than assuming
everything is peachy and proceeding with stale ECC values.
Signed-off-by: default avatarBarry Song <barry.song@analog.com>
Signed-off-by: default avatarMike Frysinger <vapier@gentoo.org>
Signed-off-by: default avatarDavid Woodhouse <David.Woodhouse@intel.com>
parent 00355b0b
...@@ -507,6 +507,8 @@ static void bf5xx_nand_dma_rw(struct mtd_info *mtd, ...@@ -507,6 +507,8 @@ static void bf5xx_nand_dma_rw(struct mtd_info *mtd,
*/ */
bfin_write_NFC_RST(ECC_RST); bfin_write_NFC_RST(ECC_RST);
SSYNC(); SSYNC();
while (bfin_read_NFC_RST() & ECC_RST)
cpu_relax();
disable_dma(CH_NFC); disable_dma(CH_NFC);
clear_dma_irqstat(CH_NFC); clear_dma_irqstat(CH_NFC);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment