]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
mtd: gpmi: fix the wrong DMA command.
authorHuang Shijie <b32955@freescale.com>
Mon, 12 Mar 2012 02:22:18 +0000 (10:22 +0800)
committerDavid Woodhouse <David.Woodhouse@intel.com>
Mon, 26 Mar 2012 23:56:52 +0000 (00:56 +0100)
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@freescale.com>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
drivers/mtd/nand/gpmi-nand/gpmi-lib.c

index 5e3c5051e6a298d102a7a64e31e1e6ed89038015..c34dab17682e1b41c4800b202ca3c1b2cc9a3970 100644 (file)
@@ -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) {