Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1279923
| From | Arnd Bergmann <arnd@arndb.de> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [RFC v02 00/15] dmaengine: New 'universal' API for requesting channel |
| Date | 2015-11-30 15:20 +0100 |
| Message-ID | <qAxt9-4HX-47@gated-at.bofh.it> (permalink) |
| References | <qAx05-4hY-3@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Monday 30 November 2015 15:45:30 Peter Ujfalusi wrote:
> Changes since RFC v01:
>- dma_request_chan(); lost the mask parameter
>- The new API does not rely on RESOURCE_DMA, instead the dma_filter_map table
> will be used to provide the needed information to the filter function in
> legacy mode
>- Extended the example patches to convert most of daVinci to use the new API to
> request the DMA channels.
Very nice overall. Just a few minor comments.
> static struct dma_filter_map da830_edma_map[] = {
> DMA_FILTER_ENTRY("davinci-mcasp.0", "rx", EDMA_CTLR_CHAN(0, 0)),
> DMA_FILTER_ENTRY("davinci-mcasp.0", "tx", EDMA_CTLR_CHAN(0, 1)),
> DMA_FILTER_ENTRY("davinci-mcasp.1", "rx", EDMA_CTLR_CHAN(0, 2)),
> DMA_FILTER_ENTRY("davinci-mcasp.1", "tx", EDMA_CTLR_CHAN(0, 3)),
> DMA_FILTER_ENTRY("davinci-mcasp.2", "rx", EDMA_CTLR_CHAN(0, 4)),
> DMA_FILTER_ENTRY("davinci-mcasp.2", "tx", EDMA_CTLR_CHAN(0, 5)),
> DMA_FILTER_ENTRY("spi_davinci.0", "rx", EDMA_CTLR_CHAN(0, 14)),
> DMA_FILTER_ENTRY("spi_davinci.0", "tx", EDMA_CTLR_CHAN(0, 15)),
> DMA_FILTER_ENTRY("da830-mmc.0", "rx", EDMA_CTLR_CHAN(0, 16)),
> DMA_FILTER_ENTRY("da830-mmc.0", "tx", EDMA_CTLR_CHAN(0, 17)),
> DMA_FILTER_ENTRY("spi_davinci.1", "rx", EDMA_CTLR_CHAN(0, 18)),
> DMA_FILTER_ENTRY("spi_davinci.1", "tx", EDMA_CTLR_CHAN(0, 19)),
> };
I wonder if we should mandate that the lookup table is 'const'.
We could also drop the DMA_FILTER_ENTRY() macro above, and open-code the
table like
static struct dma_filter_map da830_edma_map[] = {
{ "davinci-mcasp.0", "rx", EDMA_CTLR_CHAN(0, 0)},
{ "davinci-mcasp.0", "tx", EDMA_CTLR_CHAN(0, 1)},
{ "davinci-mcasp.1", "rx", EDMA_CTLR_CHAN(0, 2)},
...
};
which is a little more compact and more obvious, but loses the
named initializers.
Arnd
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[RFC v02 00/15] dmaengine: New 'universal' API for requesting channel Peter Ujfalusi <peter.ujfalusi@ti.com> - 2015-11-30 15:00 +0100
Re: [RFC v02 00/15] dmaengine: New 'universal' API for requesting channel Arnd Bergmann <arnd@arndb.de> - 2015-11-30 15:20 +0100
Re: [RFC v02 00/15] dmaengine: New 'universal' API for requesting channel Arnd Bergmann <arnd@arndb.de> - 2015-12-01 11:20 +0100
Re: [RFC v02 00/15] dmaengine: New 'universal' API for requesting channel Peter Ujfalusi <peter.ujfalusi@ti.com> - 2015-12-01 11:20 +0100
Re: [RFC v02 00/15] dmaengine: New 'universal' API for requesting channel Andy Shevchenko <andy.shevchenko@gmail.com> - 2015-11-30 15:40 +0100
Re: [RFC v02 00/15] dmaengine: New 'universal' API for requesting channel Peter Ujfalusi <peter.ujfalusi@ti.com> - 2015-12-01 14:50 +0100
Re: [RFC v02 00/15] dmaengine: New 'universal' API for requesting channel Arnd Bergmann <arnd@arndb.de> - 2015-12-01 15:30 +0100
Re: [RFC v02 00/15] dmaengine: New 'universal' API for requesting channel Peter Ujfalusi <peter.ujfalusi@ti.com> - 2015-12-02 12:00 +0100
Re: [RFC v02 00/15] dmaengine: New 'universal' API for requesting channel Arnd Bergmann <arnd@arndb.de> - 2015-12-02 14:40 +0100
Re: [RFC v02 00/15] dmaengine: New 'universal' API for requesting channel Vinod Koul <vinod.koul@intel.com> - 2015-12-01 18:00 +0100
Re: [RFC v02 00/15] dmaengine: New 'universal' API for requesting channel Arnd Bergmann <arnd@arndb.de> - 2015-12-01 21:20 +0100
Re: [RFC v02 00/15] dmaengine: New 'universal' API for requesting channel Vinod Koul <vinod.koul@intel.com> - 2015-12-02 05:50 +0100
Re: [RFC v02 00/15] dmaengine: New 'universal' API for requesting channel Arnd Bergmann <arnd@arndb.de> - 2015-12-02 09:30 +0100
Re: [RFC v02 00/15] dmaengine: New 'universal' API for requesting channel Peter Ujfalusi <peter.ujfalusi@ti.com> - 2015-12-02 13:40 +0100
csiph-web