diff options
author | Andy Shevchenko <andriy.shevchenko@linux.intel.com> | 2017-01-17 13:57:29 +0200 |
---|---|---|
committer | Vinod Koul <vinod.koul@intel.com> | 2017-01-25 11:51:40 +0530 |
commit | 2d248812aa14d5f9bc6fc11a222c722524f25159 (patch) | |
tree | 2b9b4431413600402652b0e36ff692f81b954623 /drivers/dma/dw/regs.h | |
parent | f4aa3183c36d2f32695b0e7f0ce7296568729830 (diff) | |
download | talos-obmc-linux-2d248812aa14d5f9bc6fc11a222c722524f25159.tar.gz talos-obmc-linux-2d248812aa14d5f9bc6fc11a222c722524f25159.zip |
dmaengine: dw: introduce block2bytes() and bytes2block()
The newly introduced helpers prepare driver to support new DMA controller
hardware.
While here, introduce DWC_CTLH_BLOCK_TS() macro as well.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Diffstat (limited to 'drivers/dma/dw/regs.h')
-rw-r--r-- | drivers/dma/dw/regs.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/dma/dw/regs.h b/drivers/dma/dw/regs.h index 6087eba2c275..ba26d6bce06d 100644 --- a/drivers/dma/dw/regs.h +++ b/drivers/dma/dw/regs.h @@ -9,6 +9,7 @@ * published by the Free Software Foundation. */ +#include <linux/bitops.h> #include <linux/interrupt.h> #include <linux/dmaengine.h> @@ -170,8 +171,9 @@ enum dw_dma_msize { #define DWC_CTLL_LLP_S_EN (1 << 28) /* src block chain */ /* Bitfields in CTL_HI */ -#define DWC_CTLH_DONE 0x00001000 -#define DWC_CTLH_BLOCK_TS_MASK 0x00000fff +#define DWC_CTLH_BLOCK_TS_MASK GENMASK(11, 0) +#define DWC_CTLH_BLOCK_TS(x) ((x) & DWC_CTLH_BLOCK_TS_MASK) +#define DWC_CTLH_DONE (1 << 12) /* Bitfields in CFG_LO */ #define DWC_CFGL_CH_PRIOR_MASK (0x7 << 5) /* priority mask */ |