Lines Matching refs:efx
82 static inline void _efx_writeq(struct efx_nic *efx, __le64 value, in _efx_writeq() argument
85 __raw_writeq((__force u64)value, efx->membase + reg); in _efx_writeq()
87 static inline __le64 _efx_readq(struct efx_nic *efx, unsigned int reg) in _efx_readq() argument
89 return (__force __le64)__raw_readq(efx->membase + reg); in _efx_readq()
93 static inline void _efx_writed(struct efx_nic *efx, __le32 value, in _efx_writed() argument
96 __raw_writel((__force u32)value, efx->membase + reg); in _efx_writed()
98 static inline __le32 _efx_readd(struct efx_nic *efx, unsigned int reg) in _efx_readd() argument
100 return (__force __le32)__raw_readl(efx->membase + reg); in _efx_readd()
104 static inline void efx_writeo(struct efx_nic *efx, const efx_oword_t *value, in efx_writeo() argument
109 netif_vdbg(efx, hw, efx->net_dev, in efx_writeo()
113 spin_lock_irqsave(&efx->biu_lock, flags); in efx_writeo()
115 _efx_writeq(efx, value->u64[0], reg + 0); in efx_writeo()
116 _efx_writeq(efx, value->u64[1], reg + 8); in efx_writeo()
118 _efx_writed(efx, value->u32[0], reg + 0); in efx_writeo()
119 _efx_writed(efx, value->u32[1], reg + 4); in efx_writeo()
120 _efx_writed(efx, value->u32[2], reg + 8); in efx_writeo()
121 _efx_writed(efx, value->u32[3], reg + 12); in efx_writeo()
124 spin_unlock_irqrestore(&efx->biu_lock, flags); in efx_writeo()
128 static inline void efx_sram_writeq(struct efx_nic *efx, void __iomem *membase, in efx_sram_writeq() argument
134 netif_vdbg(efx, hw, efx->net_dev, in efx_sram_writeq()
138 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()
233 static inline void _efx_writeo_page(struct efx_nic *efx, efx_oword_t *value, in _efx_writeo_page() argument
238 netif_vdbg(efx, hw, efx->net_dev, in _efx_writeo_page()
243 _efx_writeq(efx, value->u64[0], reg + 0); in _efx_writeo_page()
244 _efx_writeq(efx, value->u64[1], reg + 8); in _efx_writeo_page()
246 _efx_writed(efx, value->u32[0], reg + 0); in _efx_writeo_page()
247 _efx_writed(efx, value->u32[1], reg + 4); in _efx_writeo_page()
248 _efx_writed(efx, value->u32[2], reg + 8); in _efx_writeo_page()
249 _efx_writed(efx, value->u32[3], reg + 12); in _efx_writeo_page()
252 #define efx_writeo_page(efx, value, reg, page) \ argument
253 _efx_writeo_page(efx, value, \
262 _efx_writed_page(struct efx_nic *efx, const efx_dword_t *value, in _efx_writed_page() argument
265 efx_writed(efx, value, EFX_PAGED_REG(page, reg)); in _efx_writed_page()
267 #define efx_writed_page(efx, value, reg, page) \ argument
268 _efx_writed_page(efx, value, \
282 static inline void _efx_writed_page_locked(struct efx_nic *efx, in _efx_writed_page_locked() argument
290 spin_lock_irqsave(&efx->biu_lock, flags); in _efx_writed_page_locked()
291 efx_writed(efx, value, EFX_PAGED_REG(page, reg)); in _efx_writed_page_locked()
292 spin_unlock_irqrestore(&efx->biu_lock, flags); in _efx_writed_page_locked()
294 efx_writed(efx, value, EFX_PAGED_REG(page, reg)); in _efx_writed_page_locked()
297 #define efx_writed_page_locked(efx, value, reg, page) \ argument
298 _efx_writed_page_locked(efx, value, \