Lines Matching +full:offset +full:- +full:x
1 /* SPDX-License-Identifier: GPL-2.0-only */
3 * Driver for the Intel integrated DMA 64-bit
16 #include <linux/io-64-nonatomic-lo-hi.h>
18 #include "virt-dma.h"
40 #define IDMA64C_CTLL_DST_WIDTH(x) ((x) << 1) /* bytes per element */ argument
41 #define IDMA64C_CTLL_SRC_WIDTH(x) ((x) << 4) argument
46 #define IDMA64C_CTLL_DST_MSIZE(x) ((x) << 11) /* burst, #elements */ argument
47 #define IDMA64C_CTLL_SRC_MSIZE(x) ((x) << 14) argument
48 #define IDMA64C_CTLL_FC_M2P (1 << 20) /* mem-to-periph */
49 #define IDMA64C_CTLL_FC_P2M (2 << 20) /* periph-to-mem */
54 #define IDMA64C_CTLH_BLOCK_TS_MASK ((1 << 17) - 1)
55 #define IDMA64C_CTLH_BLOCK_TS(x) ((x) & IDMA64C_CTLH_BLOCK_TS_MASK) argument
68 #define IDMA64C_CFGH_SRC_PER(x) ((x) << 0) /* src peripheral */ argument
69 #define IDMA64C_CFGH_DST_PER(x) ((x) << 4) /* dst peripheral */ argument
70 #define IDMA64C_CFGH_RD_ISSUE_THD(x) ((x) << 8) argument
71 #define IDMA64C_CFGH_WR_ISSUE_THD(x) ((x) << 18) argument
81 #define IDMA64_RAW(x) (0x2c0 + IDMA64_INT_##x) /* r */ argument
82 #define IDMA64_STATUS(x) (0x2e8 + IDMA64_INT_##x) /* r (raw & mask) */ argument
83 #define IDMA64_MASK(x) (0x310 + IDMA64_INT_##x) /* rw (set = irq enabled) */ argument
84 #define IDMA64_CLEAR(x) (0x338 + IDMA64_INT_##x) /* w (ack, affects "raw") */ argument
151 static inline u32 idma64c_readl(struct idma64_chan *idma64c, int offset) in idma64c_readl() argument
153 return readl(idma64c->regs + offset); in idma64c_readl()
156 static inline void idma64c_writel(struct idma64_chan *idma64c, int offset, in idma64c_writel() argument
159 writel(value, idma64c->regs + offset); in idma64c_writel()
167 static inline u64 idma64c_readq(struct idma64_chan *idma64c, int offset) in idma64c_readq() argument
169 return lo_hi_readq(idma64c->regs + offset); in idma64c_readq()
172 static inline void idma64c_writeq(struct idma64_chan *idma64c, int offset, in idma64c_writeq() argument
175 lo_hi_writeq(value, idma64c->regs + offset); in idma64c_writeq()
198 static inline u32 idma64_readl(struct idma64 *idma64, int offset) in idma64_readl() argument
200 return readl(idma64->regs + offset); in idma64_readl()
203 static inline void idma64_writel(struct idma64 *idma64, int offset, u32 value) in idma64_writel() argument
205 writel(value, idma64->regs + offset); in idma64_writel()
214 * struct idma64_chip - representation of iDMA 64-bit controller hardware