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
217 __dump_desc_dbg(struct ioatdma_chan *ioat_chan, struct ioat_dma_descriptor *hw, in __dump_desc_dbg() argument
220 struct device *dev = to_dev(ioat_chan); in __dump_desc_dbg()
238 static inline u64 ioat_chansts_32(struct ioatdma_chan *ioat_chan) in ioat_chansts_32() argument
240 u8 ver = ioat_chan->ioat_dma->version; in ioat_chansts_32()
247 status_lo = readl(ioat_chan->reg_base + IOAT_CHANSTS_OFFSET_LOW(ver)); in ioat_chansts_32()
248 status = readl(ioat_chan->reg_base + IOAT_CHANSTS_OFFSET_HIGH(ver)); in ioat_chansts_32()
257 static inline u64 ioat_chansts(struct ioatdma_chan *ioat_chan) in ioat_chansts() argument
259 u8 ver = ioat_chan->ioat_dma->version; in ioat_chansts()
264 status = readq(ioat_chan->reg_base + IOAT_CHANSTS_OFFSET(ver)); in ioat_chansts()
266 status = ioat_chansts_32(ioat_chan); in ioat_chansts()
280 static inline u32 ioat_chanerr(struct ioatdma_chan *ioat_chan) in ioat_chanerr() argument
282 return readl(ioat_chan->reg_base + IOAT_CHANERR_OFFSET); in ioat_chanerr()
285 static inline void ioat_suspend(struct ioatdma_chan *ioat_chan) in ioat_suspend() argument
287 u8 ver = ioat_chan->ioat_dma->version; in ioat_suspend()
290 ioat_chan->reg_base + IOAT_CHANCMD_OFFSET(ver)); in ioat_suspend()
293 static inline void ioat_reset(struct ioatdma_chan *ioat_chan) in ioat_reset() argument
295 u8 ver = ioat_chan->ioat_dma->version; in ioat_reset()
298 ioat_chan->reg_base + IOAT_CHANCMD_OFFSET(ver)); in ioat_reset()
301 static inline bool ioat_reset_pending(struct ioatdma_chan *ioat_chan) in ioat_reset_pending() argument
303 u8 ver = ioat_chan->ioat_dma->version; in ioat_reset_pending()
306 cmd = readb(ioat_chan->reg_base + IOAT_CHANCMD_OFFSET(ver)); in ioat_reset_pending()
342 static inline u32 ioat_ring_size(struct ioatdma_chan *ioat_chan) in ioat_ring_size() argument
344 return 1 << ioat_chan->alloc_order; in ioat_ring_size()
348 static inline u16 ioat_ring_active(struct ioatdma_chan *ioat_chan) in ioat_ring_active() argument
350 return CIRC_CNT(ioat_chan->head, ioat_chan->tail, in ioat_ring_active()
351 ioat_ring_size(ioat_chan)); in ioat_ring_active()
355 static inline u16 ioat_ring_pending(struct ioatdma_chan *ioat_chan) in ioat_ring_pending() argument
357 return CIRC_CNT(ioat_chan->head, ioat_chan->issued, in ioat_ring_pending()
358 ioat_ring_size(ioat_chan)); in ioat_ring_pending()
361 static inline u32 ioat_ring_space(struct ioatdma_chan *ioat_chan) in ioat_ring_space() argument
363 return ioat_ring_size(ioat_chan) - ioat_ring_active(ioat_chan); in ioat_ring_space()
367 ioat_xferlen_to_descs(struct ioatdma_chan *ioat_chan, size_t len) in ioat_xferlen_to_descs() argument
369 u16 num_descs = len >> ioat_chan->xfercap_log; in ioat_xferlen_to_descs()
371 num_descs += !!(len & ((1 << ioat_chan->xfercap_log) - 1)); in ioat_xferlen_to_descs()
376 ioat_get_ring_ent(struct ioatdma_chan *ioat_chan, u16 idx) in ioat_get_ring_ent() argument
378 return ioat_chan->ring[idx & (ioat_ring_size(ioat_chan) - 1)]; in ioat_get_ring_ent()
382 ioat_set_chainaddr(struct ioatdma_chan *ioat_chan, u64 addr) in ioat_set_chainaddr() argument
385 ioat_chan->reg_base + IOAT2_CHAINADDR_OFFSET_LOW); in ioat_set_chainaddr()
387 ioat_chan->reg_base + IOAT2_CHAINADDR_OFFSET_HIGH); in ioat_set_chainaddr()
424 void ioat_start_null_desc(struct ioatdma_chan *ioat_chan);
426 int ioat_reset_hw(struct ioatdma_chan *ioat_chan);
432 int ioat_check_space_lock(struct ioatdma_chan *ioat_chan, int num_descs);
442 void ioat_stop(struct ioatdma_chan *ioat_chan);