Commit 72b195cb authored by Robert Jarzmik's avatar Robert Jarzmik

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: default avatarRobert Jarzmik <robert.jarzmik@free.fr>
parent c283e41e
...@@ -13,6 +13,7 @@ pdma: dma-controller@40000000 { ...@@ -13,6 +13,7 @@ pdma: dma-controller@40000000 {
interrupts = <25>; interrupts = <25>;
#dma-channels = <32>; #dma-channels = <32>;
#dma-cells = <2>; #dma-cells = <2>;
#dma-requests = <75>;
status = "okay"; status = "okay";
}; };
......
...@@ -12,6 +12,7 @@ pdma: dma-controller@40000000 { ...@@ -12,6 +12,7 @@ pdma: dma-controller@40000000 {
interrupts = <25>; interrupts = <25>;
#dma-channels = <32>; #dma-channels = <32>;
#dma-cells = <2>; #dma-cells = <2>;
#dma-requests = <100>;
status = "okay"; status = "okay";
}; };
......
...@@ -1203,6 +1203,7 @@ void __init pxa2xx_set_spi_info(unsigned id, struct pxa2xx_spi_master *info) ...@@ -1203,6 +1203,7 @@ void __init pxa2xx_set_spi_info(unsigned id, struct pxa2xx_spi_master *info)
static struct mmp_dma_platdata pxa_dma_pdata = { static struct mmp_dma_platdata pxa_dma_pdata = {
.dma_channels = 0, .dma_channels = 0,
.nb_requestors = 0,
}; };
static struct resource pxa_dma_resource[] = { static struct resource pxa_dma_resource[] = {
...@@ -1231,7 +1232,7 @@ static struct platform_device pxa2xx_pxa_dma = { ...@@ -1231,7 +1232,7 @@ static struct platform_device pxa2xx_pxa_dma = {
.resource = pxa_dma_resource, .resource = pxa_dma_resource,
}; };
void __init pxa2xx_set_dmac_info(int nb_channels) void __init pxa2xx_set_dmac_info(int nb_channels, int nb_requestors)
{ {
pxa_dma_pdata.dma_channels = nb_channels; pxa_dma_pdata.dma_channels = nb_channels;
pxa_register_device(&pxa2xx_pxa_dma, &pxa_dma_pdata); pxa_register_device(&pxa2xx_pxa_dma, &pxa_dma_pdata);
......
...@@ -206,7 +206,7 @@ static int __init pxa25x_init(void) ...@@ -206,7 +206,7 @@ static int __init pxa25x_init(void)
register_syscore_ops(&pxa_irq_syscore_ops); register_syscore_ops(&pxa_irq_syscore_ops);
register_syscore_ops(&pxa2xx_mfp_syscore_ops); register_syscore_ops(&pxa2xx_mfp_syscore_ops);
pxa2xx_set_dmac_info(16); pxa2xx_set_dmac_info(16, 40);
pxa_register_device(&pxa25x_device_gpio, &pxa25x_gpio_info); pxa_register_device(&pxa25x_device_gpio, &pxa25x_gpio_info);
ret = platform_add_devices(pxa25x_devices, ret = platform_add_devices(pxa25x_devices,
ARRAY_SIZE(pxa25x_devices)); ARRAY_SIZE(pxa25x_devices));
......
...@@ -311,7 +311,7 @@ static int __init pxa27x_init(void) ...@@ -311,7 +311,7 @@ static int __init pxa27x_init(void)
if (!of_have_populated_dt()) { if (!of_have_populated_dt()) {
pxa_register_device(&pxa27x_device_gpio, pxa_register_device(&pxa27x_device_gpio,
&pxa27x_gpio_info); &pxa27x_gpio_info);
pxa2xx_set_dmac_info(32); pxa2xx_set_dmac_info(32, 75);
ret = platform_add_devices(devices, ret = platform_add_devices(devices,
ARRAY_SIZE(devices)); ARRAY_SIZE(devices));
} }
......
...@@ -449,7 +449,7 @@ static int __init pxa3xx_init(void) ...@@ -449,7 +449,7 @@ static int __init pxa3xx_init(void)
if (of_have_populated_dt()) if (of_have_populated_dt())
return 0; return 0;
pxa2xx_set_dmac_info(32); pxa2xx_set_dmac_info(32, 100);
ret = platform_add_devices(devices, ARRAY_SIZE(devices)); ret = platform_add_devices(devices, ARRAY_SIZE(devices));
if (ret) if (ret)
return ret; return ret;
......
...@@ -95,6 +95,6 @@ static inline int pxad_toggle_reserved_channel(int legacy_channel) ...@@ -95,6 +95,6 @@ static inline int pxad_toggle_reserved_channel(int legacy_channel)
} }
#endif #endif
extern void __init pxa2xx_set_dmac_info(int nb_channels); extern void __init pxa2xx_set_dmac_info(int nb_channels, int nb_requestors);
#endif /* __PLAT_DMA_H */ #endif /* __PLAT_DMA_H */
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment