Lines Matching refs:slot
86 static uint32_t pci_docfgregread(int domain, int bus, int slot, int func,
89 static int pcireg_cfgread(int bus, int slot, int func, int reg, int bytes);
90 static void pcireg_cfgwrite(int bus, int slot, int func, int reg, int data, int bytes);
93 unsigned slot, unsigned func, unsigned reg, unsigned bytes);
95 unsigned slot, unsigned func, unsigned reg, int data,
175 pci_docfgregread(int domain, int bus, int slot, int func, int reg, int bytes) in pci_docfgregread() argument
177 if (domain == 0 && bus == 0 && (1 << slot & pcie_badslots) != 0) in pci_docfgregread()
178 return (pcireg_cfgread(bus, slot, func, reg, bytes)); in pci_docfgregread()
185 return (pciereg_cfgread(region, bus, slot, func, reg, in pci_docfgregread()
190 return (pcireg_cfgread(bus, slot, func, reg, bytes)); in pci_docfgregread()
199 pci_cfgregread(int domain, int bus, int slot, int func, int reg, int bytes) in pci_cfgregread() argument
209 line = pci_docfgregread(domain, bus, slot, func, PCIR_INTLINE, in pci_cfgregread()
213 return (pci_docfgregread(domain, bus, slot, func, reg, bytes)); in pci_cfgregread()
220 pci_cfgregwrite(int domain, int bus, int slot, int func, int reg, uint32_t data, in pci_cfgregwrite() argument
223 if (domain == 0 && bus == 0 && (1 << slot & pcie_badslots) != 0) { in pci_cfgregwrite()
224 pcireg_cfgwrite(bus, slot, func, reg, data, bytes); in pci_cfgregwrite()
233 pciereg_cfgwrite(region, bus, slot, func, reg, data, in pci_cfgregwrite()
240 pcireg_cfgwrite(bus, slot, func, reg, data, bytes); in pci_cfgregwrite()
249 pci_cfgenable(unsigned bus, unsigned slot, unsigned func, int reg, int bytes) in pci_cfgenable() argument
254 && slot < devmax in pci_cfgenable()
264 | (bus << 16) | (slot << 11) in pci_cfgenable()
271 dataport = 0xc000 | (slot << 8) | reg; in pci_cfgenable()
299 pcireg_cfgread(int bus, int slot, int func, int reg, int bytes) in pcireg_cfgread() argument
305 port = pci_cfgenable(bus, slot, func, reg, bytes); in pcireg_cfgread()
325 pcireg_cfgwrite(int bus, int slot, int func, int reg, int data, int bytes) in pcireg_cfgwrite() argument
330 port = pci_cfgenable(bus, slot, func, reg, bytes); in pcireg_cfgwrite()
521 int slot; in pcie_init_badslots() local
530 for (slot = 0; slot <= PCI_SLOTMAX; slot++) { in pcie_init_badslots()
531 val1 = pcireg_cfgread(0, slot, 0, 0, 4); in pcie_init_badslots()
535 val2 = pciereg_cfgread(region, 0, slot, 0, 0, 4); in pcie_init_badslots()
537 pcie_badslots |= (1 << slot); in pcie_init_badslots()
592 #define PCIE_PADDR(base, reg, bus, slot, func) \ argument
595 (((slot) & 0x1f) << 15) | \
600 pciereg_findaddr(struct pcie_mcfg_region *region, int bus, unsigned slot, in pciereg_findaddr() argument
609 pa = PCIE_PADDR(region->base, reg, bus - region->minbus, slot, func); in pciereg_findaddr()
650 pciereg_cfgread(struct pcie_mcfg_region *region, int bus, unsigned slot, in pciereg_cfgread() argument
656 if (slot > PCI_SLOTMAX || func > PCI_FUNCMAX || reg > PCIE_REGMAX) in pciereg_cfgread()
660 va = pciereg_findaddr(region, bus, slot, func, reg); in pciereg_cfgread()
682 pciereg_cfgwrite(struct pcie_mcfg_region *region, int bus, unsigned slot, in pciereg_cfgwrite() argument
687 if (slot > PCI_SLOTMAX || func > PCI_FUNCMAX || reg > PCIE_REGMAX) in pciereg_cfgwrite()
691 va = pciereg_findaddr(region, bus, slot, func, reg); in pciereg_cfgwrite()