Lines Matching refs:ioat_chan
35 #define to_dev(ioat_chan) (&(ioat_chan)->ioat_dma->pdev->dev) argument
36 #define to_pdev(ioat_chan) ((ioat_chan)->ioat_dma->pdev) argument
229 __dump_desc_dbg(struct ioatdma_chan *ioat_chan, struct ioat_dma_descriptor *hw, in __dump_desc_dbg() argument
232 struct device *dev = to_dev(ioat_chan); in __dump_desc_dbg()
250 static inline u64 ioat_chansts(struct ioatdma_chan *ioat_chan) in ioat_chansts() argument
252 return readq(ioat_chan->reg_base + IOAT_CHANSTS_OFFSET); in ioat_chansts()
260 static inline u32 ioat_chanerr(struct ioatdma_chan *ioat_chan) in ioat_chanerr() argument
262 return readl(ioat_chan->reg_base + IOAT_CHANERR_OFFSET); in ioat_chanerr()
265 static inline void ioat_suspend(struct ioatdma_chan *ioat_chan) in ioat_suspend() argument
267 u8 ver = ioat_chan->ioat_dma->version; in ioat_suspend()
270 ioat_chan->reg_base + IOAT_CHANCMD_OFFSET(ver)); in ioat_suspend()
273 static inline void ioat_reset(struct ioatdma_chan *ioat_chan) in ioat_reset() argument
275 u8 ver = ioat_chan->ioat_dma->version; in ioat_reset()
278 ioat_chan->reg_base + IOAT_CHANCMD_OFFSET(ver)); in ioat_reset()
281 static inline bool ioat_reset_pending(struct ioatdma_chan *ioat_chan) in ioat_reset_pending() argument
283 u8 ver = ioat_chan->ioat_dma->version; in ioat_reset_pending()
286 cmd = readb(ioat_chan->reg_base + IOAT_CHANCMD_OFFSET(ver)); in ioat_reset_pending()
320 static inline u32 ioat_ring_size(struct ioatdma_chan *ioat_chan) in ioat_ring_size() argument
322 return 1 << ioat_chan->alloc_order; in ioat_ring_size()
326 static inline u16 ioat_ring_active(struct ioatdma_chan *ioat_chan) in ioat_ring_active() argument
328 return CIRC_CNT(ioat_chan->head, ioat_chan->tail, in ioat_ring_active()
329 ioat_ring_size(ioat_chan)); in ioat_ring_active()
333 static inline u16 ioat_ring_pending(struct ioatdma_chan *ioat_chan) in ioat_ring_pending() argument
335 return CIRC_CNT(ioat_chan->head, ioat_chan->issued, in ioat_ring_pending()
336 ioat_ring_size(ioat_chan)); in ioat_ring_pending()
339 static inline u32 ioat_ring_space(struct ioatdma_chan *ioat_chan) in ioat_ring_space() argument
341 return ioat_ring_size(ioat_chan) - ioat_ring_active(ioat_chan); in ioat_ring_space()
345 ioat_xferlen_to_descs(struct ioatdma_chan *ioat_chan, size_t len) in ioat_xferlen_to_descs() argument
347 u16 num_descs = len >> ioat_chan->xfercap_log; in ioat_xferlen_to_descs()
349 num_descs += !!(len & ((1 << ioat_chan->xfercap_log) - 1)); in ioat_xferlen_to_descs()
354 ioat_get_ring_ent(struct ioatdma_chan *ioat_chan, u16 idx) in ioat_get_ring_ent() argument
356 return ioat_chan->ring[idx & (ioat_ring_size(ioat_chan) - 1)]; in ioat_get_ring_ent()
360 ioat_set_chainaddr(struct ioatdma_chan *ioat_chan, u64 addr) in ioat_set_chainaddr() argument
363 ioat_chan->reg_base + IOAT2_CHAINADDR_OFFSET_LOW); in ioat_set_chainaddr()
365 ioat_chan->reg_base + IOAT2_CHAINADDR_OFFSET_HIGH); in ioat_set_chainaddr()
402 void ioat_start_null_desc(struct ioatdma_chan *ioat_chan);
404 int ioat_reset_hw(struct ioatdma_chan *ioat_chan);
410 int ioat_check_space_lock(struct ioatdma_chan *ioat_chan, int num_descs);
419 void ioat_stop(struct ioatdma_chan *ioat_chan);