Lines Matching defs:lfs
78 struct otx2_cptlfs_info *lfs;
83 struct otx2_cptlfs_info *lfs; /* Ptr to cptlfs_info struct */
122 struct otx2_cptlfs_info *lfs)
127 for (i = 0; i < lfs->lfs_num; i++) {
128 iq = &lfs->lf[i].iqueue;
130 dma_free_coherent(&lfs->pdev->dev,
140 struct otx2_cptlfs_info *lfs)
145 if (!lfs->lfs_num)
148 for (i = 0; i < lfs->lfs_num; i++) {
149 iq = &lfs->lf[i].iqueue;
154 iq->real_vaddr = dma_alloc_coherent(&lfs->pdev->dev, iq->size,
171 otx2_cpt_free_instruction_queues(lfs);
176 struct otx2_cptlfs_info *lfs)
181 for (slot = 0; slot < lfs->lfs_num; slot++) {
182 lf_q_base.u = lfs->lf[slot].iqueue.dma_addr;
183 otx2_cpt_write64(lfs->reg_base, lfs->blkaddr, slot,
194 otx2_cpt_write64(lf->lfs->reg_base, lf->lfs->blkaddr, lf->slot,
198 static inline void otx2_cptlf_set_iqueues_size(struct otx2_cptlfs_info *lfs)
202 for (slot = 0; slot < lfs->lfs_num; slot++)
203 otx2_cptlf_do_set_iqueue_size(&lfs->lf[slot]);
210 u8 blkaddr = lf->lfs->blkaddr;
214 otx2_cpt_write64(lf->lfs->reg_base, blkaddr, lf->slot,
219 lf_inprog.u = otx2_cpt_read64(lf->lfs->reg_base, blkaddr,
226 dev_err(&lf->lfs->pdev->dev,
238 otx2_cpt_write64(lf->lfs->reg_base, blkaddr, lf->slot,
242 static inline void otx2_cptlf_disable_iqueues(struct otx2_cptlfs_info *lfs)
246 for (slot = 0; slot < lfs->lfs_num; slot++)
247 otx2_cptlf_do_disable_iqueue(&lfs->lf[slot]);
253 u8 blkaddr = lf->lfs->blkaddr;
256 lf_ctl.u = otx2_cpt_read64(lf->lfs->reg_base, blkaddr, lf->slot,
261 otx2_cpt_write64(lf->lfs->reg_base, blkaddr, lf->slot,
274 u8 blkaddr = lf->lfs->blkaddr;
276 lf_inprog.u = otx2_cpt_read64(lf->lfs->reg_base, blkaddr, lf->slot,
281 otx2_cpt_write64(lf->lfs->reg_base, blkaddr, lf->slot,
295 static inline void otx2_cptlf_enable_iqueues(struct otx2_cptlfs_info *lfs)
299 for (slot = 0; slot < lfs->lfs_num; slot++) {
300 otx2_cptlf_enable_iqueue_exec(&lfs->lf[slot]);
301 otx2_cptlf_enable_iqueue_enq(&lfs->lf[slot]);
365 static inline bool otx2_cptlf_started(struct otx2_cptlfs_info *lfs)
367 return atomic_read(&lfs->state) == OTX2_CPTLF_STARTED;
370 static inline void otx2_cptlf_set_dev_info(struct otx2_cptlfs_info *lfs,
376 lfs->pdev = pdev;
377 lfs->reg_base = reg_base;
378 lfs->mbox = mbox;
379 lfs->blkaddr = blkaddr;
382 int otx2_cptlf_init(struct otx2_cptlfs_info *lfs, u8 eng_grp_msk, int pri,
384 void otx2_cptlf_shutdown(struct otx2_cptlfs_info *lfs);
385 int otx2_cptlf_register_interrupts(struct otx2_cptlfs_info *lfs);
386 void otx2_cptlf_unregister_interrupts(struct otx2_cptlfs_info *lfs);
387 void otx2_cptlf_free_irqs_affinity(struct otx2_cptlfs_info *lfs);
388 int otx2_cptlf_set_irqs_affinity(struct otx2_cptlfs_info *lfs);