Re: [PATCH] mmc: mmci: Allow MMCI to request channels with information acquired from DT

2013-04-30 Thread Lee Jones
On Tue, 30 Apr 2013, Linus Walleij wrote: > On Wed, Apr 24, 2013 at 12:58 PM, Lee Jones wrote: > > > Currently, if DMA information isn't passed from platform data, then DMA > > will not be used. This patch allows DMA information obtained though Device > > Tree to be used as well. > > > > Cc:

Re: [PATCH] mmc: mmci: Allow MMCI to request channels with information acquired from DT

2013-04-30 Thread Linus Walleij
On Wed, Apr 24, 2013 at 12:58 PM, Lee Jones wrote: > Currently, if DMA information isn't passed from platform data, then DMA > will not be used. This patch allows DMA information obtained though Device > Tree to be used as well. > > Cc: Russell King > Cc: Chris Ball > Cc:

Re: [PATCH] mmc: mmci: Allow MMCI to request channels with information acquired from DT

2013-04-30 Thread Linus Walleij
On Wed, Apr 24, 2013 at 12:58 PM, Lee Jones lee.jo...@linaro.org wrote: Currently, if DMA information isn't passed from platform data, then DMA will not be used. This patch allows DMA information obtained though Device Tree to be used as well. Cc: Russell King li...@arm.linux.org.uk Cc:

Re: [PATCH] mmc: mmci: Allow MMCI to request channels with information acquired from DT

2013-04-30 Thread Lee Jones
On Tue, 30 Apr 2013, Linus Walleij wrote: On Wed, Apr 24, 2013 at 12:58 PM, Lee Jones lee.jo...@linaro.org wrote: Currently, if DMA information isn't passed from platform data, then DMA will not be used. This patch allows DMA information obtained though Device Tree to be used as well.

[PATCH] mmc: mmci: Allow MMCI to request channels with information acquired from DT

2013-04-24 Thread Lee Jones
Currently, if DMA information isn't passed from platform data, then DMA will not be used. This patch allows DMA information obtained though Device Tree to be used as well. Cc: Russell King Cc: Chris Ball Cc: linux-...@vger.kernel.org Signed-off-by: Lee Jones --- drivers/mmc/host/mmci.c | 43

[PATCH] mmc: mmci: Allow MMCI to request channels with information acquired from DT

2013-04-24 Thread Lee Jones
Currently, if DMA information isn't passed from platform data, then DMA will not be used. This patch allows DMA information obtained though Device Tree to be used as well. Cc: Russell King li...@arm.linux.org.uk Cc: Chris Ball c...@laptop.org Cc: linux-...@vger.kernel.org Signed-off-by: Lee Jones

Re: [PATCH] mmc: mmci: Allow MMCI to request channels with information acquired from DT

2013-04-18 Thread Russell King - ARM Linux
On Thu, Apr 18, 2013 at 11:25:44AM +0200, Arnd Bergmann wrote: > +static void mmci_dma_setup(struct device *dev, struct mmci_host *host) > +{ > + const char *rxname, *txname; > + > + host->dma_rx_channel = dma_request_slave_channel(dev, "rx"); > + host->dma_tx_channel =

Re: [PATCH] mmc: mmci: Allow MMCI to request channels with information acquired from DT

2013-04-18 Thread Arnd Bergmann
On Thursday 18 April 2013, Russell King - ARM Linux wrote: > On Thu, Apr 18, 2013 at 09:02:38AM +0100, Lee Jones wrote: > > @@ -321,19 +323,21 @@ static void mmci_dma_setup(struct mmci_host *host) > >* attempt to use it bidirectionally, however if it is > >* is specified but cannot

Re: [PATCH] mmc: mmci: Allow MMCI to request channels with information acquired from DT

2013-04-18 Thread Ulf Hansson
On 18 April 2013 10:02, Lee Jones wrote: >> I think you can further simplify this, given that in the DT case we always >> allocate a zeroed mmci_platform_data for host->plat, so !plat cannot happen >> when we get here. > > Okay, third time lucky. :) > > diff --git a/drivers/mmc/host/mmci.c

Re: [PATCH] mmc: mmci: Allow MMCI to request channels with information acquired from DT

2013-04-18 Thread Russell King - ARM Linux
On Thu, Apr 18, 2013 at 09:02:38AM +0100, Lee Jones wrote: > @@ -321,19 +323,21 @@ static void mmci_dma_setup(struct mmci_host *host) >* attempt to use it bidirectionally, however if it is >* is specified but cannot be located, DMA will be disabled. >*/ > - if

Re: [PATCH] mmc: mmci: Allow MMCI to request channels with information acquired from DT

2013-04-18 Thread Lee Jones
> I think you can further simplify this, given that in the DT case we always > allocate a zeroed mmci_platform_data for host->plat, so !plat cannot happen > when we get here. Okay, third time lucky. :) diff --git a/drivers/mmc/host/mmci.c b/drivers/mmc/host/mmci.c index 372e921..3260ab4 100644

Re: [PATCH] mmc: mmci: Allow MMCI to request channels with information acquired from DT

2013-04-18 Thread Lee Jones
I think you can further simplify this, given that in the DT case we always allocate a zeroed mmci_platform_data for host-plat, so !plat cannot happen when we get here. Okay, third time lucky. :) diff --git a/drivers/mmc/host/mmci.c b/drivers/mmc/host/mmci.c index 372e921..3260ab4 100644 ---

