Lines Matching refs:slot

91 static uint32_t	pci_docfgregread(int bus, int slot, int func, int reg,
93 static int pcireg_cfgread(int bus, int slot, int func, int reg, int bytes);
94 static void pcireg_cfgwrite(int bus, int slot, int func, int reg, int data, int bytes);
96 static int pciereg_cfgread(int bus, unsigned slot, unsigned func,
98 static void pciereg_cfgwrite(int bus, unsigned slot, unsigned func,
200 pci_docfgregread(int bus, int slot, int func, int reg, int bytes)
205 (bus != 0 || !(1 << slot & pcie_badslots)))
206 return (pciereg_cfgread(bus, slot, func, reg, bytes));
208 return (pcireg_cfgread(bus, slot, func, reg, bytes));
215 pci_cfgregread(int bus, int slot, int func, int reg, int bytes)
225 line = pci_docfgregread(bus, slot, func, PCIR_INTLINE, 1);
228 return (pci_docfgregread(bus, slot, func, reg, bytes));
235 pci_cfgregwrite(int bus, int slot, int func, int reg, u_int32_t data, int bytes)
240 (bus != 0 || !(1 << slot & pcie_badslots)))
241 pciereg_cfgwrite(bus, slot, func, reg, data, bytes);
243 pcireg_cfgwrite(bus, slot, func, reg, data, bytes);
252 pci_cfgenable(unsigned bus, unsigned slot, unsigned func, int reg, int bytes)
269 if (bus == 0 && slot == 0 && (func == 1 || func == 2))
277 if (bus == 1 && (slot != 0 || func != 0))
290 && slot < devmax
300 | (bus << 16) | (slot << 11)
307 dataport = 0xc000 | (slot << 8) | reg;
335 pcireg_cfgread(int bus, int slot, int func, int reg, int bytes)
341 port = pci_cfgenable(bus, slot, func, reg, bytes);
361 pcireg_cfgwrite(int bus, int slot, int func, int reg, int data, int bytes)
366 port = pci_cfgenable(bus, slot, func, reg, bytes);
522 int i, slot;
587 for (slot = 0; slot <= PCI_SLOTMAX; slot++) {
588 val1 = pcireg_cfgread(0, slot, 0, 0, 4);
592 val2 = pciereg_cfgread(0, slot, 0, 0, 4);
594 pcie_badslots |= (1 << slot);
601 #define PCIE_PADDR(base, reg, bus, slot, func) \
604 (((slot) & 0x1f) << 15) | \
609 pciereg_findaddr(int bus, unsigned slot, unsigned func, unsigned reg)
615 pa = PCIE_PADDR(pcie_base, reg, bus, slot, func);
656 pciereg_cfgread(int bus, unsigned slot, unsigned func, unsigned reg,
662 if (bus < pcie_minbus || bus > pcie_maxbus || slot > PCI_SLOTMAX ||
667 va = pciereg_findaddr(bus, slot, func, reg);
689 pciereg_cfgwrite(int bus, unsigned slot, unsigned func, unsigned reg, int data,
694 if (bus < pcie_minbus || bus > pcie_maxbus || slot > PCI_SLOTMAX ||
699 va = pciereg_findaddr(bus, slot, func, reg);