Lines Matching defs:ioat_chan

23 #define to_dev(ioat_chan) (&(ioat_chan)->ioat_dma->pdev->dev)
24 #define to_pdev(ioat_chan) ((ioat_chan)->ioat_dma->pdev)
219 __dump_desc_dbg(struct ioatdma_chan *ioat_chan, struct ioat_dma_descriptor *hw,
222 struct device *dev = to_dev(ioat_chan);
240 static inline u64 ioat_chansts(struct ioatdma_chan *ioat_chan)
242 return readq(ioat_chan->reg_base + IOAT_CHANSTS_OFFSET);
250 static inline u32 ioat_chanerr(struct ioatdma_chan *ioat_chan)
252 return readl(ioat_chan->reg_base + IOAT_CHANERR_OFFSET);
255 static inline void ioat_suspend(struct ioatdma_chan *ioat_chan)
257 u8 ver = ioat_chan->ioat_dma->version;
260 ioat_chan->reg_base + IOAT_CHANCMD_OFFSET(ver));
263 static inline void ioat_reset(struct ioatdma_chan *ioat_chan)
265 u8 ver = ioat_chan->ioat_dma->version;
268 ioat_chan->reg_base + IOAT_CHANCMD_OFFSET(ver));
271 static inline bool ioat_reset_pending(struct ioatdma_chan *ioat_chan)
273 u8 ver = ioat_chan->ioat_dma->version;
276 cmd = readb(ioat_chan->reg_base + IOAT_CHANCMD_OFFSET(ver));
307 static inline u32 ioat_ring_size(struct ioatdma_chan *ioat_chan)
309 return 1 << ioat_chan->alloc_order;
313 static inline u16 ioat_ring_active(struct ioatdma_chan *ioat_chan)
315 return CIRC_CNT(ioat_chan->head, ioat_chan->tail,
316 ioat_ring_size(ioat_chan));
320 static inline u16 ioat_ring_pending(struct ioatdma_chan *ioat_chan)
322 return CIRC_CNT(ioat_chan->head, ioat_chan->issued,
323 ioat_ring_size(ioat_chan));
326 static inline u32 ioat_ring_space(struct ioatdma_chan *ioat_chan)
328 return ioat_ring_size(ioat_chan) - ioat_ring_active(ioat_chan);
332 ioat_xferlen_to_descs(struct ioatdma_chan *ioat_chan, size_t len)
334 u16 num_descs = len >> ioat_chan->xfercap_log;
336 num_descs += !!(len & ((1 << ioat_chan->xfercap_log) - 1));
341 ioat_get_ring_ent(struct ioatdma_chan *ioat_chan, u16 idx)
343 return ioat_chan->ring[idx & (ioat_ring_size(ioat_chan) - 1)];
347 ioat_set_chainaddr(struct ioatdma_chan *ioat_chan, u64 addr)
350 ioat_chan->reg_base + IOAT2_CHAINADDR_OFFSET_LOW);
352 ioat_chan->reg_base + IOAT2_CHAINADDR_OFFSET_HIGH);
389 void ioat_start_null_desc(struct ioatdma_chan *ioat_chan);
391 int ioat_reset_hw(struct ioatdma_chan *ioat_chan);
397 int ioat_check_space_lock(struct ioatdma_chan *ioat_chan, int num_descs);
406 void ioat_stop(struct ioatdma_chan *ioat_chan);