Lines Matching refs:bus

105 …  int (*read)(unsigned bus, unsigned dev, unsigned func, pciaddr_t reg, void *data, unsigned size);
106 …int (*write)(unsigned bus, unsigned dev, unsigned func, pciaddr_t reg, const void *data, unsigned …
126 pci_system_x86_conf1_read(unsigned bus, unsigned dev, unsigned func, pciaddr_t reg, void *data, uns… in pci_system_x86_conf1_read() argument
132 if (bus >= 0x100 || dev >= 32 || func >= 8 || reg >= 0x100 || size > 4 || size == 3) in pci_system_x86_conf1_read()
136 outl(0x80000000 | (bus << 16) | (dev << 11) | (func << 8) | (reg & ~3), 0xCF8); in pci_system_x86_conf1_read()
161 pci_system_x86_conf1_write(unsigned bus, unsigned dev, unsigned func, pciaddr_t reg, const void *da… in pci_system_x86_conf1_write() argument
167 if (bus >= 0x100 || dev >= 32 || func >= 8 || reg >= 0x100 || size > 4 || size == 3) in pci_system_x86_conf1_write()
171 outl(0x80000000 | (bus << 16) | (dev << 11) | (func << 8) | (reg & ~3), 0xCF8); in pci_system_x86_conf1_write()
208 pci_system_x86_conf2_read(unsigned bus, unsigned dev, unsigned func, pciaddr_t reg, void *data, uns… in pci_system_x86_conf2_read() argument
213 if (bus >= 0x100 || dev >= 16 || func >= 8 || reg >= 0x100) in pci_system_x86_conf2_read()
217 outb(bus, 0xCFA); in pci_system_x86_conf2_read()
245 pci_system_x86_conf2_write(unsigned bus, unsigned dev, unsigned func, pciaddr_t reg, const void *da… in pci_system_x86_conf2_write() argument
250 if (bus >= 0x100 || dev >= 16 || func >= 8 || reg >= 0x100) in pci_system_x86_conf2_write()
254 outb(bus, 0xCFA); in pci_system_x86_conf2_write()
306 pci_nfuncs(struct pci_system_x86 *pci_sys_x86, int bus, int dev) in pci_nfuncs() argument
311 err = pci_sys_x86->read(bus, dev, 0, PCI_HDRTYPE, &hdr, sizeof(hdr)); in pci_nfuncs()
508 err = pci_sys_x86->read(dev->bus, dev->dev, dev->func, offset, data, toread); in pci_device_x86_read()
535 err = pci_sys_x86->write(dev->bus, dev->dev, dev->func, offset, data, towrite); in pci_device_x86_write()
587 int ret, bus, dev, ndevs, func, nfuncs; in pci_system_x86_create() local
613 for (bus = 0; bus < 256; bus++) { in pci_system_x86_create()
615 nfuncs = pci_nfuncs(pci_sys_x86, bus, dev); in pci_system_x86_create()
617 if (pci_sys_x86->read(bus, dev, func, PCI_VENDOR_ID, &reg, sizeof(reg)) != 0) in pci_system_x86_create()
637 for (bus = 0; bus < 256; bus++) { in pci_system_x86_create()
639 nfuncs = pci_nfuncs(pci_sys_x86, bus, dev); in pci_system_x86_create()
641 if (pci_sys_x86->read(bus, dev, func, PCI_VENDOR_ID, &reg, sizeof(reg)) != 0) in pci_system_x86_create()
647 device->base.bus = bus; in pci_system_x86_create()
653 if (pci_sys_x86->read(bus, dev, func, PCI_CLASS, &reg, sizeof(reg)) != 0) in pci_system_x86_create()
658 if (pci_sys_x86->read(bus, dev, func, PCI_SUB_VENDOR_ID, &reg, sizeof(reg)) != 0) in pci_system_x86_create()