Lines Matching refs:epf
120 struct pci_epf *epf; member
210 func_no = ntb->epf->func_no; in epf_ntb_configure_mw()
211 vfunc_no = ntb->epf->vfunc_no; in epf_ntb_configure_mw()
213 ret = pci_epc_map_addr(ntb->epf->epc, func_no, vfunc_no, phys_addr, addr, size); in epf_ntb_configure_mw()
215 dev_err(&ntb->epf->epc->dev, in epf_ntb_configure_mw()
230 pci_epc_unmap_addr(ntb->epf->epc, in epf_ntb_teardown_mw()
231 ntb->epf->func_no, in epf_ntb_teardown_mw()
232 ntb->epf->vfunc_no, in epf_ntb_teardown_mw()
276 dev = &ntb->epf->dev; in epf_ntb_cmd_handler()
343 epf_bar = &ntb->epf->bar[barno]; in epf_ntb_config_sspad_bar_clear()
345 pci_epc_clear_bar(ntb->epf->epc, ntb->epf->func_no, ntb->epf->vfunc_no, epf_bar); in epf_ntb_config_sspad_bar_clear()
366 dev = &ntb->epf->dev; in epf_ntb_config_sspad_bar_set()
367 func_no = ntb->epf->func_no; in epf_ntb_config_sspad_bar_set()
368 vfunc_no = ntb->epf->vfunc_no; in epf_ntb_config_sspad_bar_set()
370 epf_bar = &ntb->epf->bar[barno]; in epf_ntb_config_sspad_bar_set()
372 ret = pci_epc_set_bar(ntb->epf->epc, func_no, vfunc_no, epf_bar); in epf_ntb_config_sspad_bar_set()
390 pci_epf_free_space(ntb->epf, ntb->reg, barno, 0); in epf_ntb_config_spad_bar_free()
409 struct pci_epf *epf = ntb->epf; in epf_ntb_config_spad_bar_alloc() local
410 struct device *dev = &epf->dev; in epf_ntb_config_spad_bar_alloc()
414 const struct pci_epc_features *epc_features = pci_epc_get_features(epf->epc, in epf_ntb_config_spad_bar_alloc()
415 epf->func_no, in epf_ntb_config_spad_bar_alloc()
416 epf->vfunc_no); in epf_ntb_config_spad_bar_alloc()
442 base = pci_epf_alloc_space(epf, size, barno, align, 0); in epf_ntb_config_spad_bar_alloc()
481 dev = &ntb->epf->dev; in epf_ntb_configure_interrupt()
483 epc_features = pci_epc_get_features(ntb->epf->epc, ntb->epf->func_no, ntb->epf->vfunc_no); in epf_ntb_configure_interrupt()
499 ret = pci_epc_set_msi(ntb->epf->epc, in epf_ntb_configure_interrupt()
500 ntb->epf->func_no, in epf_ntb_configure_interrupt()
501 ntb->epf->vfunc_no, in epf_ntb_configure_interrupt()
520 struct device *dev = &ntb->epf->dev; in epf_ntb_db_bar_init()
527 epc_features = pci_epc_get_features(ntb->epf->epc, in epf_ntb_db_bar_init()
528 ntb->epf->func_no, in epf_ntb_db_bar_init()
529 ntb->epf->vfunc_no); in epf_ntb_db_bar_init()
542 mw_addr = pci_epf_alloc_space(ntb->epf, size, barno, align, 0); in epf_ntb_db_bar_init()
550 epf_bar = &ntb->epf->bar[barno]; in epf_ntb_db_bar_init()
552 ret = pci_epc_set_bar(ntb->epf->epc, ntb->epf->func_no, ntb->epf->vfunc_no, epf_bar); in epf_ntb_db_bar_init()
560 pci_epf_free_space(ntb->epf, mw_addr, barno, 0); in epf_ntb_db_bar_init()
576 pci_epf_free_space(ntb->epf, ntb->epf_db, barno, 0); in epf_ntb_db_bar_clear()
577 pci_epc_clear_bar(ntb->epf->epc, in epf_ntb_db_bar_clear()
578 ntb->epf->func_no, in epf_ntb_db_bar_clear()
579 ntb->epf->vfunc_no, in epf_ntb_db_bar_clear()
580 &ntb->epf->bar[barno]); in epf_ntb_db_bar_clear()
594 struct device *dev = &ntb->epf->dev; in epf_ntb_mw_bar_init()
600 ntb->epf->bar[barno].barno = barno; in epf_ntb_mw_bar_init()
601 ntb->epf->bar[barno].size = size; in epf_ntb_mw_bar_init()
602 ntb->epf->bar[barno].addr = NULL; in epf_ntb_mw_bar_init()
603 ntb->epf->bar[barno].phys_addr = 0; in epf_ntb_mw_bar_init()
604 ntb->epf->bar[barno].flags |= upper_32_bits(size) ? in epf_ntb_mw_bar_init()
608 ret = pci_epc_set_bar(ntb->epf->epc, in epf_ntb_mw_bar_init()
609 ntb->epf->func_no, in epf_ntb_mw_bar_init()
610 ntb->epf->vfunc_no, in epf_ntb_mw_bar_init()
611 &ntb->epf->bar[barno]); in epf_ntb_mw_bar_init()
618 ntb->vpci_mw_addr[i] = pci_epc_mem_alloc_addr(ntb->epf->epc, in epf_ntb_mw_bar_init()
631 pci_epc_clear_bar(ntb->epf->epc, in epf_ntb_mw_bar_init()
632 ntb->epf->func_no, in epf_ntb_mw_bar_init()
633 ntb->epf->vfunc_no, in epf_ntb_mw_bar_init()
634 &ntb->epf->bar[barno]); in epf_ntb_mw_bar_init()
651 pci_epc_clear_bar(ntb->epf->epc, in epf_ntb_mw_bar_clear()
652 ntb->epf->func_no, in epf_ntb_mw_bar_clear()
653 ntb->epf->vfunc_no, in epf_ntb_mw_bar_clear()
654 &ntb->epf->bar[barno]); in epf_ntb_mw_bar_clear()
656 pci_epc_mem_free_addr(ntb->epf->epc, in epf_ntb_mw_bar_clear()
671 pci_epc_remove_epf(ntb->epf->epc, ntb->epf, 0); in epf_ntb_epc_destroy()
672 pci_epc_put(ntb->epf->epc); in epf_ntb_epc_destroy()
691 dev = &ntb->epf->dev; in epf_ntb_init_epc_bar()
692 epc_features = pci_epc_get_features(ntb->epf->epc, ntb->epf->func_no, ntb->epf->vfunc_no); in epf_ntb_init_epc_bar()
729 struct pci_epf *epf; in epf_ntb_epc_init() local
733 epf = ntb->epf; in epf_ntb_epc_init()
734 dev = &epf->dev; in epf_ntb_epc_init()
735 epc = epf->epc; in epf_ntb_epc_init()
736 func_no = ntb->epf->func_no; in epf_ntb_epc_init()
737 vfunc_no = ntb->epf->vfunc_no; in epf_ntb_epc_init()
764 ret = pci_epc_write_header(epc, func_no, vfunc_no, epf->header); in epf_ntb_epc_init()
834 struct device *dev = &ntb->epf->dev; \
854 struct device *dev = &ntb->epf->dev; \
955 static struct config_group *epf_ntb_add_cfs(struct pci_epf *epf, in epf_ntb_add_cfs() argument
958 struct epf_ntb *ntb = epf_get_drvdata(epf); in epf_ntb_add_cfs()
960 struct device *dev = &epf->dev; in epf_ntb_add_cfs()
1061 epf_bar = &ntb->epf->bar[barno]; in vntb_epf_mw_set_trans()
1066 ret = pci_epc_set_bar(ntb->epf->epc, 0, 0, epf_bar); in vntb_epf_mw_set_trans()
1153 func_no = ntb->epf->func_no; in vntb_epf_peer_db_set()
1154 vfunc_no = ntb->epf->vfunc_no; in vntb_epf_peer_db_set()
1156 ret = pci_epc_raise_irq(ntb->epf->epc, in vntb_epf_peer_db_set()
1296 static int epf_ntb_bind(struct pci_epf *epf) in epf_ntb_bind() argument
1298 struct epf_ntb *ntb = epf_get_drvdata(epf); in epf_ntb_bind()
1299 struct device *dev = &epf->dev; in epf_ntb_bind()
1302 if (!epf->epc) { in epf_ntb_bind()
1325 epf_set_drvdata(epf, ntb); in epf_ntb_bind()
1356 static void epf_ntb_unbind(struct pci_epf *epf) in epf_ntb_unbind() argument
1358 struct epf_ntb *ntb = epf_get_drvdata(epf); in epf_ntb_unbind()
1381 static int epf_ntb_probe(struct pci_epf *epf) in epf_ntb_probe() argument
1386 dev = &epf->dev; in epf_ntb_probe()
1392 epf->header = &epf_ntb_header; in epf_ntb_probe()
1393 ntb->epf = epf; in epf_ntb_probe()
1395 epf_set_drvdata(epf, ntb); in epf_ntb_probe()