From: Marek Vasut <marex@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH V2 3/3] mtd: nand: mxs invalidate dcache before DMA read
Date: Fri, 31 Jul 2015 17:01:41 +0200 [thread overview]
Message-ID: <201507311701.41855.marex@denx.de> (raw)
In-Reply-To: <CAJ+vNU1XQromntStzmAOaX1Qp1FTvLBW2s7gnRcJHosx+SZprw@mail.gmail.com>
On Friday, July 31, 2015 at 04:49:50 PM, Tim Harvey wrote:
> On Tue, Jul 21, 2015 at 1:15 AM, Peng Fan <Peng.Fan@freescale.com> wrote:
> > Follow linux dma flow:
> > Before DMA read, be sure to invalidate the cache over the address
> > range of DMA buffer to prevent cache coherency problems.
> > After DMA read, invalidate dcache again.
> >
> > Signed-off-by: Peng Fan <Peng.Fan@freescale.com>
> > Acked-by: Marek Vasut <marex@denx.de>
> > ---
> >
> > Changes v2:
> > Add Marek's Acked by
> >
> > drivers/mtd/nand/mxs_nand.c | 6 ++++++
> > 1 file changed, 6 insertions(+)
> >
> > diff --git a/drivers/mtd/nand/mxs_nand.c b/drivers/mtd/nand/mxs_nand.c
> > index 97011b2..f15cf36 100644
> > --- a/drivers/mtd/nand/mxs_nand.c
> > +++ b/drivers/mtd/nand/mxs_nand.c
> > @@ -469,6 +469,9 @@ static void mxs_nand_read_buf(struct mtd_info *mtd,
> > uint8_t *buf, int length)
> >
> > mxs_dma_desc_append(channel, d);
> >
> > + /* Invalidate caches */
> > + mxs_nand_inval_data_buf(nand_info);
> > +
> >
> > /* Execute the DMA chain. */
> > ret = mxs_dma_go(channel);
> > if (ret) {
> >
> > @@ -635,6 +638,9 @@ static int mxs_nand_ecc_read_page(struct mtd_info
> > *mtd, struct nand_chip *nand,
> >
> > mxs_dma_desc_append(channel, d);
> >
> > + /* Invalidate caches */
> > + mxs_nand_inval_data_buf(nand_info);
> > +
> >
> > /* Execute the DMA chain. */
> > ret = mxs_dma_go(channel);
> > if (ret) {
> >
> > --
> > 1.8.4
>
> Acked-by: Tim Harvey <tharvey@gateworks.com>
>
> This resolves an issue I've been digging into regarding IMX6 NAND read
> failures.
Indeed, this should be applied ASAP.
Best regards,
Marek Vasut
next prev parent reply other threads:[~2015-07-31 15:01 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-07-21 8:15 [U-Boot] [PATCH resend V2 1/3] mtd: nand: mxs support oobsize bigger than 512 Peng Fan
2015-07-21 8:15 ` [U-Boot] [PATCH V2 2/3] mtd: nand: mxs check maximum ecc that platfrom supports Peng Fan
2015-07-31 16:14 ` Tim Harvey
2015-08-25 21:05 ` Scott Wood
2015-08-26 0:33 ` Peng Fan
2015-08-26 2:14 ` Scott Wood
2015-08-26 1:30 ` Peng Fan
2015-08-26 7:59 ` Stefano Babic
2015-07-21 8:15 ` [U-Boot] [PATCH V2 3/3] mtd: nand: mxs invalidate dcache before DMA read Peng Fan
2015-07-21 8:41 ` Marek Vasut
2015-07-31 14:49 ` Tim Harvey
2015-07-31 15:01 ` Marek Vasut [this message]
2015-07-31 16:20 ` [U-Boot] [PATCH resend V2 1/3] mtd: nand: mxs support oobsize bigger than 512 Tim Harvey
2015-07-31 17:07 ` Scott Wood
2015-08-01 1:15 ` Peng Fan
2015-08-01 2:36 ` Scott Wood
2015-08-01 5:56 ` Peng Fan
2015-08-01 15:18 ` Marek Vasut
2015-08-01 18:32 ` Scott Wood
2015-08-01 18:38 ` Marek Vasut
2015-08-01 18:54 ` Scott Wood
2015-08-02 3:18 ` Peng Fan
2015-08-10 1:17 ` Peng Fan
2015-08-10 23:31 ` Scott Wood
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=201507311701.41855.marex@denx.de \
--to=marex@denx.de \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.