From: Marek Vasut <marex@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 2/2] mmc: tegra: invalidate complete cachelines
Date: Mon, 5 Nov 2012 23:59:04 +0100 [thread overview]
Message-ID: <201211052359.04927.marex@denx.de> (raw)
In-Reply-To: <5098187E.6020304@wwwdotorg.org>
Dear Stephen Warren,
> On 11/02/2012 04:10 PM, Marek Vasut wrote:
> > Dear Stephen Warren,
> >
> >> On 11/02/2012 03:28 PM, Marek Vasut wrote:
> >>> Dear Stephen Warren,
> >>>
> >>>> On 11/02/2012 02:38 PM, Marek Vasut wrote:
> >> ...
> >>
> >>>>> Dumb question -- might be unrelated. Does the tegra mmc driver do
> >>>>> DMA? And if so, what happens if you do raw read to unaligned address
> >>>>> (aka. how come you don't need the bounce buffer)?
> >>>>
> >>>> Yes, it does DMA, I believe. (At least if it doesn't, I have no idea
> >>>> why the driver is flushing caches!)
> >>>>
> >>>> I guess we only support the use of aligned addresses, so e.g. the
> >>>> following would work:
> >>>>
> >>>> ext2load mmc 0:1 0x00100000 /file
> >>>>
> >>>> but the following wouldn't:
> >>>>
> >>>> ext2load mmc 0:1 0x00100004 /file
> >>>>
> >>>> which while I suppose it is an artificial restriction, hasn't been an
> >>>> issue in practice.
> >>>
> >>> Then just enable the bounce buffer and it will work ;-)
> >>
> >> You suggested that last time, and it made no difference then... In fact,
> >> the config option you mentioned isn't used anywhere in the srouce tree
> >> except adding bouncebuf.o
> >
> > Bouncebuf.o ?
>
> common/bouncebuf.c
Ugh, it was applied ...
> >> into the build right now; which config option
> >> do you think I should use?
> >
> > CONFIG_BOUNCE_BUFFER
> >
> > It's used on mx28-based boards.
>
> Ahah, there's much more to it than just defining the config option, and
> grep'ing for the config option doesn't reveal that.
>
> Defining CONFIG_BOUNCE_BUFFER simply pulls in bouncebuf.o into the
> build. It's then up to the individual MMC/... driver to actually make
> use of the new functions - i.e. explicitly call e.g.
> bounce_buffer_start(). The MXS MMC driver calls these without any ifdef
> CONFIG_BOUNCE_BUFFER, and hence doesn't show up when you grep for that.
> I had assumed that such functionality would be a conditional part of the
> MMC core rather than the individual drivers, hence had missed the usage
> in the MXS driver.
Sorry about that, I didn't know the patch was pulled in so I expected the old
approach.
> So, that config option plus some changes to the Tegra MMC driver might
> work - I'll take a look. However, making that change will simply hide
> any unaligned buffer and reduce performance, so I'd still prefer to
> require that buffers be aligned in the future where possible.
Best regards,
Marek Vasut
next prev parent reply other threads:[~2012-11-05 22:59 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-04-24 7:53 [U-Boot] [PATCH 1/2] part_dos: allocate cacheline aligned buffers Thierry Reding
2012-04-24 7:53 ` [U-Boot] [PATCH 2/2] mmc: tegra: invalidate complete cachelines Thierry Reding
2012-04-25 22:54 ` Mike Frysinger
2012-04-26 6:18 ` Thierry Reding
2012-04-26 10:16 ` Simon Glass
2012-04-26 10:34 ` Thierry Reding
2012-04-27 5:29 ` Mike Frysinger
2012-04-27 5:50 ` Simon Glass
2012-11-02 20:22 ` Stephen Warren
2012-11-02 20:25 ` Simon Glass
2012-11-02 20:38 ` Marek Vasut
2012-11-02 20:58 ` Stephen Warren
2012-11-02 21:28 ` Marek Vasut
2012-11-02 21:31 ` Stephen Warren
2012-11-02 22:10 ` Marek Vasut
2012-11-05 19:50 ` Stephen Warren
2012-11-05 22:59 ` Marek Vasut [this message]
2012-11-05 23:07 ` Simon Glass
2012-11-02 20:55 ` Stephen Warren
2012-04-24 18:31 ` [U-Boot] [PATCH 1/2] part_dos: allocate cacheline aligned buffers Simon Glass
2012-04-24 18:45 ` Thierry Reding
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=201211052359.04927.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.