mtd: gpmi: fix the wrong DMA command.
Linux-MTD Mailing List
linux-mtd at lists.infradead.org
Mon Mar 26 20:59:17 EDT 2012
Gitweb: http://git.infradead.org/?p=mtd-2.6.git;a=commit;h=09ef90d965fff295da8d5359ac21e54c02236dba
Commit: 09ef90d965fff295da8d5359ac21e54c02236dba
Parent: 6a918bade9dab40aaef80559bd1169c69e8d69cb
Author: Huang Shijie <b32955 at freescale.com>
AuthorDate: Mon Mar 12 10:22:18 2012 +0800
Committer: David Woodhouse <David.Woodhouse at intel.com>
CommitDate: Tue Mar 27 00:56:52 2012 +0100
mtd: gpmi: fix the wrong DMA command.
The last DMA command of ECC read page is used to disable the BCH module.
But the original code missed to set the pio[2] which is used to set the
GPMI_HW_GPMI_ECCCTRL register. fix it now.
Signed-off-by: Huang Shijie <b32955 at freescale.com>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy at linux.intel.com>
Signed-off-by: David Woodhouse <David.Woodhouse at intel.com>
---
drivers/mtd/nand/gpmi-nand/gpmi-lib.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/drivers/mtd/nand/gpmi-nand/gpmi-lib.c b/drivers/mtd/nand/gpmi-nand/gpmi-lib.c
index 5e3c505..c34dab1 100644
--- a/drivers/mtd/nand/gpmi-nand/gpmi-lib.c
+++ b/drivers/mtd/nand/gpmi-nand/gpmi-lib.c
@@ -1061,8 +1061,9 @@ int gpmi_read_page(struct gpmi_nand_data *this,
| BF_GPMI_CTRL0_ADDRESS(address)
| BF_GPMI_CTRL0_XFER_COUNT(geo->page_size);
pio[1] = 0;
+ pio[2] = 0; /* clear GPMI_HW_GPMI_ECCCTRL, disable the BCH. */
desc = channel->device->device_prep_slave_sg(channel,
- (struct scatterlist *)pio, 2,
+ (struct scatterlist *)pio, 3,
DMA_TRANS_NONE,
DMA_PREP_INTERRUPT | DMA_CTRL_ACK);
if (!desc) {
More information about the linux-mtd-cvs
mailing list