From: Liu Shuo Date: Sun, 4 Dec 2011 04:31:37 +0000 (+0800) Subject: mtd: nand: set correct length to FBCR for a non-full-page write X-Git-Tag: next-20111206~47^2~1 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=96af2c0af1ca31f0fbf1acfc565d971299737a92;p=karo-tx-linux.git mtd: nand: set correct length to FBCR for a non-full-page write When we do a non-full-page write, the length be set to FBCR should not be 'elbc_fcm_ctrl->index', it should be 'elbc_fcm_ctrl->index - elbc_fcm_ctrl->column'. Signed-off-by: Liu Shuo Signed-off-by: Li Yang Signed-off-by: Artem Bityutskiy --- diff --git a/drivers/mtd/nand/fsl_elbc_nand.c b/drivers/mtd/nand/fsl_elbc_nand.c index c554c2f9c0ec..7db573e9bf78 100644 --- a/drivers/mtd/nand/fsl_elbc_nand.c +++ b/drivers/mtd/nand/fsl_elbc_nand.c @@ -467,7 +467,8 @@ static void fsl_elbc_cmdfunc(struct mtd_info *mtd, unsigned int command, */ if (elbc_fcm_ctrl->oob || elbc_fcm_ctrl->column != 0 || elbc_fcm_ctrl->index != mtd->writesize + mtd->oobsize) - out_be32(&lbc->fbcr, elbc_fcm_ctrl->index); + out_be32(&lbc->fbcr, + elbc_fcm_ctrl->index - elbc_fcm_ctrl->column); else out_be32(&lbc->fbcr, 0);