Re: [PATCH] mmc: mmci: Allow MMCI to request channels with information acquired from DT

2013-04-18 Thread Russell King - ARM Linux
On Thu, Apr 18, 2013 at 09:02:38AM +0100, Lee Jones wrote: @@ -321,19 +323,21 @@ static void mmci_dma_setup(struct mmci_host *host) * attempt to use it bidirectionally, however if it is * is specified but cannot be located, DMA will be disabled. */ - if

Re: [PATCH] mmc: mmci: Allow MMCI to request channels with information acquired from DT

2013-04-18 Thread Ulf Hansson
On 18 April 2013 10:02, Lee Jones lee.jo...@linaro.org wrote: I think you can further simplify this, given that in the DT case we always allocate a zeroed mmci_platform_data for host-plat, so !plat cannot happen when we get here. Okay, third time lucky. :) diff --git

Re: [PATCH] mmc: mmci: Allow MMCI to request channels with information acquired from DT

2013-04-18 Thread Arnd Bergmann
On Thursday 18 April 2013, Russell King - ARM Linux wrote: On Thu, Apr 18, 2013 at 09:02:38AM +0100, Lee Jones wrote: @@ -321,19 +323,21 @@ static void mmci_dma_setup(struct mmci_host *host) * attempt to use it bidirectionally, however if it is * is specified but cannot be

Re: [PATCH] mmc: mmci: Allow MMCI to request channels with information acquired from DT

2013-04-18 Thread Russell King - ARM Linux
On Thu, Apr 18, 2013 at 11:25:44AM +0200, Arnd Bergmann wrote: +static void mmci_dma_setup(struct device *dev, struct mmci_host *host) +{ + const char *rxname, *txname; + + host-dma_rx_channel = dma_request_slave_channel(dev, rx); + host-dma_tx_channel =

Re: [PATCH] mmc: mmci: Allow MMCI to request channels with information acquired from DT

2013-04-17 Thread Arnd Bergmann
On Wednesday 17 April 2013, Lee Jones wrote: > > This looks unnecessarily complex. > > That thought did cross my mind. > > > Why not just do dma_request_slave_channel_compat() unconditionally here? > > So how about something like this instead, as it keeps the current > semantics, and only

Re: [PATCH] mmc: mmci: Allow MMCI to request channels with information acquired from DT

2013-04-17 Thread Lee Jones
> This looks unnecessarily complex. That thought did cross my mind. > Why not just do dma_request_slave_channel_compat() unconditionally here? So how about something like this instead, as it keeps the current semantics, and only differs in the case of DT. diff --git a/drivers/mmc/host/mmci.c

Re: [PATCH] mmc: mmci: Allow MMCI to request channels with information acquired from DT

2013-04-17 Thread Arnd Bergmann
On Wednesday 17 April 2013, Lee Jones wrote: > #ifdef CONFIG_DMA_ENGINE > -static void mmci_dma_setup(struct mmci_host *host) > +static void mmci_dma_setup(struct amba_device *dev, > +struct mmci_host *host) > { > + struct device_node *np = dev->dev.of_node; >

[PATCH] mmc: mmci: Allow MMCI to request channels with information acquired from DT

2013-04-17 Thread Lee Jones
Currently, if DMA information isn't passed from platform data, then DMA will not be used. This patch allows DMA information obtained though Device Tree to be used as well. Cc: Russell King Cc: Chris Ball Cc: linux-...@vger.kernel.org Signed-off-by: Lee Jones --- drivers/mmc/host/mmci.c | 43

[PATCH] mmc: mmci: Allow MMCI to request channels with information acquired from DT

2013-04-17 Thread Lee Jones
Currently, if DMA information isn't passed from platform data, then DMA will not be used. This patch allows DMA information obtained though Device Tree to be used as well. Cc: Russell King li...@arm.linux.org.uk Cc: Chris Ball c...@laptop.org Cc: linux-...@vger.kernel.org Signed-off-by: Lee Jones

Re: [PATCH] mmc: mmci: Allow MMCI to request channels with information acquired from DT

2013-04-17 Thread Arnd Bergmann
On Wednesday 17 April 2013, Lee Jones wrote: #ifdef CONFIG_DMA_ENGINE -static void mmci_dma_setup(struct mmci_host *host) +static void mmci_dma_setup(struct amba_device *dev, +struct mmci_host *host) { + struct device_node *np = dev-dev.of_node; struct

Re: [PATCH] mmc: mmci: Allow MMCI to request channels with information acquired from DT

2013-04-17 Thread Lee Jones
This looks unnecessarily complex. That thought did cross my mind. Why not just do dma_request_slave_channel_compat() unconditionally here? So how about something like this instead, as it keeps the current semantics, and only differs in the case of DT. diff --git a/drivers/mmc/host/mmci.c

Re: [PATCH] mmc: mmci: Allow MMCI to request channels with information acquired from DT

2013-04-17 Thread Arnd Bergmann
On Wednesday 17 April 2013, Lee Jones wrote: This looks unnecessarily complex. That thought did cross my mind. Why not just do dma_request_slave_channel_compat() unconditionally here? So how about something like this instead, as it keeps the current semantics, and only differs in the