]> git.sur5r.net Git - u-boot/blobdiff - drivers/mtd/nand/mxs_nand.c
mtd: nand: mxs invalidate dcache before DMA read
[u-boot] / drivers / mtd / nand / mxs_nand.c
index 33ce8174dc1b8e238770c254f5254cca8374974d..1d689015a5a2294a1b7aa8bc3fe87575e0f5cc7d 100644 (file)
@@ -462,6 +462,9 @@ static void mxs_nand_read_buf(struct mtd_info *mtd, uint8_t *buf, int length)
 
        mxs_dma_desc_append(channel, d);
 
+       /* Invalidate caches */
+       mxs_nand_inval_data_buf(nand_info);
+
        /* Execute the DMA chain. */
        ret = mxs_dma_go(channel);
        if (ret) {
@@ -628,6 +631,9 @@ static int mxs_nand_ecc_read_page(struct mtd_info *mtd, struct nand_chip *nand,
 
        mxs_dma_desc_append(channel, d);
 
+       /* Invalidate caches */
+       mxs_nand_inval_data_buf(nand_info);
+
        /* Execute the DMA chain. */
        ret = mxs_dma_go(channel);
        if (ret) {