Lines Matching refs:cptpf

121 	struct otx2_cptpf_dev *cptpf = dev_get_drvdata(dev);  in get_ucode_type()  local
124 struct pci_dev *pdev = cptpf->pdev; in get_ucode_type()
157 static int __write_ucode_base(struct otx2_cptpf_dev *cptpf, int eng, in __write_ucode_base() argument
160 return otx2_cpt_write_af_reg(&cptpf->afpf_mbox, cptpf->pdev, in __write_ucode_base()
166 struct otx2_cptpf_dev *cptpf, int blkaddr) in cptx_set_ucode_base() argument
173 ret = otx2_cpt_write_af_reg(&cptpf->afpf_mbox, cptpf->pdev, in cptx_set_ucode_base()
175 cptpf->pf_id << RVU_PFVF_PF_SHIFT, blkaddr); in cptx_set_ucode_base()
192 ret = __write_ucode_base(cptpf, bit, dma_addr, in cptx_set_ucode_base()
203 struct otx2_cptpf_dev *cptpf = obj; in cpt_set_ucode_base() local
206 if (cptpf->has_cpt1) { in cpt_set_ucode_base()
207 ret = cptx_set_ucode_base(eng_grp, cptpf, BLKADDR_CPT1); in cpt_set_ucode_base()
211 return cptx_set_ucode_base(eng_grp, cptpf, BLKADDR_CPT0); in cpt_set_ucode_base()
215 struct otx2_cptpf_dev *cptpf, in cptx_detach_and_disable_cores() argument
225 ret = otx2_cpt_read_af_reg(&cptpf->afpf_mbox, cptpf->pdev, in cptx_detach_and_disable_cores()
234 ret = otx2_cpt_write_af_reg(&cptpf->afpf_mbox, in cptx_detach_and_disable_cores()
235 cptpf->pdev, in cptx_detach_and_disable_cores()
251 ret = otx2_cpt_read_af_reg(&cptpf->afpf_mbox, in cptx_detach_and_disable_cores()
252 cptpf->pdev, in cptx_detach_and_disable_cores()
268 ret = otx2_cpt_write_af_reg(&cptpf->afpf_mbox, in cptx_detach_and_disable_cores()
269 cptpf->pdev, in cptx_detach_and_disable_cores()
283 struct otx2_cptpf_dev *cptpf = obj; in cpt_detach_and_disable_cores() local
287 bmap = get_cores_bmap(&cptpf->pdev->dev, eng_grp); in cpt_detach_and_disable_cores()
291 if (cptpf->has_cpt1) { in cpt_detach_and_disable_cores()
292 ret = cptx_detach_and_disable_cores(eng_grp, cptpf, bmap, in cpt_detach_and_disable_cores()
297 return cptx_detach_and_disable_cores(eng_grp, cptpf, bmap, in cpt_detach_and_disable_cores()
302 struct otx2_cptpf_dev *cptpf, in cptx_attach_and_enable_cores() argument
311 ret = otx2_cpt_read_af_reg(&cptpf->afpf_mbox, cptpf->pdev, in cptx_attach_and_enable_cores()
320 ret = otx2_cpt_write_af_reg(&cptpf->afpf_mbox, in cptx_attach_and_enable_cores()
321 cptpf->pdev, in cptx_attach_and_enable_cores()
331 ret = otx2_cpt_add_write_af_reg(&cptpf->afpf_mbox, cptpf->pdev, in cptx_attach_and_enable_cores()
337 return otx2_cpt_send_af_reg_requests(&cptpf->afpf_mbox, cptpf->pdev); in cptx_attach_and_enable_cores()
343 struct otx2_cptpf_dev *cptpf = obj; in cpt_attach_and_enable_cores() local
347 bmap = get_cores_bmap(&cptpf->pdev->dev, eng_grp); in cpt_attach_and_enable_cores()
351 if (cptpf->has_cpt1) { in cpt_attach_and_enable_cores()
352 ret = cptx_attach_and_enable_cores(eng_grp, cptpf, bmap, in cpt_attach_and_enable_cores()
357 return cptx_attach_and_enable_cores(eng_grp, cptpf, bmap, BLKADDR_CPT0); in cpt_attach_and_enable_cores()
1106 int otx2_cpt_create_eng_grps(struct otx2_cptpf_dev *cptpf, in otx2_cpt_create_eng_grps() argument
1111 struct pci_dev *pdev = cptpf->pdev; in otx2_cpt_create_eng_grps()
1194 otx2_cpt_write_af_reg(&cptpf->afpf_mbox, pdev, CPT_AF_CTL, in otx2_cpt_create_eng_grps()
1202 otx2_cpt_write_af_reg(&cptpf->afpf_mbox, pdev, CPT_AF_CTX_FLUSH_TIMER, in otx2_cpt_create_eng_grps()
1213 static int cptx_disable_all_cores(struct otx2_cptpf_dev *cptpf, int total_cores, in cptx_disable_all_cores() argument
1222 ret = otx2_cpt_add_write_af_reg(&cptpf->afpf_mbox, cptpf->pdev, in cptx_disable_all_cores()
1228 cptpf->eng_grps.eng_ref_cnt[i] = 0; in cptx_disable_all_cores()
1230 ret = otx2_cpt_send_af_reg_requests(&cptpf->afpf_mbox, cptpf->pdev); in cptx_disable_all_cores()
1242 ret = otx2_cpt_read_af_reg(&cptpf->afpf_mbox, in cptx_disable_all_cores()
1243 cptpf->pdev, in cptx_disable_all_cores()
1258 ret = otx2_cpt_add_write_af_reg(&cptpf->afpf_mbox, cptpf->pdev, in cptx_disable_all_cores()
1264 return otx2_cpt_send_af_reg_requests(&cptpf->afpf_mbox, cptpf->pdev); in cptx_disable_all_cores()
1267 int otx2_cpt_disable_all_cores(struct otx2_cptpf_dev *cptpf) in otx2_cpt_disable_all_cores() argument
1271 total_cores = cptpf->eng_grps.avail.max_se_cnt + in otx2_cpt_disable_all_cores()
1272 cptpf->eng_grps.avail.max_ie_cnt + in otx2_cpt_disable_all_cores()
1273 cptpf->eng_grps.avail.max_ae_cnt; in otx2_cpt_disable_all_cores()
1275 if (cptpf->has_cpt1) { in otx2_cpt_disable_all_cores()
1276 ret = cptx_disable_all_cores(cptpf, total_cores, BLKADDR_CPT1); in otx2_cpt_disable_all_cores()
1280 return cptx_disable_all_cores(cptpf, total_cores, BLKADDR_CPT0); in otx2_cpt_disable_all_cores()
1411 int otx2_cpt_discover_eng_capabilities(struct otx2_cptpf_dev *cptpf) in otx2_cpt_discover_eng_capabilities() argument
1413 struct otx2_cptlfs_info *lfs = &cptpf->lfs; in otx2_cpt_discover_eng_capabilities()
1428 if (cptpf->is_eng_caps_discovered) in otx2_cpt_discover_eng_capabilities()
1431 pdev = cptpf->pdev; in otx2_cpt_discover_eng_capabilities()
1436 ret = create_eng_caps_discovery_grps(pdev, &cptpf->eng_grps); in otx2_cpt_discover_eng_capabilities()
1441 lfs->reg_base = cptpf->reg_base; in otx2_cpt_discover_eng_capabilities()
1442 lfs->mbox = &cptpf->afpf_mbox; in otx2_cpt_discover_eng_capabilities()
1444 ret = otx2_cptlf_init(&cptpf->lfs, OTX2_CPT_ALL_ENG_GRPS_MASK, in otx2_cpt_discover_eng_capabilities()
1481 iq_cmd.cptr.s.grp = otx2_cpt_get_eng_grp(&cptpf->eng_grps, in otx2_cpt_discover_eng_capabilities()
1484 lfs->ops->send_cmd(&inst, 1, &cptpf->lfs.lf[0]); in otx2_cpt_discover_eng_capabilities()
1490 cptpf->eng_caps[etype].u = be64_to_cpup(rptr); in otx2_cpt_discover_eng_capabilities()
1493 cptpf->is_eng_caps_discovered = true; in otx2_cpt_discover_eng_capabilities()
1498 otx2_cptlf_shutdown(&cptpf->lfs); in otx2_cpt_discover_eng_capabilities()
1500 delete_engine_grps(pdev, &cptpf->eng_grps); in otx2_cpt_discover_eng_capabilities()