From: Phil Edworthy <phil.edworthy@renesas.com>
To: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
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: Tue, 6 May 2014 08:41:52 +0000 [thread overview]
Message-ID: <1d83df00171643148fc62bf493876a86@HKXPR06MB168.apcprd06.prod.outlook.com> (raw)
In-Reply-To: <Pine.LNX.4.64.1405031046560.23253@axis700.grange>
Hi Guennadi,
On 03 May 2014 10:09, Guennadi wrote:
> 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.
Ok, my comment was based on the fact that your above patches got acks... Based on your comments above, I think it's best just to remove the TODO comment.
> > ...
> > > +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
Thanks
Phil
next prev parent reply other threads:[~2014-05-06 8:41 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
2014-05-06 8:41 ` Phil Edworthy [this message]
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=1d83df00171643148fc62bf493876a86@HKXPR06MB168.apcprd06.prod.outlook.com \
--to=phil.edworthy@renesas.com \
--cc=chris@printf.net \
--cc=devicetree@vger.kernel.org \
--cc=g.liakhovetski@gmx.de \
--cc=grant.likely@linaro.org \
--cc=linux-mmc@vger.kernel.org \
--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