Lines Matching refs:reg

78 static inline u32 efx_reg(struct efx_nic *efx, unsigned int reg)  in efx_reg()  argument
80 return efx->reg_base + reg; in efx_reg()
85 unsigned int reg) in _efx_writeq() argument
87 __raw_writeq((__force u64)value, efx->membase + reg); in _efx_writeq()
89 static inline __le64 _efx_readq(struct efx_nic *efx, unsigned int reg) in _efx_readq() argument
91 return (__force __le64)__raw_readq(efx->membase + reg); in _efx_readq()
96 unsigned int reg) in _efx_writed() argument
98 __raw_writel((__force u32)value, efx->membase + reg); in _efx_writed()
100 static inline __le32 _efx_readd(struct efx_nic *efx, unsigned int reg) in _efx_readd() argument
102 return (__force __le32)__raw_readl(efx->membase + reg); in _efx_readd()
107 unsigned int reg) in efx_writeo() argument
112 "writing register %x with " EFX_OWORD_FMT "\n", reg, in efx_writeo()
117 _efx_writeq(efx, value->u64[0], reg + 0); in efx_writeo()
118 _efx_writeq(efx, value->u64[1], reg + 8); in efx_writeo()
120 _efx_writed(efx, value->u32[0], reg + 0); in efx_writeo()
121 _efx_writed(efx, value->u32[1], reg + 4); in efx_writeo()
122 _efx_writed(efx, value->u32[2], reg + 8); in efx_writeo()
123 _efx_writed(efx, value->u32[3], reg + 12); in efx_writeo()
151 unsigned int reg) in efx_writed() argument
155 reg, EFX_DWORD_VAL(*value)); in efx_writed()
158 _efx_writed(efx, value->u32[0], reg); in efx_writed()
163 unsigned int reg) in efx_reado() argument
168 value->u32[0] = _efx_readd(efx, reg + 0); in efx_reado()
169 value->u32[1] = _efx_readd(efx, reg + 4); in efx_reado()
170 value->u32[2] = _efx_readd(efx, reg + 8); in efx_reado()
171 value->u32[3] = _efx_readd(efx, reg + 12); in efx_reado()
175 "read from register %x, got " EFX_OWORD_FMT "\n", reg, in efx_reado()
202 unsigned int reg) in efx_readd() argument
204 value->u32[0] = _efx_readd(efx, reg); in efx_readd()
207 reg, EFX_DWORD_VAL(*value)); in efx_readd()
213 unsigned int reg, unsigned int index) in efx_writeo_table() argument
215 efx_writeo(efx, value, reg + index * sizeof(efx_oword_t)); in efx_writeo_table()
220 unsigned int reg, unsigned int index) in efx_reado_table() argument
222 efx_reado(efx, value, reg + index * sizeof(efx_oword_t)); in efx_reado_table()
233 unsigned int reg) in efx_paged_reg() argument
235 return page * efx->vi_stride + reg; in efx_paged_reg()
240 unsigned int reg, unsigned int page) in _efx_writeo_page() argument
242 reg = efx_paged_reg(efx, page, reg); in _efx_writeo_page()
245 "writing register %x with " EFX_OWORD_FMT "\n", reg, in _efx_writeo_page()
249 _efx_writeq(efx, value->u64[0], reg + 0); in _efx_writeo_page()
250 _efx_writeq(efx, value->u64[1], reg + 8); in _efx_writeo_page()
252 _efx_writed(efx, value->u32[0], reg + 0); in _efx_writeo_page()
253 _efx_writed(efx, value->u32[1], reg + 4); in _efx_writeo_page()
254 _efx_writed(efx, value->u32[2], reg + 8); in _efx_writeo_page()
255 _efx_writed(efx, value->u32[3], reg + 12); in _efx_writeo_page()
258 #define efx_writeo_page(efx, value, reg, page) \ argument
260 reg + \
261 BUILD_BUG_ON_ZERO((reg) != 0x830 && (reg) != 0xa10), \
269 unsigned int reg, unsigned int page) in _efx_writed_page() argument
271 efx_writed(efx, value, efx_paged_reg(efx, page, reg)); in _efx_writed_page()
273 #define efx_writed_page(efx, value, reg, page) \ argument
275 reg + \
276 BUILD_BUG_ON_ZERO((reg) != 0x180 && \
277 (reg) != 0x200 && \
278 (reg) != 0x400 && \
279 (reg) != 0x420 && \
280 (reg) != 0x830 && \
281 (reg) != 0x83c && \
282 (reg) != 0xa18 && \
283 (reg) != 0xa1c), \
292 unsigned int reg, in _efx_writed_page_locked() argument
299 efx_writed(efx, value, efx_paged_reg(efx, page, reg)); in _efx_writed_page_locked()
302 efx_writed(efx, value, efx_paged_reg(efx, page, reg)); in _efx_writed_page_locked()
305 #define efx_writed_page_locked(efx, value, reg, page) \ argument
307 reg + BUILD_BUG_ON_ZERO((reg) != 0x420), \