* [PATCH] mtd/gpmi : fix the wrong DMA command.
@ 2012-03-12 2:22 Huang Shijie
2012-03-12 7:51 ` Wolfram Sang
2012-03-13 12:33 ` Bityutskiy, Artem
0 siblings, 2 replies; 4+ messages in thread
From: Huang Shijie @ 2012-03-12 2:22 UTC (permalink / raw)
To: linux-arm-kernel
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>
---
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
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH] mtd/gpmi : fix the wrong DMA command.
2012-03-12 2:22 [PATCH] mtd/gpmi : fix the wrong DMA command Huang Shijie
@ 2012-03-12 7:51 ` Wolfram Sang
2012-03-12 8:35 ` Huang Shijie
2012-03-13 12:33 ` Bityutskiy, Artem
1 sibling, 1 reply; 4+ messages in thread
From: Wolfram Sang @ 2012-03-12 7:51 UTC (permalink / raw)
To: linux-arm-kernel
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 <b32955@freescale.com>
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>
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH] mtd/gpmi : fix the wrong DMA command.
2012-03-12 7:51 ` Wolfram Sang
@ 2012-03-12 8:35 ` Huang Shijie
0 siblings, 0 replies; 4+ messages in thread
From: Huang Shijie @ 2012-03-12 8:35 UTC (permalink / raw)
To: linux-arm-kernel
? 2012?03?12? 15:51, Wolfram Sang ??:
> 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 <b32955@freescale.com>
> 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
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH] mtd/gpmi : fix the wrong DMA command.
2012-03-12 2:22 [PATCH] mtd/gpmi : fix the wrong DMA command Huang Shijie
2012-03-12 7:51 ` Wolfram Sang
@ 2012-03-13 12:33 ` Bityutskiy, Artem
1 sibling, 0 replies; 4+ messages in thread
From: Bityutskiy, Artem @ 2012-03-13 12:33 UTC (permalink / raw)
To: linux-arm-kernel
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 <b32955@freescale.com>
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.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2012-03-13 12:33 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-03-12 2:22 [PATCH] mtd/gpmi : fix the wrong DMA command Huang Shijie
2012-03-12 7:51 ` Wolfram Sang
2012-03-12 8:35 ` Huang Shijie
2012-03-13 12:33 ` Bityutskiy, Artem
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).