From mboxrd@z Thu Jan 1 00:00:00 1970 From: Phil Edworthy Subject: RE: [PATCH v2] mmc: add a driver for the Renesas usdhi6rol0 SD/SDIO host controller Date: Mon, 28 Apr 2014 15:02:46 +0000 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 8BIT Return-path: In-Reply-To: Content-Language: en-US Sender: linux-mmc-owner@vger.kernel.org To: Guennadi Liakhovetski , "linux-mmc@vger.kernel.org" Cc: Chris Ball , "devicetree@vger.kernel.org" , Rob Herring , Grant Likely List-Id: devicetree@vger.kernel.org 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. ... > +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? Thanks Phil