mtd/gpmi : fix the wrong DMA command.
Subsystems (2)
PATCH 1/1 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.
--- drivers/mtd/nand/gpmi-nand/gpmi-lib.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-)
drivers/mtd/nand/gpmi-nand/gpmi-lib.c +2 -1
@@ -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) {
Signature · 1 line
1.7.3.2
PATCH 1/1 mtd/gpmi : fix the wrong DMA command.
Quoted 5 lines · Huang Shijie
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_ECCCTRLregister. fix it now.Signed-off-by Huang Shijie <[email protected]>
Thanks! What does happen because of this bug? Additional checksum errors? I haven't seen many on MX28 IIRC, so I wonder.
Signature · 9 lines
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 1/1 mtd/gpmi : fix the wrong DMA command.
? 2012?03?12? 15:51, Wolfram Sang ??:
Quoted 9 lines · Huang Shijie
Quoted 5 lines
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_ECCCTRLregister. fix it now.Signed-off-by Huang Shijie <[email protected]>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
Bityutskiy, Artem
AppliedPATCH 1/1 mtd/gpmi : fix the wrong DMA command.
In reply to Huang ShijieQuoted 5 lines · Huang Shijie
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_ECCCTRLregister. fix it now.Signed-off-by Huang Shijie <[email protected]>
Pushed to l2-mtd.git, thanks!
Signature · 20 lines
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.