diff options
author | Robert Jarzmik <robert.jarzmik@free.fr> | 2018-06-17 19:02:05 +0200 |
---|---|---|
committer | Robert Jarzmik <robert.jarzmik@free.fr> | 2018-06-18 21:29:16 +0200 |
commit | 1da10c17afd1109ae22d529c3b16d9f6de3fdbec (patch) | |
tree | b6c1561681627078a363afd495bd4e136bc52f86 /arch/arm/mach-pxa/devices.c | |
parent | dmaengine: pxa: use a dma slave map (diff) | |
download | linux-1da10c17afd1109ae22d529c3b16d9f6de3fdbec.tar.xz linux-1da10c17afd1109ae22d529c3b16d9f6de3fdbec.zip |
ARM: pxa: add dma slave map
In order to remove the specific knowledge of the dma mapping from PXA
drivers, add a default slave map for pxa architectures.
This is the first step, and once all drivers are converted,
pxad_filter_fn() will be made static, and the DMA resources removed from
device.c.
Signed-off-by: Robert Jarzmik <robert.jarzmik@free.fr>
Reported-by: Arnd Bergmann <arnd@arndb.de>
Diffstat (limited to 'arch/arm/mach-pxa/devices.c')
-rw-r--r-- | arch/arm/mach-pxa/devices.c | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/arch/arm/mach-pxa/devices.c b/arch/arm/mach-pxa/devices.c index d7c9a8476d57..1e8915fc340d 100644 --- a/arch/arm/mach-pxa/devices.c +++ b/arch/arm/mach-pxa/devices.c @@ -4,6 +4,7 @@ #include <linux/init.h> #include <linux/platform_device.h> #include <linux/dma-mapping.h> +#include <linux/dmaengine.h> #include <linux/spi/pxa2xx_spi.h> #include <linux/platform_data/i2c-pxa.h> @@ -1202,11 +1203,6 @@ void __init pxa2xx_set_spi_info(unsigned id, struct pxa2xx_spi_master *info) platform_device_add(pd); } -static struct mmp_dma_platdata pxa_dma_pdata = { - .dma_channels = 0, - .nb_requestors = 0, -}; - static struct resource pxa_dma_resource[] = { [0] = { .start = 0x40000000, @@ -1233,9 +1229,7 @@ static struct platform_device pxa2xx_pxa_dma = { .resource = pxa_dma_resource, }; -void __init pxa2xx_set_dmac_info(int nb_channels, int nb_requestors) +void __init pxa2xx_set_dmac_info(struct mmp_dma_platdata *dma_pdata) { - pxa_dma_pdata.dma_channels = nb_channels; - pxa_dma_pdata.nb_requestors = nb_requestors; - pxa_register_device(&pxa2xx_pxa_dma, &pxa_dma_pdata); + pxa_register_device(&pxa2xx_pxa_dma, dma_pdata); } |