From: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
To: Phil Edworthy <phil.edworthy@renesas.com>
Cc: "linux-mmc@vger.kernel.org" <linux-mmc@vger.kernel.org>,
Chris Ball <chris@printf.net>,
"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
Rob Herring <robh+dt@kernel.org>,
Grant Likely <grant.likely@linaro.org>
Subject: RE: [PATCH v2] mmc: add a driver for the Renesas usdhi6rol0 SD/SDIO host controller
Date: Sat, 3 May 2014 11:08:44 +0200 (CEST) [thread overview]
Message-ID: <Pine.LNX.4.64.1405031046560.23253@axis700.grange> (raw)
In-Reply-To: <a3075651ae064d2fb70073eb3472ede4@HKXPR06MB168.apcprd06.prod.outlook.com>
Hi Phil,
Thanks for the comments.
On Mon, 28 Apr 2014, Phil Edworthy wrote:
> Hi Guennadi,
>
> On 26 April 2014 13:06, Guennadi wrote:
> > Subject: [PATCH v2] mmc: add a driver for the Renesas usdhi6rol0 SD/SDIO
> > host controller
> >
> > This patch adds a driver for the Renesas usdhi6rol0 SD/SDIO host controller
> > in both PIO and DMA modes.
>
> ...
> > +static void usdhi6_dma_stop_unmap(struct usdhi6_host *host)
> > +{
> > + struct mmc_data *data = host->mrq->data;
> > +
> > + if (!host->dma_active)
> > + return;
> > +
> > + usdhi6_write(host, USDHI6_CC_EXT_MODE, 0);
> > + host->dma_active = false;
> > +
> > + if (data->flags & MMC_DATA_READ)
> > + /* TODO: do we have to synchronise? */
> > + dma_unmap_sg(host->chan_rx->device->dev, data->sg,
> > + data->sg_len, DMA_FROM_DEVICE);
> Yes, you have to sync, so you can remove this TODO comment.
Why do you think so? If we really do, we'd have to add it. And I did think
synchronisation was needed, that's why I posted this patch series:
http://thread.gmane.org/gmane.linux.kernel.mmc/24969
but it never got applied, even though it got 2 acks. And actually now I
think that synchronisation isn't needed. I think dma_map_sg() /
dma_unmap_sg() do that for us already. E.g.
dma_map_sg_attrs()
arm_dma_map_page()
__dma_page_cpu_to_dev()
dmac_map_area()
cpu_cache.dma_map_area()
v7_dma_inv_range()
v7_dma_clean_range()
Similar for unmapping. So, I think it would be best to remove the comment
without adding synchronisation.
Let me do this: I'll prepare a separate patch for adding dma syncs, but I
won't submit it for now, or I can just provide it for reference.
> ...
> > +static int usdhi6_probe(struct platform_device *pdev)
> > +{
> ...
> > + host = mmc_priv(mmc);
> > + host->mmc = mmc;
> > + host->wait = USDHI6_WAIT_FOR_REQUEST;
> > + host->timeout = msecs_to_jiffies(1000);
> In all places you use host->timeout, the code uses host->timeout * 4.
> Wouldn't it better to just set it here to 4 seconds?
ok, I'll do that for v3.
Thanks
Guennadi
---
Guennadi Liakhovetski, Ph.D.
Freelance Open-Source Software Developer
http://www.open-technology.de/
next prev parent reply other threads:[~2014-05-03 9:08 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-04-26 12:05 [PATCH v2] mmc: add a driver for the Renesas usdhi6rol0 SD/SDIO host controller Guennadi Liakhovetski
2014-04-28 15:02 ` Phil Edworthy
2014-05-03 9:08 ` Guennadi Liakhovetski [this message]
2014-05-06 8:41 ` Phil Edworthy
2014-05-24 10:45 ` Guennadi Liakhovetski
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=Pine.LNX.4.64.1405031046560.23253@axis700.grange \
--to=g.liakhovetski@gmx.de \
--cc=chris@printf.net \
--cc=devicetree@vger.kernel.org \
--cc=grant.likely@linaro.org \
--cc=linux-mmc@vger.kernel.org \
--cc=phil.edworthy@renesas.com \
--cc=robh+dt@kernel.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox