Lines Matching refs:fn
18 static int cdns_write_header(struct udevice *dev, uint fn, in cdns_write_header() argument
23 cdns_pcie_ep_fn_writew(pcie, fn, PCI_DEVICE_ID, hdr->deviceid); in cdns_write_header()
24 cdns_pcie_ep_fn_writeb(pcie, fn, PCI_REVISION_ID, hdr->revid); in cdns_write_header()
25 cdns_pcie_ep_fn_writeb(pcie, fn, PCI_CLASS_PROG, in cdns_write_header()
27 cdns_pcie_ep_fn_writew(pcie, fn, PCI_CLASS_DEVICE, in cdns_write_header()
30 cdns_pcie_ep_fn_writeb(pcie, fn, PCI_CACHE_LINE_SIZE, in cdns_write_header()
32 cdns_pcie_ep_fn_writew(pcie, fn, PCI_SUBSYSTEM_ID, in cdns_write_header()
34 cdns_pcie_ep_fn_writeb(pcie, fn, PCI_INTERRUPT_PIN, in cdns_write_header()
41 if (fn == 0) { in cdns_write_header()
52 static int cdns_set_bar(struct udevice *dev, uint fn, struct pci_bar *ep_bar) in cdns_set_bar() argument
95 cdns_pcie_writel(pcie, CDNS_PCIE_AT_IB_EP_FUNC_BAR_ADDR0(fn, bar), in cdns_set_bar()
97 cdns_pcie_writel(pcie, CDNS_PCIE_AT_IB_EP_FUNC_BAR_ADDR1(fn, bar), in cdns_set_bar()
101 reg = CDNS_PCIE_LM_EP_FUNC_BAR_CFG0(fn); in cdns_set_bar()
104 reg = CDNS_PCIE_LM_EP_FUNC_BAR_CFG1(fn); in cdns_set_bar()
118 static int cdns_set_msi(struct udevice *dev, uint fn, uint mmc) in cdns_set_msi() argument
129 flags = cdns_pcie_ep_fn_readw(pcie, fn, cap + PCI_MSI_FLAGS); in cdns_set_msi()
133 cdns_pcie_ep_fn_writew(pcie, fn, cap + PCI_MSI_FLAGS, flags); in cdns_set_msi()