mirror of
https://github.com/torvalds/linux.git
synced 2024-11-25 21:51:40 +00:00
dmaengine: ti: k3-udma: Initial support for K3 BCDMA
One of the DMAs introduced with AM64 is the Block Copy DMA (BCDMA). It serves similar purpose as K3 UDMAP channels in TR mode. The rings for the BCDMA is integrated within the DMA itself instead of using rings from the general purpose ringacc. A BCDMA have two different type of channels: - Block Copy Channels (bchan) - Split Channels (tchan and rchan) tchan and rchan can be used to service PSI-L peripherals, similarly to K3 UDMA channels. bchan can be only used for block copy operation (TR type15) like the paired K3 UDMA tchan/rchan configured in block copy mode. bchans can be also used to service peripherals directly if an external trigger is selected for the channel. Most of the driver code can be reused for BCDMA bchan/tchan/rchan support but new setup and allocation functions are needed to handle the differences between the DMAs. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Link: https://lore.kernel.org/r/20201208090440.31792-18-peter.ujfalusi@ti.com Signed-off-by: Vinod Koul <vkoul@kernel.org>
This commit is contained in:
parent
d782298c6f
commit
0177947397
File diff suppressed because it is too large
Load Diff
@ -18,7 +18,7 @@
|
||||
#define UDMA_RX_FLOW_ID_FW_OES_REG 0x80
|
||||
#define UDMA_RX_FLOW_ID_FW_STATUS_REG 0x88
|
||||
|
||||
/* TCHANRT/RCHANRT registers */
|
||||
/* BCHANRT/TCHANRT/RCHANRT registers */
|
||||
#define UDMA_CHAN_RT_CTL_REG 0x0
|
||||
#define UDMA_CHAN_RT_SWTRIG_REG 0x8
|
||||
#define UDMA_CHAN_RT_STDATA_REG 0x80
|
||||
@ -45,6 +45,10 @@
|
||||
#define UDMA_CAP3_HCHAN_CNT(val) (((val) >> 14) & 0x1ff)
|
||||
#define UDMA_CAP3_UCHAN_CNT(val) (((val) >> 23) & 0x1ff)
|
||||
|
||||
#define BCDMA_CAP2_BCHAN_CNT(val) ((val) & 0x1ff)
|
||||
#define BCDMA_CAP2_TCHAN_CNT(val) (((val) >> 9) & 0x1ff)
|
||||
#define BCDMA_CAP2_RCHAN_CNT(val) (((val) >> 18) & 0x1ff)
|
||||
|
||||
/* UDMA_CHAN_RT_CTL_REG */
|
||||
#define UDMA_CHAN_RT_CTL_EN BIT(31)
|
||||
#define UDMA_CHAN_RT_CTL_TDOWN BIT(30)
|
||||
@ -82,13 +86,17 @@
|
||||
*/
|
||||
#define PDMA_STATIC_TR_Z(x, mask) ((x) & (mask))
|
||||
|
||||
/* Address Space Select */
|
||||
#define K3_ADDRESS_ASEL_SHIFT 48
|
||||
|
||||
struct udma_dev;
|
||||
struct udma_tchan;
|
||||
struct udma_rchan;
|
||||
struct udma_rflow;
|
||||
|
||||
enum udma_rm_range {
|
||||
RM_RANGE_TCHAN = 0,
|
||||
RM_RANGE_BCHAN = 0,
|
||||
RM_RANGE_TCHAN,
|
||||
RM_RANGE_RCHAN,
|
||||
RM_RANGE_RFLOW,
|
||||
RM_RANGE_LAST,
|
||||
|
Loading…
Reference in New Issue
Block a user