]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
dma: ti: k3-udma: Add support for native configuration of chan/flow
authorKishon Vijay Abraham I <kishon@ti.com>
Mon, 26 Aug 2024 10:25:10 +0000 (15:55 +0530)
committerTom Rini <trini@konsulko.com>
Fri, 30 Aug 2024 19:57:39 +0000 (13:57 -0600)
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.

Reviewed-by: Alexander Sverdlin <alexander.sverdlin@siemens.com>
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>
drivers/dma/ti/k3-udma.c

index b7e674f2186aeffe9f3928adbf55c187701e6ce9..e23d09e6b816fb9c985568c01a385e811fbe6996 100644 (file)
@@ -2118,6 +2118,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;
 }
 
@@ -2166,6 +2169,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;
 }