[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20130111175330.GH14149@atomide.com>
Date: Fri, 11 Jan 2013 09:53:30 -0800
From: Tony Lindgren <tony@...mide.com>
To: Matt Porter <mporter@...com>
Cc: Sekhar Nori <nsekhar@...com>,
Grant Likely <grant.likely@...retlab.ca>,
Mark Brown <broonie@...nsource.wolfsonmicro.com>,
Benoit Cousson <b-cousson@...com>,
Russell King <linux@....linux.org.uk>,
Vinod Koul <vinod.koul@...el.com>,
Rob Landley <rob@...dley.net>, Chris Ball <cjb@...top.org>,
Devicetree Discuss <devicetree-discuss@...ts.ozlabs.org>,
Linux OMAP List <linux-omap@...r.kernel.org>,
Linux ARM Kernel List <linux-arm-kernel@...ts.infradead.org>,
Linux DaVinci Kernel List
<davinci-linux-open-source@...ux.davincidsp.com>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
Linux Documentation List <linux-doc@...r.kernel.org>,
Linux MMC List <linux-mmc@...r.kernel.org>,
Linux SPI Devel List
<spi-devel-general@...ts.sourceforge.net>,
Arnd Bergmann <arnd@...db.de>, Dan Williams <djbw@...com>,
Rob Herring <rob.herring@...xeda.com>
Subject: Re: [PATCH v4 09/14] mmc: omap_hsmmc: set max_segs based on dma
engine limitations
* Matt Porter <mporter@...com> [130110 21:47]:
> The EDMA DMAC has a hardware limitation that prevents supporting
> scatter gather lists with any number of segments. The DMA Engine
> API reports the maximum number of segments a channel can support
> via the optional dma_get_channel_caps() API. If the nr_segs
> capability is present, the value is used to configure mmc->max_segs
> appropriately.
Acked-by: Tony Lindgren <tony@...mide.com>
> Signed-off-by: Matt Porter <mporter@...com>
> ---
> drivers/mmc/host/omap_hsmmc.c | 6 ++++++
> 1 file changed, 6 insertions(+)
>
> diff --git a/drivers/mmc/host/omap_hsmmc.c b/drivers/mmc/host/omap_hsmmc.c
> index e79b12d..f74bd69 100644
> --- a/drivers/mmc/host/omap_hsmmc.c
> +++ b/drivers/mmc/host/omap_hsmmc.c
> @@ -1769,6 +1769,7 @@ static int omap_hsmmc_probe(struct platform_device *pdev)
> const struct of_device_id *match;
> dma_cap_mask_t mask;
> unsigned tx_req, rx_req;
> + struct dmaengine_chan_caps *dma_chan_caps;
> struct pinctrl *pinctrl;
>
> match = of_match_device(of_match_ptr(omap_mmc_of_match), &pdev->dev);
> @@ -1935,6 +1936,11 @@ static int omap_hsmmc_probe(struct platform_device *pdev)
> goto err_irq;
> }
>
> + /* Some DMA Engines only handle a limited number of SG segments */
> + dma_chan_caps = dma_get_channel_caps(host->rx_chan, DMA_DEV_TO_MEM);
> + if (dma_chan_caps && dma_chan_caps->seg_nr)
> + mmc->max_segs = dma_chan_caps->seg_nr;
> +
> /* Request IRQ for MMC operations */
> ret = request_irq(host->irq, omap_hsmmc_irq, 0,
> mmc_hostname(mmc), host);
> --
> 1.7.9.5
>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists