Legacy platform instantiation of PL022 had an ability to configure DMA usage on controller level. If PL022 is being instantiated from DT it still claims couple of DMA channels capable of DMA_SLAVE unconditionally even if there are no DMA channels specified in the DT. Depending on the slave devices' configuration this might be waste of DMA channels or this might even claim some precious DMA channels if there are only few of them in the system. Add a new boolean property to disable DMA usage on the controller level: "pl022,dma-disable" Signed-off-by: Alexander Sverdlin <alexander.sverdlin@xxxxxxxxx> --- Documentation/devicetree/bindings/spi/spi_pl022.txt | 1 + drivers/spi/spi-pl022.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/Documentation/devicetree/bindings/spi/spi_pl022.txt b/Documentation/devicetree/bindings/spi/spi_pl022.txt index 7638b4968ddb..d877a0871a11 100644 --- a/Documentation/devicetree/bindings/spi/spi_pl022.txt +++ b/Documentation/devicetree/bindings/spi/spi_pl022.txt @@ -21,6 +21,7 @@ Optional properties: - dma-names: Names for the dma channels, if present. There must be at least one channel named "tx" for transmit and named "rx" for receive. +- pl022,dma-disable : disable DMA usage SPI slave nodes must be children of the SPI master node and can diff --git a/drivers/spi/spi-pl022.c b/drivers/spi/spi-pl022.c index 1af8c96b940e..43039c7428fe 100644 --- a/drivers/spi/spi-pl022.c +++ b/drivers/spi/spi-pl022.c @@ -2086,7 +2086,7 @@ pl022_platform_data_dt_get(struct device *dev) return NULL; pd->bus_id = -1; - pd->enable_dma = 1; + pd->enable_dma = !of_property_read_bool(np, "pl022,dma-disable"); of_property_read_u32(np, "num-cs", &tmp); pd->num_chipselect = tmp; of_property_read_u32(np, "pl022,autosuspend-delay", -- 2.18.0 -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html