Lines Matching refs:reg

54 static inline u32 efx_reg(struct efx_nic *efx, unsigned int reg)  in efx_reg()  argument
56 return efx->reg_base + reg; in efx_reg()
61 unsigned int reg) in _efx_writeq() argument
63 __raw_writeq((__force u64)value, efx->membase + reg); in _efx_writeq()
65 static inline __le64 _efx_readq(struct efx_nic *efx, unsigned int reg) in _efx_readq() argument
67 return (__force __le64)__raw_readq(efx->membase + reg); in _efx_readq()
72 unsigned int reg) in _efx_writed() argument
74 __raw_writel((__force u32)value, efx->membase + reg); in _efx_writed()
76 static inline __le32 _efx_readd(struct efx_nic *efx, unsigned int reg) in _efx_readd() argument
78 return (__force __le32)__raw_readl(efx->membase + reg); in _efx_readd()
83 unsigned int reg) in efx_writeo() argument
88 "writing register %x with " EFX_OWORD_FMT "\n", reg, in efx_writeo()
93 _efx_writeq(efx, value->u64[0], reg + 0); in efx_writeo()
94 _efx_writeq(efx, value->u64[1], reg + 8); in efx_writeo()
96 _efx_writed(efx, value->u32[0], reg + 0); in efx_writeo()
97 _efx_writed(efx, value->u32[1], reg + 4); in efx_writeo()
98 _efx_writed(efx, value->u32[2], reg + 8); in efx_writeo()
99 _efx_writed(efx, value->u32[3], reg + 12); in efx_writeo()
106 unsigned int reg) in efx_writed() argument
110 reg, EFX_DWORD_VAL(*value)); in efx_writed()
113 _efx_writed(efx, value->u32[0], reg); in efx_writed()
118 unsigned int reg) in efx_reado() argument
123 value->u32[0] = _efx_readd(efx, reg + 0); in efx_reado()
124 value->u32[1] = _efx_readd(efx, reg + 4); in efx_reado()
125 value->u32[2] = _efx_readd(efx, reg + 8); in efx_reado()
126 value->u32[3] = _efx_readd(efx, reg + 12); in efx_reado()
130 "read from register %x, got " EFX_OWORD_FMT "\n", reg, in efx_reado()
136 unsigned int reg) in efx_readd() argument
138 value->u32[0] = _efx_readd(efx, reg); in efx_readd()
141 reg, EFX_DWORD_VAL(*value)); in efx_readd()
147 unsigned int reg, unsigned int index) in efx_writeo_table() argument
149 efx_writeo(efx, value, reg + index * sizeof(efx_oword_t)); in efx_writeo_table()
154 unsigned int reg, unsigned int index) in efx_reado_table() argument
156 efx_reado(efx, value, reg + index * sizeof(efx_oword_t)); in efx_reado_table()
167 unsigned int reg) in efx_paged_reg() argument
169 return page * efx->vi_stride + reg; in efx_paged_reg()
174 unsigned int reg, unsigned int page) in _efx_writeo_page() argument
176 reg = efx_paged_reg(efx, page, reg); in _efx_writeo_page()
179 "writing register %x with " EFX_OWORD_FMT "\n", reg, in _efx_writeo_page()
183 _efx_writeq(efx, value->u64[0], reg + 0); in _efx_writeo_page()
184 _efx_writeq(efx, value->u64[1], reg + 8); in _efx_writeo_page()
186 _efx_writed(efx, value->u32[0], reg + 0); in _efx_writeo_page()
187 _efx_writed(efx, value->u32[1], reg + 4); in _efx_writeo_page()
188 _efx_writed(efx, value->u32[2], reg + 8); in _efx_writeo_page()
189 _efx_writed(efx, value->u32[3], reg + 12); in _efx_writeo_page()
192 #define efx_writeo_page(efx, value, reg, page) \ argument
194 reg + \
195 BUILD_BUG_ON_ZERO((reg) != 0x830 && (reg) != 0xa10), \
203 unsigned int reg, unsigned int page) in _efx_writed_page() argument
205 efx_writed(efx, value, efx_paged_reg(efx, page, reg)); in _efx_writed_page()
207 #define efx_writed_page(efx, value, reg, page) \ argument
209 reg + \
210 BUILD_BUG_ON_ZERO((reg) != 0x180 && \
211 (reg) != 0x200 && \
212 (reg) != 0x400 && \
213 (reg) != 0x420 && \
214 (reg) != 0x830 && \
215 (reg) != 0x83c && \
216 (reg) != 0xa18 && \
217 (reg) != 0xa1c), \
226 unsigned int reg, in _efx_writed_page_locked() argument
233 efx_writed(efx, value, efx_paged_reg(efx, page, reg)); in _efx_writed_page_locked()
236 efx_writed(efx, value, efx_paged_reg(efx, page, reg)); in _efx_writed_page_locked()
239 #define efx_writed_page_locked(efx, value, reg, page) \ argument
241 reg + BUILD_BUG_ON_ZERO((reg) != 0x420), \