The current OF translation of channels can never work with any DMA client using the DMA channels directly: the only way to get the channels initialized properly is in the dma_async_device_register() call, where chan->dev etc is allocated and initialized. Allocate and initialize all possible DMA channels and only augment a target channel with the periph_buses at of_xlate(). Remove some const settings to make things work.
Showing the changes to include/linux/amba (1 of 2 files). Show all
Unified · Split
| @@ -86,7 +86,7 @@ struct pl08x_channel_data { · 85 unmodified lines | |||
| 86 | * @mem_buses: buses which memory can be accessed from: PL08X_AHB1 | PL08X_AHB2 | 86 | * @mem_buses: buses which memory can be accessed from: PL08X_AHB1 | PL08X_AHB2 |
| 87 | */ | 87 | */ |
| 88 | struct pl08x_platform_data { | 88 | struct pl08x_platform_data { |
| 89 | const struct pl08x_channel_data *slave_channels; | 89 | struct pl08x_channel_data *slave_channels; |
| 90 | unsigned int num_slave_channels; | 90 | unsigned int num_slave_channels; |
| 91 | struct pl08x_channel_data memcpy_channel; | 91 | struct pl08x_channel_data memcpy_channel; |
| 92 | int (*get_xfer_signal)(const struct pl08x_channel_data *); | 92 | int (*get_xfer_signal)(const struct pl08x_channel_data *); |