Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

dmaengine: ti: k3-udma: Wait for peer teardown completion if supported

Set the TDTYPE if it is supported on the platform (j721e) which will cause
UDMAP to wait for the remote peer to finish the teardown before returning
the teardown completed message.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Tested-by: Keerthy <j-keerthy@ti.com>
Reviewed-by: Grygorii Strashko <grygorii.strashko@ti.com>
Link: https://lore.kernel.org/r/20201208090440.31792-3-peter.ujfalusi@ti.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>

authored by

Peter Ujfalusi and committed by
Vinod Koul
5e1cb1cb e2de925b

+10 -2
+10 -2
drivers/dma/ti/k3-udma.c
··· 86 86 87 87 #define UDMA_FLAG_PDMA_ACC32 BIT(0) 88 88 #define UDMA_FLAG_PDMA_BURST BIT(1) 89 + #define UDMA_FLAG_TDTYPE BIT(2) 89 90 90 91 struct udma_match_data { 91 92 u32 psil_base; ··· 1590 1589 req_tx.tx_fetch_size = fetch_size >> 2; 1591 1590 req_tx.txcq_qnum = tc_ring; 1592 1591 req_tx.tx_atype = uc->config.atype; 1592 + if (uc->config.ep_type == PSIL_EP_PDMA_XY && 1593 + ud->match_data->flags & UDMA_FLAG_TDTYPE) { 1594 + /* wait for peer to complete the teardown for PDMAs */ 1595 + req_tx.valid_params |= 1596 + TI_SCI_MSG_VALUE_RM_UDMAP_CH_TX_TDTYPE_VALID; 1597 + req_tx.tx_tdtype = 1; 1598 + } 1593 1599 1594 1600 ret = tisci_ops->tx_ch_cfg(tisci_rm->tisci, &req_tx); 1595 1601 if (ret) ··· 3113 3105 static struct udma_match_data j721e_main_data = { 3114 3106 .psil_base = 0x1000, 3115 3107 .enable_memcpy_support = true, 3116 - .flags = UDMA_FLAG_PDMA_ACC32 | UDMA_FLAG_PDMA_BURST, 3108 + .flags = UDMA_FLAG_PDMA_ACC32 | UDMA_FLAG_PDMA_BURST | UDMA_FLAG_TDTYPE, 3117 3109 .statictr_z_mask = GENMASK(23, 0), 3118 3110 }; 3119 3111 3120 3112 static struct udma_match_data j721e_mcu_data = { 3121 3113 .psil_base = 0x6000, 3122 3114 .enable_memcpy_support = false, /* MEM_TO_MEM is slow via MCU UDMA */ 3123 - .flags = UDMA_FLAG_PDMA_ACC32 | UDMA_FLAG_PDMA_BURST, 3115 + .flags = UDMA_FLAG_PDMA_ACC32 | UDMA_FLAG_PDMA_BURST | UDMA_FLAG_TDTYPE, 3124 3116 .statictr_z_mask = GENMASK(23, 0), 3125 3117 }; 3126 3118