[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1322095306-13156-2-git-send-email-b35362@freescale.com>
Date: Thu, 24 Nov 2011 08:41:45 +0800
From: <b35362@...escale.com>
To: <dwmw2@...radead.org>, <Artem.Bityutskiy@...ia.com>,
<scottwood@...escale.com>
CC: <linux-mtd@...ts.infradead.org>, <linuxppc-dev@...ts.ozlabs.org>,
<akpm@...ux-foundation.org>, <linux-kernel@...r.kernel.org>,
<leoli@...escale.com>
Subject: [PATCH 2/3] mtd/nand : set correct length to FBCR for a non-full-page write
From: Liu Shuo <b35362@...escale.com>
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 <b35362@...escale.com>
Signed-off-by: Li Yang <leoli@...escale.com>
---
drivers/mtd/nand/fsl_elbc_nand.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/drivers/mtd/nand/fsl_elbc_nand.c b/drivers/mtd/nand/fsl_elbc_nand.c
index 6fce7da..d634c5f 100644
--- a/drivers/mtd/nand/fsl_elbc_nand.c
+++ b/drivers/mtd/nand/fsl_elbc_nand.c
@@ -474,7 +474,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);
--
1.7.1
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists