Lines Matching refs:efx
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()
84 static inline void _efx_writeq(struct efx_nic *efx, __le64 value, 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()
95 static inline void _efx_writed(struct efx_nic *efx, __le32 value, 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()
106 static inline void efx_writeo(struct efx_nic *efx, const efx_oword_t *value, in efx_writeo() argument
111 netif_vdbg(efx, hw, efx->net_dev, in efx_writeo()
115 spin_lock_irqsave(&efx->biu_lock, flags); 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()
125 spin_unlock_irqrestore(&efx->biu_lock, flags); in efx_writeo()
129 static inline void efx_sram_writeq(struct efx_nic *efx, void __iomem *membase, in efx_sram_writeq() argument
135 netif_vdbg(efx, hw, efx->net_dev, in efx_sram_writeq()
139 spin_lock_irqsave(&efx->biu_lock, flags); in efx_sram_writeq()
146 spin_unlock_irqrestore(&efx->biu_lock, flags); in efx_sram_writeq()
150 static inline void efx_writed(struct efx_nic *efx, const efx_dword_t *value, in efx_writed() argument
153 netif_vdbg(efx, hw, efx->net_dev, in efx_writed()
158 _efx_writed(efx, value->u32[0], reg); in efx_writed()
162 static inline void efx_reado(struct efx_nic *efx, efx_oword_t *value, in efx_reado() argument
167 spin_lock_irqsave(&efx->biu_lock, flags); in efx_reado()
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()
172 spin_unlock_irqrestore(&efx->biu_lock, flags); in efx_reado()
174 netif_vdbg(efx, hw, efx->net_dev, in efx_reado()
180 static inline void efx_sram_readq(struct efx_nic *efx, void __iomem *membase, in efx_sram_readq() argument
186 spin_lock_irqsave(&efx->biu_lock, flags); in efx_sram_readq()
193 spin_unlock_irqrestore(&efx->biu_lock, flags); in efx_sram_readq()
195 netif_vdbg(efx, hw, efx->net_dev, in efx_sram_readq()
201 static inline void efx_readd(struct efx_nic *efx, efx_dword_t *value, in efx_readd() argument
204 value->u32[0] = _efx_readd(efx, reg); in efx_readd()
205 netif_vdbg(efx, hw, efx->net_dev, in efx_readd()
212 efx_writeo_table(struct efx_nic *efx, const efx_oword_t *value, in efx_writeo_table() argument
215 efx_writeo(efx, value, reg + index * sizeof(efx_oword_t)); in efx_writeo_table()
219 static inline void efx_reado_table(struct efx_nic *efx, efx_oword_t *value, in efx_reado_table() argument
222 efx_reado(efx, value, reg + index * sizeof(efx_oword_t)); in efx_reado_table()
232 static inline unsigned int efx_paged_reg(struct efx_nic *efx, unsigned int page, in efx_paged_reg() argument
235 return page * efx->vi_stride + reg; in efx_paged_reg()
239 static inline void _efx_writeo_page(struct efx_nic *efx, efx_oword_t *value, in _efx_writeo_page() argument
242 reg = efx_paged_reg(efx, page, reg); in _efx_writeo_page()
244 netif_vdbg(efx, hw, efx->net_dev, 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
259 _efx_writeo_page(efx, value, \
268 _efx_writed_page(struct efx_nic *efx, const efx_dword_t *value, 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
274 _efx_writed_page(efx, value, \
290 static inline void _efx_writed_page_locked(struct efx_nic *efx, in _efx_writed_page_locked() argument
298 spin_lock_irqsave(&efx->biu_lock, flags); in _efx_writed_page_locked()
299 efx_writed(efx, value, efx_paged_reg(efx, page, reg)); in _efx_writed_page_locked()
300 spin_unlock_irqrestore(&efx->biu_lock, flags); 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
306 _efx_writed_page_locked(efx, value, \