From mboxrd@z Thu Jan 1 00:00:00 1970 From: "S, Venkatraman" Subject: Re: [PATCH 1/1] mmc: host: enable OMAP DMA engine support for omap hosts by default Date: Fri, 20 Jul 2012 15:31:56 +0530 Message-ID: References: <20120718065951.GH6522@atomide.com> <20120718071039.GI6522@atomide.com> <20120719113246.GN6522@atomide.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Return-path: In-Reply-To: Sender: linux-omap-owner@vger.kernel.org To: Tony Lindgren Cc: "Shilimkar, Santosh" , Javier Martinez Canillas , Javier Martinez Canillas , Kevin Hilman , Russell King , linux-omap@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Chris Ball , linux-mmc@vger.kernel.org List-Id: linux-mmc@vger.kernel.org On Fri, Jul 20, 2012 at 2:58 PM, S, Venkatraman wrote: > On Thu, Jul 19, 2012 at 5:02 PM, Tony Lindgren wrote: >> * Shilimkar, Santosh [120718 02:49]: >>> >>> "The patch simply make them depend on DMA_OMAP since DMA_OMAP >>> will select DMA_ENGINE automatically" >>> >>> This won't be true if the DMA selection are not done >>> at ARCH_OMAP level as discussed in this thread. >>> >>> Having said that, I think Russell and Tony need to >>> take call on how this needs to be handled. >> >> As the DMA channels can run out, drivers should also work >> without DMA. And building everything as modules should be >> possible for the distro kernels. >> >> So I'd rather not have either select or depends and have >> the drivers fixed. >> > > Ok - I'll work on getting polling mode to work, but as you know it's > not the mode to get the best performance out of the device. > I see that you've also merged the changes to omap2plus_defconfig, which should > get MMC working as before DMA Engine conversion. > > There's a small patch needed to omap_hsmmc to return a non-zero error code > during the probe error path. This will atleast make probe failure > explicit when DMA > is not available. > > Let me know if you want me to post it separately as a patch.. > > diff --git a/drivers/mmc/host/omap_hsmmc.c b/drivers/mmc/host/omap_hsmmc.c > index 2338703..892a046 100644 > --- a/drivers/mmc/host/omap_hsmmc.c > +++ b/drivers/mmc/host/omap_hsmmc.c > @@ -1773,7 +1773,7 @@ static int __devinit omap_hsmmc_probe(struct > platform_device *pdev) > struct mmc_host *mmc; > struct omap_hsmmc_host *host = NULL; > struct resource *res; > - int ret, irq; > + int ret = -ENXIO, irq; > const struct of_device_id *match; > dma_cap_mask_t mask; > unsigned tx_req, rx_req; Please ignore this patch. The correct one was posted by Kevin last week [1]. An additional patch is needed on top of that to fix other error paths, I'll send both now. [1] http://marc.info/?l=linux-omap&m=134196391719430&w=2 From mboxrd@z Thu Jan 1 00:00:00 1970 From: svenkatr@ti.com (S, Venkatraman) Date: Fri, 20 Jul 2012 15:31:56 +0530 Subject: [PATCH 1/1] mmc: host: enable OMAP DMA engine support for omap hosts by default In-Reply-To: References: <20120718065951.GH6522@atomide.com> <20120718071039.GI6522@atomide.com> <20120719113246.GN6522@atomide.com> Message-ID: To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org On Fri, Jul 20, 2012 at 2:58 PM, S, Venkatraman wrote: > On Thu, Jul 19, 2012 at 5:02 PM, Tony Lindgren wrote: >> * Shilimkar, Santosh [120718 02:49]: >>> >>> "The patch simply make them depend on DMA_OMAP since DMA_OMAP >>> will select DMA_ENGINE automatically" >>> >>> This won't be true if the DMA selection are not done >>> at ARCH_OMAP level as discussed in this thread. >>> >>> Having said that, I think Russell and Tony need to >>> take call on how this needs to be handled. >> >> As the DMA channels can run out, drivers should also work >> without DMA. And building everything as modules should be >> possible for the distro kernels. >> >> So I'd rather not have either select or depends and have >> the drivers fixed. >> > > Ok - I'll work on getting polling mode to work, but as you know it's > not the mode to get the best performance out of the device. > I see that you've also merged the changes to omap2plus_defconfig, which should > get MMC working as before DMA Engine conversion. > > There's a small patch needed to omap_hsmmc to return a non-zero error code > during the probe error path. This will atleast make probe failure > explicit when DMA > is not available. > > Let me know if you want me to post it separately as a patch.. > > diff --git a/drivers/mmc/host/omap_hsmmc.c b/drivers/mmc/host/omap_hsmmc.c > index 2338703..892a046 100644 > --- a/drivers/mmc/host/omap_hsmmc.c > +++ b/drivers/mmc/host/omap_hsmmc.c > @@ -1773,7 +1773,7 @@ static int __devinit omap_hsmmc_probe(struct > platform_device *pdev) > struct mmc_host *mmc; > struct omap_hsmmc_host *host = NULL; > struct resource *res; > - int ret, irq; > + int ret = -ENXIO, irq; > const struct of_device_id *match; > dma_cap_mask_t mask; > unsigned tx_req, rx_req; Please ignore this patch. The correct one was posted by Kevin last week [1]. An additional patch is needed on top of that to fix other error paths, I'll send both now. [1] http://marc.info/?l=linux-omap&m=134196391719430&w=2