[PATCH] mtd/gpmi : fix the wrong DMA command.

Subsystems: memory technology devices (mtd), nand flash subsystem, the rest

STALE5255d

4 messages, 3 authors, 2012-03-13 · open the first message on its own page

[PATCH] mtd/gpmi : fix the wrong DMA command.

From: Huang Shijie <hidden>
Date: 2012-03-12 02:22:18

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 <redacted>
---
 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) {
-- 
1.7.3.2

[PATCH] mtd/gpmi : fix the wrong DMA command.

From: Wolfram Sang <hidden>
Date: 2012-03-12 07:51:07

On Mon, Mar 12, 2012 at 10:22:18AM +0800, Huang Shijie wrote:
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 <redacted>
Thanks! What does happen because of this bug? Additional checksum errors? I
haven't seen many on MX28 IIRC, so I wonder.

-- 
Pengutronix e.K.                           | Wolfram Sang                |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20120312/fbb120b6/attachment-0001.sig>

[PATCH] mtd/gpmi : fix the wrong DMA command.

From: Huang Shijie <hidden>
Date: 2012-03-12 08:35:13

? 2012?03?12? 15:51, Wolfram Sang ??:
On Mon, Mar 12, 2012 at 10:22:18AM +0800, Huang Shijie wrote:
quoted
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 <redacted>
Thanks! What does happen because of this bug? Additional checksum errors? I
haven't seen many on MX28 IIRC, so I wonder.
The MX28 runs well without this patch. I guess the speed of mx28 is too
slow.

The bug only observed in mx6q. A DMA timeout occurs.

But if you apply this patch to mx28's code. A dma timeout occurs too.
This is why i sent the patch
"mxs-dma : rewrite the last parameter of mxs_dma_prep_slave_sg()"

IC guy told me to add a WAIT4END in the middle one of the ECC read page
chain, and disable the BCH in the last
DMA command of the chain. After this patch, the code follows this rule.


BR
Huang Shijie

[PATCH] mtd/gpmi : fix the wrong DMA command.

From: Bityutskiy, Artem <hidden>
Date: 2012-03-13 12:33:22

On Mon, 2012-03-12 at 10:22 +0800, Huang Shijie wrote:
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 <redacted>
Pushed to l2-mtd.git, thanks!

-- 
Best Regards,
Artem Bityutskiy
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20120313/69cc143a/attachment.sig>
-------------- next part --------------
---------------------------------------------------------------------
Intel Finland Oy
Registered Address: PL 281, 00181 Helsinki 
Business Identity Code: 0357606 - 4 
Domiciled in Helsinki 

This e-mail and any attachments may contain confidential material for
the sole use of the intended recipient(s). Any review or distribution
by others is strictly prohibited. If you are not the intended
recipient, please contact the sender and delete all copies.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help