]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
Blackfin: nand: flush peripheral before polling it
authorGraf Yang <graf.yang@analog.com>
Sat, 4 Apr 2009 11:45:57 +0000 (07:45 -0400)
committerMike Frysinger <vapier@gentoo.org>
Mon, 6 Apr 2009 21:37:37 +0000 (17:37 -0400)
We need to make sure the data written to the nand flash controller makes
it there before we start polling its status register.  Otherwise, we may
get stale data and return before the controller is actually ready.

Signed-off-by: Graf Yang <graf.yang@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Acked-by: Scott Wood <scottwood@freescale.com>
drivers/mtd/nand/bfin_nand.c

index f6a0835b4b7f1b7e899a1a7953c40f8f551a99f5..f134ef100fed7515bb06b52b1d3c32e7a6a39d6e 100644 (file)
@@ -98,6 +98,7 @@ static void bfin_nfc_read_buf(struct mtd_info *mtd, uint8_t *buf, int len)
 
                /* Contents do not matter */
                bfin_write_NFC_DATA_RD(0x0000);
+               SSYNC();
 
                while (!(bfin_read_NFC_IRQSTAT() & RD_RDY))
                        if (ctrlc())