2
0
mirror of https://github.com/edk2-porting/linux-next.git synced 2024-12-16 17:23:55 +08:00

spi: pl022: Only use DT-specified DMA channels

When a platform is booted with devicetree and does not provide a
platform data structure, the driver creates one internally.  enable_dma
should not be set in this structure when creating it; the probe function
will set it later if DMA channels are specified via the devicetree.

Setting enable_dma = 1 when creating this internal platform data can
lead to pl022_dma_probe() finding bogus DMA channels (since there is no
channel filter specified) when no DMA channels are specified in the
devicetree.

Signed-off-by: Vincent Whitchurch <vincent.whitchurch@axis.com>
Acked-by: Dhruva Gole <d-gole@ti.com>
Link: https://lore.kernel.org/r/20230102160852.3090202-1-vincent.whitchurch@axis.com
Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
Vincent Whitchurch 2023-01-02 17:08:51 +01:00 committed by Mark Brown
parent 02c9e5b768
commit dfce16722b
No known key found for this signature in database
GPG Key ID: 24D68B725D5487D0

View File

@ -2091,7 +2091,6 @@ pl022_platform_data_dt_get(struct device *dev)
return NULL;
pd->bus_id = -1;
pd->enable_dma = 1;
of_property_read_u32(np, "pl022,autosuspend-delay",
&pd->autosuspend_delay);
pd->rt = of_property_read_bool(np, "pl022,rt");