Merge branch 'core-rcu-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git...
[sfrench/cifs-2.6.git] / drivers / mtd / nand / lpc32xx_mlc.c
index 5796468db653450494876bcf6c5da772f7f6bd3e..e357948a75052a01b8e69ab45c28425313bbee7d 100644 (file)
@@ -461,7 +461,7 @@ static int lpc32xx_read_page(struct mtd_info *mtd, struct nand_chip *chip,
        }
 
        /* Writing Command and Address */
-       chip->cmdfunc(mtd, NAND_CMD_READ0, 0, page);
+       nand_read_page_op(chip, page, 0, NULL, 0);
 
        /* For all sub-pages */
        for (i = 0; i < host->mlcsubpages; i++) {
@@ -522,6 +522,8 @@ static int lpc32xx_write_page_lowlevel(struct mtd_info *mtd,
                memcpy(dma_buf, buf, mtd->writesize);
        }
 
+       nand_prog_page_begin_op(chip, page, 0, NULL, 0);
+
        for (i = 0; i < host->mlcsubpages; i++) {
                /* Start Encode */
                writeb(0x00, MLC_ECC_ENC_REG(host->io_base));
@@ -550,7 +552,8 @@ static int lpc32xx_write_page_lowlevel(struct mtd_info *mtd,
                /* Wait for Controller Ready */
                lpc32xx_waitfunc_controller(mtd, chip);
        }
-       return 0;
+
+       return nand_prog_page_end_op(chip);
 }
 
 static int lpc32xx_read_oob(struct mtd_info *mtd, struct nand_chip *chip,