Message ID | 20240705045030.1141934-6-c-vankar@ti.com |
---|---|
State | Changes Requested |
Delegated to: | Tom Rini |
Headers | show |
Series | Add support for Ethernet Boot on SK-AM62 | expand |
Hi Chintan, On Fri, 2024-07-05 at 10:20 +0530, Chintan Vankar wrote: > From: Kishon Vijay Abraham I <kishon@ti.com> > > In absence of Device Manager (DM) services such as at R5 SPL stage, > driver will have to natively setup TCHAN/RCHAN/RFLOW cfg registers. > Existing UDMA driver performed the above mentioned configuration > for UDMA. Add similar configuration for PKTDMA here. > > Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com> > Signed-off-by: Siddharth Vadapalli <s-vadapalli@ti.com> > Signed-off-by: Chintan Vankar <c-vankar@ti.com> Reviewed-by: Alexander Sverdlin <alexander.sverdlin@siemens.com> > --- > > Link to v2: > https://lore.kernel.org/r/20240425120822.2048012-6-c-vankar@ti.com/ > > Changes from v2 to v3: > - No changes. > > drivers/dma/ti/k3-udma.c | 6 ++++++ > 1 file changed, 6 insertions(+) > > diff --git a/drivers/dma/ti/k3-udma.c b/drivers/dma/ti/k3-udma.c > index da341a2477..14c3999035 100644 > --- a/drivers/dma/ti/k3-udma.c > +++ b/drivers/dma/ti/k3-udma.c > @@ -2119,6 +2119,9 @@ static int bcdma_tisci_tx_channel_config(struct udma_chan *uc) > if (ret) > dev_err(ud->dev, "tchan%d cfg failed %d\n", tchan->id, ret); > > + if (IS_ENABLED(CONFIG_K3_DM_FW)) > + udma_alloc_tchan_raw(uc); > + > return ret; > } > > @@ -2167,6 +2170,9 @@ static int pktdma_tisci_rx_channel_config(struct udma_chan *uc) > dev_err(ud->dev, "flow%d config failed: %d\n", uc->rflow->id, > ret); > > + if (IS_ENABLED(CONFIG_K3_DM_FW)) > + udma_alloc_rchan_raw(uc); > + > return ret; > } >
diff --git a/drivers/dma/ti/k3-udma.c b/drivers/dma/ti/k3-udma.c index da341a2477..14c3999035 100644 --- a/drivers/dma/ti/k3-udma.c +++ b/drivers/dma/ti/k3-udma.c @@ -2119,6 +2119,9 @@ static int bcdma_tisci_tx_channel_config(struct udma_chan *uc) if (ret) dev_err(ud->dev, "tchan%d cfg failed %d\n", tchan->id, ret); + if (IS_ENABLED(CONFIG_K3_DM_FW)) + udma_alloc_tchan_raw(uc); + return ret; } @@ -2167,6 +2170,9 @@ static int pktdma_tisci_rx_channel_config(struct udma_chan *uc) dev_err(ud->dev, "flow%d config failed: %d\n", uc->rflow->id, ret); + if (IS_ENABLED(CONFIG_K3_DM_FW)) + udma_alloc_rchan_raw(uc); + return ret; }