diff options
author | Robert Jarzmik <robert.jarzmik@free.fr> | 2016-02-15 15:57:47 -0500 |
---|---|---|
committer | Robert Jarzmik <robert.jarzmik@free.fr> | 2016-02-26 16:57:05 -0500 |
commit | 72b195cb716284217e8b270af420bc7e5cf04b3c (patch) | |
tree | 109b7d12cc9629e61948a49fc7bf710033e26342 | |
parent | c283e41ef32442f41e7180f9bb1c5aedf9255bfe (diff) |
ARM: pxa: add the number of DMA requestor lines
Declare the number of DMA requestor lines per platform :
- for pxa25x: 40 requestor lines
- for pxa27x: 75 requestor lines
- for pxa3xx: 100 requestor lines
This information will be used to activate the DMA flow control or not.
Signed-off-by: Robert Jarzmik <robert.jarzmik@free.fr>
-rw-r--r-- | arch/arm/boot/dts/pxa27x.dtsi | 1 | ||||
-rw-r--r-- | arch/arm/boot/dts/pxa3xx.dtsi | 1 | ||||
-rw-r--r-- | arch/arm/mach-pxa/devices.c | 3 | ||||
-rw-r--r-- | arch/arm/mach-pxa/pxa25x.c | 2 | ||||
-rw-r--r-- | arch/arm/mach-pxa/pxa27x.c | 2 | ||||
-rw-r--r-- | arch/arm/mach-pxa/pxa3xx.c | 2 | ||||
-rw-r--r-- | arch/arm/plat-pxa/include/plat/dma.h | 2 |
7 files changed, 8 insertions, 5 deletions
diff --git a/arch/arm/boot/dts/pxa27x.dtsi b/arch/arm/boot/dts/pxa27x.dtsi index 7f68a1ee7073..210192c38df3 100644 --- a/arch/arm/boot/dts/pxa27x.dtsi +++ b/arch/arm/boot/dts/pxa27x.dtsi | |||
@@ -13,6 +13,7 @@ | |||
13 | interrupts = <25>; | 13 | interrupts = <25>; |
14 | #dma-channels = <32>; | 14 | #dma-channels = <32>; |
15 | #dma-cells = <2>; | 15 | #dma-cells = <2>; |
16 | #dma-requests = <75>; | ||
16 | status = "okay"; | 17 | status = "okay"; |
17 | }; | 18 | }; |
18 | 19 | ||
diff --git a/arch/arm/boot/dts/pxa3xx.dtsi b/arch/arm/boot/dts/pxa3xx.dtsi index cf6998a0804d..bea454f50ff9 100644 --- a/arch/arm/boot/dts/pxa3xx.dtsi +++ b/arch/arm/boot/dts/pxa3xx.dtsi | |||
@@ -12,6 +12,7 @@ | |||
12 | interrupts = <25>; | 12 | interrupts = <25>; |
13 | #dma-channels = <32>; | 13 | #dma-channels = <32>; |
14 | #dma-cells = <2>; | 14 | #dma-cells = <2>; |
15 | #dma-requests = <100>; | ||
15 | status = "okay"; | 16 | status = "okay"; |
16 | }; | 17 | }; |
17 | 18 | ||
diff --git a/arch/arm/mach-pxa/devices.c b/arch/arm/mach-pxa/devices.c index 37d8d85662f0..913a319c7b00 100644 --- a/arch/arm/mach-pxa/devices.c +++ b/arch/arm/mach-pxa/devices.c | |||
@@ -1203,6 +1203,7 @@ void __init pxa2xx_set_spi_info(unsigned id, struct pxa2xx_spi_master *info) | |||
1203 | 1203 | ||
1204 | static struct mmp_dma_platdata pxa_dma_pdata = { | 1204 | static struct mmp_dma_platdata pxa_dma_pdata = { |
1205 | .dma_channels = 0, | 1205 | .dma_channels = 0, |
1206 | .nb_requestors = 0, | ||
1206 | }; | 1207 | }; |
1207 | 1208 | ||
1208 | static struct resource pxa_dma_resource[] = { | 1209 | static struct resource pxa_dma_resource[] = { |
@@ -1231,7 +1232,7 @@ static struct platform_device pxa2xx_pxa_dma = { | |||
1231 | .resource = pxa_dma_resource, | 1232 | .resource = pxa_dma_resource, |
1232 | }; | 1233 | }; |
1233 | 1234 | ||
1234 | void __init pxa2xx_set_dmac_info(int nb_channels) | 1235 | void __init pxa2xx_set_dmac_info(int nb_channels, int nb_requestors) |
1235 | { | 1236 | { |
1236 | pxa_dma_pdata.dma_channels = nb_channels; | 1237 | pxa_dma_pdata.dma_channels = nb_channels; |
1237 | pxa_register_device(&pxa2xx_pxa_dma, &pxa_dma_pdata); | 1238 | pxa_register_device(&pxa2xx_pxa_dma, &pxa_dma_pdata); |
diff --git a/arch/arm/mach-pxa/pxa25x.c b/arch/arm/mach-pxa/pxa25x.c index a177bf45feef..823504f48f80 100644 --- a/arch/arm/mach-pxa/pxa25x.c +++ b/arch/arm/mach-pxa/pxa25x.c | |||
@@ -206,7 +206,7 @@ static int __init pxa25x_init(void) | |||
206 | register_syscore_ops(&pxa_irq_syscore_ops); | 206 | register_syscore_ops(&pxa_irq_syscore_ops); |
207 | register_syscore_ops(&pxa2xx_mfp_syscore_ops); | 207 | register_syscore_ops(&pxa2xx_mfp_syscore_ops); |
208 | 208 | ||
209 | pxa2xx_set_dmac_info(16); | 209 | pxa2xx_set_dmac_info(16, 40); |
210 | pxa_register_device(&pxa25x_device_gpio, &pxa25x_gpio_info); | 210 | pxa_register_device(&pxa25x_device_gpio, &pxa25x_gpio_info); |
211 | ret = platform_add_devices(pxa25x_devices, | 211 | ret = platform_add_devices(pxa25x_devices, |
212 | ARRAY_SIZE(pxa25x_devices)); | 212 | ARRAY_SIZE(pxa25x_devices)); |
diff --git a/arch/arm/mach-pxa/pxa27x.c b/arch/arm/mach-pxa/pxa27x.c index 49c735962148..2eaa341dd3f8 100644 --- a/arch/arm/mach-pxa/pxa27x.c +++ b/arch/arm/mach-pxa/pxa27x.c | |||
@@ -311,7 +311,7 @@ static int __init pxa27x_init(void) | |||
311 | if (!of_have_populated_dt()) { | 311 | if (!of_have_populated_dt()) { |
312 | pxa_register_device(&pxa27x_device_gpio, | 312 | pxa_register_device(&pxa27x_device_gpio, |
313 | &pxa27x_gpio_info); | 313 | &pxa27x_gpio_info); |
314 | pxa2xx_set_dmac_info(32); | 314 | pxa2xx_set_dmac_info(32, 75); |
315 | ret = platform_add_devices(devices, | 315 | ret = platform_add_devices(devices, |
316 | ARRAY_SIZE(devices)); | 316 | ARRAY_SIZE(devices)); |
317 | } | 317 | } |
diff --git a/arch/arm/mach-pxa/pxa3xx.c b/arch/arm/mach-pxa/pxa3xx.c index 126c265691f5..3c9184d1d6b9 100644 --- a/arch/arm/mach-pxa/pxa3xx.c +++ b/arch/arm/mach-pxa/pxa3xx.c | |||
@@ -449,7 +449,7 @@ static int __init pxa3xx_init(void) | |||
449 | if (of_have_populated_dt()) | 449 | if (of_have_populated_dt()) |
450 | return 0; | 450 | return 0; |
451 | 451 | ||
452 | pxa2xx_set_dmac_info(32); | 452 | pxa2xx_set_dmac_info(32, 100); |
453 | ret = platform_add_devices(devices, ARRAY_SIZE(devices)); | 453 | ret = platform_add_devices(devices, ARRAY_SIZE(devices)); |
454 | if (ret) | 454 | if (ret) |
455 | return ret; | 455 | return ret; |
diff --git a/arch/arm/plat-pxa/include/plat/dma.h b/arch/arm/plat-pxa/include/plat/dma.h index 28848b344e2d..ceba3e4184fc 100644 --- a/arch/arm/plat-pxa/include/plat/dma.h +++ b/arch/arm/plat-pxa/include/plat/dma.h | |||
@@ -95,6 +95,6 @@ static inline int pxad_toggle_reserved_channel(int legacy_channel) | |||
95 | } | 95 | } |
96 | #endif | 96 | #endif |
97 | 97 | ||
98 | extern void __init pxa2xx_set_dmac_info(int nb_channels); | 98 | extern void __init pxa2xx_set_dmac_info(int nb_channels, int nb_requestors); |
99 | 99 | ||
100 | #endif /* __PLAT_DMA_H */ | 100 | #endif /* __PLAT_DMA_H */ |