Lines Matching refs:pci_sys_x86
283 pci_system_x86_check(struct pci_system_x86 *pci_sys_x86) in pci_system_x86_check() argument
292 if (pci_sys_x86->read(0, dev, 0, PCI_CLASS_DEVICE, &class, sizeof(class))) in pci_system_x86_check()
296 if (pci_sys_x86->read(0, dev, 0, PCI_VENDOR_ID, &vendor, sizeof(vendor))) in pci_system_x86_check()
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()
499 struct pci_system_x86 *pci_sys_x86 = (struct pci_system_x86 *) pci_sys; in pci_device_x86_read() local
508 err = pci_sys_x86->read(dev->bus, dev->dev, dev->func, offset, data, toread); in pci_device_x86_read()
524 struct pci_system_x86 *pci_sys_x86 = (struct pci_system_x86 *) pci_sys; in pci_device_x86_write() local
535 err = pci_sys_x86->write(dev->bus, dev->dev, dev->func, offset, data, towrite); in pci_device_x86_write()
564 static int pci_probe(struct pci_system_x86 *pci_sys_x86) in pci_probe() argument
567 pci_sys_x86->read = pci_system_x86_conf1_read; in pci_probe()
568 pci_sys_x86->write = pci_system_x86_conf1_write; in pci_probe()
569 if (pci_system_x86_check(pci_sys_x86) == 0) in pci_probe()
574 pci_sys_x86->read = pci_system_x86_conf2_read; in pci_probe()
575 pci_sys_x86->write = pci_system_x86_conf2_write; in pci_probe()
576 if (pci_system_x86_check(pci_sys_x86) == 0) in pci_probe()
588 struct pci_system_x86 *pci_sys_x86; in pci_system_x86_create() local
595 pci_sys_x86 = calloc(1, sizeof(struct pci_system_x86)); in pci_system_x86_create()
596 if (pci_sys_x86 == NULL) { in pci_system_x86_create()
600 pci_sys = &pci_sys_x86->system; in pci_system_x86_create()
602 ret = pci_probe(pci_sys_x86); in pci_system_x86_create()
605 free(pci_sys_x86); 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, ®, sizeof(reg)) != 0) in pci_system_x86_create()
631 free(pci_sys_x86); 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, ®, sizeof(reg)) != 0) in pci_system_x86_create()
653 if (pci_sys_x86->read(bus, dev, func, PCI_CLASS, ®, sizeof(reg)) != 0) in pci_system_x86_create()
658 if (pci_sys_x86->read(bus, dev, func, PCI_SUB_VENDOR_ID, ®, sizeof(reg)) != 0) in pci_system_x86_create()