From mboxrd@z Thu Jan 1 00:00:00 1970 From: Grygorii Strashko Date: Mon, 2 Dec 2019 13:24:20 +0200 Subject: [U-Boot] [PATCH RESEND v2 02/10] dma: ti: k3-udma: Query DMA channels allocated from Resource Manager In-Reply-To: <20191202085444.29848-3-vigneshr@ti.com> References: <20191202085444.29848-1-vigneshr@ti.com> <20191202085444.29848-3-vigneshr@ti.com> Message-ID: <4de70c49-3680-ebc7-c559-a80f8a8e97dd@ti.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de 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 > --- > 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 [...] -- Best regards, grygorii