diff options
author | Peter Ujfalusi <peter.ujfalusi@ti.com> | 2020-07-17 15:09:02 +0300 |
---|---|---|
committer | Vinod Koul <vkoul@kernel.org> | 2020-07-27 11:53:03 +0300 |
commit | 44385c4171d03b1aa030f3f21a6fce2f6edcfdab (patch) | |
tree | f4953c566022f12e34028e4a19364e3526078a93 /drivers/dma/ti/k3-udma.h | |
parent | 4b545ebfc371552cda7ce97a4beb485da9ef89cd (diff) | |
download | linux-44385c4171d03b1aa030f3f21a6fce2f6edcfdab.tar.xz |
dmaengine: ti: k3-udma: Use defines for capabilities register parsing
Add defines for the CAP register fields to make the code self explaining.
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Link: https://lore.kernel.org/r/20200717120903.8774-2-peter.ujfalusi@ti.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>
Diffstat (limited to 'drivers/dma/ti/k3-udma.h')
-rw-r--r-- | drivers/dma/ti/k3-udma.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/dma/ti/k3-udma.h b/drivers/dma/ti/k3-udma.h index a8ea1138e1a5..9534f0ca29f4 100644 --- a/drivers/dma/ti/k3-udma.h +++ b/drivers/dma/ti/k3-udma.h @@ -37,6 +37,12 @@ #define UDMA_CHAN_RT_BCNT_REG 0x408 #define UDMA_CHAN_RT_SBCNT_REG 0x410 +/* UDMA_CAP Registers */ +#define UDMA_CAP2_TCHAN_CNT(val) ((val) & 0x1ff) +#define UDMA_CAP2_ECHAN_CNT(val) (((val) >> 9) & 0x1ff) +#define UDMA_CAP2_RCHAN_CNT(val) (((val) >> 18) & 0x1ff) +#define UDMA_CAP3_RFLOW_CNT(val) ((val) & 0x3fff) + /* UDMA_CHAN_RT_CTL_REG */ #define UDMA_CHAN_RT_CTL_EN BIT(31) #define UDMA_CHAN_RT_CTL_TDOWN BIT(30) |