
On 02/12/2019 10:54, Vignesh Raghavendra wrote:
On K3 SoCs, DMA channels are shared across multiple entities, therefore U-Boot DMA driver needs to query resource range from centralised resource management controller i.e SystemFirmware and use DMA channels allocated for A72 host. Add support for the same.
Signed-off-by: Vignesh Raghavendra vigneshr@ti.com
v2: Address comments on v1 from Grygorii Squash patch 5 (of v1) into this patch
drivers/dma/ti/k3-udma-hwdef.h | 19 +++ drivers/dma/ti/k3-udma.c | 274 +++++++++++++++++++++++---------- 2 files changed, 214 insertions(+), 79 deletions(-)
diff --git a/drivers/dma/ti/k3-udma-hwdef.h b/drivers/dma/ti/k3-udma-hwdef.h index c88399a815ea..228a44cb73cf 100644 --- a/drivers/dma/ti/k3-udma-hwdef.h +++ b/drivers/dma/ti/k3-udma-hwdef.h @@ -181,4 +181,23 @@ #define PDMA_STATIC_TR_Z(x) \ (((x) << PDMA_STATIC_TR_Z_SHIFT) & PDMA_STATIC_TR_Z_MASK)
+enum udma_rm_range {
- RM_RANGE_TCHAN = 0,
- RM_RANGE_RCHAN,
- RM_RANGE_RFLOW,
- RM_RANGE_LAST,
+};
+struct udma_tisci_rm {
- const struct ti_sci_handle *tisci;
- const struct ti_sci_rm_udmap_ops *tisci_udmap_ops;
- u32 tisci_dev_id;
- /* tisci information for PSI-L thread pairing/unpairing */
- const struct ti_sci_rm_psil_ops *tisci_psil_ops;
- u32 tisci_navss_dev_id;
- struct ti_sci_resource *rm_ranges[RM_RANGE_LAST];
+};
I'd move it in k3-udma.c
- #endif /* K3_NAVSS_UDMA_HWDEF_H_ */
diff --git a/drivers/dma/ti/k3-udma.c b/drivers/dma/ti/k3-udma.c index a5fc7809bc41..2f82ab0955a4 100644 --- a/drivers/dma/ti/k3-udma.c +++ b/drivers/dma/ti/k3-udma.c @@ -11,12 +11,14 @@ #include <malloc.h>
[...]