Lines Matching refs:cptpf

122 	struct otx2_cptpf_dev *cptpf = dev_get_drvdata(dev);  in get_ucode_type()  local
125 struct pci_dev *pdev = cptpf->pdev; in get_ucode_type()
158 static int __write_ucode_base(struct otx2_cptpf_dev *cptpf, int eng, in __write_ucode_base() argument
161 return otx2_cpt_write_af_reg(&cptpf->afpf_mbox, cptpf->pdev, in __write_ucode_base()
167 struct otx2_cptpf_dev *cptpf, int blkaddr) in cptx_set_ucode_base() argument
174 ret = otx2_cpt_write_af_reg(&cptpf->afpf_mbox, cptpf->pdev, in cptx_set_ucode_base()
176 cptpf->pf_id << RVU_PFVF_PF_SHIFT, blkaddr); in cptx_set_ucode_base()
193 ret = __write_ucode_base(cptpf, bit, dma_addr, in cptx_set_ucode_base()
204 struct otx2_cptpf_dev *cptpf = obj; in cpt_set_ucode_base() local
207 if (cptpf->has_cpt1) { in cpt_set_ucode_base()
208 ret = cptx_set_ucode_base(eng_grp, cptpf, BLKADDR_CPT1); in cpt_set_ucode_base()
212 return cptx_set_ucode_base(eng_grp, cptpf, BLKADDR_CPT0); in cpt_set_ucode_base()
216 struct otx2_cptpf_dev *cptpf, in cptx_detach_and_disable_cores() argument
226 ret = otx2_cpt_read_af_reg(&cptpf->afpf_mbox, cptpf->pdev, in cptx_detach_and_disable_cores()
235 ret = otx2_cpt_write_af_reg(&cptpf->afpf_mbox, in cptx_detach_and_disable_cores()
236 cptpf->pdev, in cptx_detach_and_disable_cores()
252 ret = otx2_cpt_read_af_reg(&cptpf->afpf_mbox, in cptx_detach_and_disable_cores()
253 cptpf->pdev, in cptx_detach_and_disable_cores()
269 ret = otx2_cpt_write_af_reg(&cptpf->afpf_mbox, in cptx_detach_and_disable_cores()
270 cptpf->pdev, in cptx_detach_and_disable_cores()
284 struct otx2_cptpf_dev *cptpf = obj; in cpt_detach_and_disable_cores() local
288 bmap = get_cores_bmap(&cptpf->pdev->dev, eng_grp); in cpt_detach_and_disable_cores()
292 if (cptpf->has_cpt1) { in cpt_detach_and_disable_cores()
293 ret = cptx_detach_and_disable_cores(eng_grp, cptpf, bmap, in cpt_detach_and_disable_cores()
298 return cptx_detach_and_disable_cores(eng_grp, cptpf, bmap, in cpt_detach_and_disable_cores()
303 struct otx2_cptpf_dev *cptpf, in cptx_attach_and_enable_cores() argument
312 ret = otx2_cpt_read_af_reg(&cptpf->afpf_mbox, cptpf->pdev, in cptx_attach_and_enable_cores()
321 ret = otx2_cpt_write_af_reg(&cptpf->afpf_mbox, in cptx_attach_and_enable_cores()
322 cptpf->pdev, in cptx_attach_and_enable_cores()
332 ret = otx2_cpt_add_write_af_reg(&cptpf->afpf_mbox, cptpf->pdev, in cptx_attach_and_enable_cores()
338 return otx2_cpt_send_af_reg_requests(&cptpf->afpf_mbox, cptpf->pdev); in cptx_attach_and_enable_cores()
344 struct otx2_cptpf_dev *cptpf = obj; in cpt_attach_and_enable_cores() local
348 bmap = get_cores_bmap(&cptpf->pdev->dev, eng_grp); in cpt_attach_and_enable_cores()
352 if (cptpf->has_cpt1) { in cpt_attach_and_enable_cores()
353 ret = cptx_attach_and_enable_cores(eng_grp, cptpf, bmap, in cpt_attach_and_enable_cores()
358 return cptx_attach_and_enable_cores(eng_grp, cptpf, bmap, BLKADDR_CPT0); in cpt_attach_and_enable_cores()
1140 int otx2_cpt_create_eng_grps(struct otx2_cptpf_dev *cptpf, in otx2_cpt_create_eng_grps() argument
1145 struct pci_dev *pdev = cptpf->pdev; in otx2_cpt_create_eng_grps()
1238 otx2_cpt_write_af_reg(&cptpf->afpf_mbox, pdev, CPT_AF_CTL, in otx2_cpt_create_eng_grps()
1246 otx2_cpt_write_af_reg(&cptpf->afpf_mbox, pdev, CPT_AF_CTX_FLUSH_TIMER, in otx2_cpt_create_eng_grps()
1255 otx2_cpt_read_af_reg(&cptpf->afpf_mbox, pdev, CPT_AF_DIAG, &reg_val, in otx2_cpt_create_eng_grps()
1257 otx2_cpt_write_af_reg(&cptpf->afpf_mbox, pdev, CPT_AF_DIAG, in otx2_cpt_create_eng_grps()
1272 static int cptx_disable_all_cores(struct otx2_cptpf_dev *cptpf, int total_cores, in cptx_disable_all_cores() argument
1281 ret = otx2_cpt_add_write_af_reg(&cptpf->afpf_mbox, cptpf->pdev, in cptx_disable_all_cores()
1287 cptpf->eng_grps.eng_ref_cnt[i] = 0; in cptx_disable_all_cores()
1289 ret = otx2_cpt_send_af_reg_requests(&cptpf->afpf_mbox, cptpf->pdev); in cptx_disable_all_cores()
1301 ret = otx2_cpt_read_af_reg(&cptpf->afpf_mbox, in cptx_disable_all_cores()
1302 cptpf->pdev, in cptx_disable_all_cores()
1317 ret = otx2_cpt_add_write_af_reg(&cptpf->afpf_mbox, cptpf->pdev, in cptx_disable_all_cores()
1323 return otx2_cpt_send_af_reg_requests(&cptpf->afpf_mbox, cptpf->pdev); in cptx_disable_all_cores()
1326 int otx2_cpt_disable_all_cores(struct otx2_cptpf_dev *cptpf) in otx2_cpt_disable_all_cores() argument
1330 total_cores = cptpf->eng_grps.avail.max_se_cnt + in otx2_cpt_disable_all_cores()
1331 cptpf->eng_grps.avail.max_ie_cnt + in otx2_cpt_disable_all_cores()
1332 cptpf->eng_grps.avail.max_ae_cnt; in otx2_cpt_disable_all_cores()
1334 if (cptpf->has_cpt1) { in otx2_cpt_disable_all_cores()
1335 ret = cptx_disable_all_cores(cptpf, total_cores, BLKADDR_CPT1); in otx2_cpt_disable_all_cores()
1339 return cptx_disable_all_cores(cptpf, total_cores, BLKADDR_CPT0); in otx2_cpt_disable_all_cores()
1478 int otx2_cpt_discover_eng_capabilities(struct otx2_cptpf_dev *cptpf) in otx2_cpt_discover_eng_capabilities() argument
1480 struct otx2_cptlfs_info *lfs = &cptpf->lfs; in otx2_cpt_discover_eng_capabilities()
1495 if (cptpf->is_eng_caps_discovered) in otx2_cpt_discover_eng_capabilities()
1498 pdev = cptpf->pdev; in otx2_cpt_discover_eng_capabilities()
1503 ret = create_eng_caps_discovery_grps(pdev, &cptpf->eng_grps); in otx2_cpt_discover_eng_capabilities()
1508 lfs->reg_base = cptpf->reg_base; in otx2_cpt_discover_eng_capabilities()
1509 lfs->mbox = &cptpf->afpf_mbox; in otx2_cpt_discover_eng_capabilities()
1511 ret = otx2_cptlf_init(&cptpf->lfs, OTX2_CPT_ALL_ENG_GRPS_MASK, in otx2_cpt_discover_eng_capabilities()
1548 iq_cmd.cptr.s.grp = otx2_cpt_get_eng_grp(&cptpf->eng_grps, in otx2_cpt_discover_eng_capabilities()
1551 lfs->ops->send_cmd(&inst, 1, &cptpf->lfs.lf[0]); in otx2_cpt_discover_eng_capabilities()
1557 cptpf->eng_caps[etype].u = be64_to_cpup(rptr); in otx2_cpt_discover_eng_capabilities()
1560 cptpf->is_eng_caps_discovered = true; in otx2_cpt_discover_eng_capabilities()
1565 otx2_cptlf_shutdown(&cptpf->lfs); in otx2_cpt_discover_eng_capabilities()
1567 delete_engine_grps(pdev, &cptpf->eng_grps); in otx2_cpt_discover_eng_capabilities()
1572 int otx2_cpt_dl_custom_egrp_create(struct otx2_cptpf_dev *cptpf, in otx2_cpt_dl_custom_egrp_create() argument
1577 struct otx2_cpt_eng_grps *eng_grps = &cptpf->eng_grps; in otx2_cpt_dl_custom_egrp_create()
1580 struct device *dev = &cptpf->pdev->dev; in otx2_cpt_dl_custom_egrp_create()
1676 if (cptpf->enabled_vfs) { in otx2_cpt_dl_custom_egrp_create()
1724 int otx2_cpt_dl_custom_egrp_delete(struct otx2_cptpf_dev *cptpf, in otx2_cpt_dl_custom_egrp_delete() argument
1727 struct otx2_cpt_eng_grps *eng_grps = &cptpf->eng_grps; in otx2_cpt_dl_custom_egrp_delete()
1728 struct device *dev = &cptpf->pdev->dev; in otx2_cpt_dl_custom_egrp_delete()
1803 void otx2_cpt_print_uc_dbg_info(struct otx2_cptpf_dev *cptpf) in otx2_cpt_print_uc_dbg_info() argument
1805 struct otx2_cpt_eng_grps *eng_grps = &cptpf->eng_grps; in otx2_cpt_print_uc_dbg_info()
1848 if (is_dev_otx2(cptpf->pdev)) in otx2_cpt_print_uc_dbg_info()