From: Huang Shijie Date: Mon, 12 Mar 2012 02:22:18 +0000 (+0800) Subject: mtd: gpmi: fix the wrong DMA command. X-Git-Tag: v3.4-rc1~16^2~27 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=09ef90d965fff295da8d5359ac21e54c02236dba;p=profile%2Fivi%2Fkernel-adaptation-intel-automotive.git 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 Signed-off-by: Artem Bityutskiy Signed-off-by: David Woodhouse --- 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) {