Lines Matching +full:0 +full:xcf8
18 (0x80000000 | ((reg & 0xF00) << 16) | (bus << 16) \
19 | (devfn << 8) | (reg & 0xFC))
33 outl(PCI_CONF1_ADDRESS(bus, devfn, reg), 0xCF8); in pci_conf1_read()
37 *value = inb(0xCFC + (reg & 3)); in pci_conf1_read()
40 *value = inw(0xCFC + (reg & 2)); in pci_conf1_read()
43 *value = inl(0xCFC); in pci_conf1_read()
49 return 0; in pci_conf1_read()
62 outl(PCI_CONF1_ADDRESS(bus, devfn, reg), 0xCF8); in pci_conf1_write()
66 outb((u8)value, 0xCFC + (reg & 3)); in pci_conf1_write()
69 outw((u16)value, 0xCFC + (reg & 2)); in pci_conf1_write()
72 outl((u32)value, 0xCFC); in pci_conf1_write()
78 return 0; in pci_conf1_write()
93 #define PCI_CONF2_ADDRESS(dev, reg) (u16)(0xC000 | (dev << 8) | reg)
110 if (dev & 0x10) in pci_conf2_read()
115 outb((u8)(0xF0 | (fn << 1)), 0xCF8); in pci_conf2_read()
116 outb((u8)bus, 0xCFA); in pci_conf2_read()
130 outb(0, 0xCF8); in pci_conf2_read()
134 return 0; in pci_conf2_read()
150 if (dev & 0x10) in pci_conf2_write()
155 outb((u8)(0xF0 | (fn << 1)), 0xCF8); in pci_conf2_write()
156 outb((u8)bus, 0xCFA); in pci_conf2_write()
170 outb(0, 0xCF8); in pci_conf2_write()
174 return 0; in pci_conf2_write()
197 u32 x = 0; in pci_sanity_check()
203 This handles machines that don't have anything on PCI Bus 0. */ in pci_sanity_check()
207 for (devfn = 0; devfn < 0x100; devfn++) { in pci_sanity_check()
208 if (o->read(0, 0, devfn, PCI_CLASS_DEVICE, 2, &x)) in pci_sanity_check()
213 if (o->read(0, 0, devfn, PCI_VENDOR_ID, 2, &x)) in pci_sanity_check()
220 return 0; in pci_sanity_check()
227 int works = 0; in pci_check_type1()
231 outb(0x01, 0xCFB); in pci_check_type1()
232 tmp = inl(0xCF8); in pci_check_type1()
233 outl(0x80000000, 0xCF8); in pci_check_type1()
234 if (inl(0xCF8) == 0x80000000 && pci_sanity_check(&pci_direct_conf1)) { in pci_check_type1()
237 outl(tmp, 0xCF8); in pci_check_type1()
246 int works = 0; in pci_check_type2()
250 outb(0x00, 0xCFB); in pci_check_type2()
251 outb(0x00, 0xCF8); in pci_check_type2()
252 outb(0x00, 0xCFA); in pci_check_type2()
253 if (inb(0xCF8) == 0x00 && inb(0xCFA) == 0x00 && in pci_check_type2()
265 if (type == 0) in pci_direct_init()
285 if ((pci_probe & PCI_PROBE_CONF1) == 0) in pci_direct_probe()
287 if (!request_region(0xCF8, 8, "PCI conf1")) in pci_direct_probe()
295 release_region(0xCF8, 8); in pci_direct_probe()
298 if ((pci_probe & PCI_PROBE_CONF2) == 0) in pci_direct_probe()
299 return 0; in pci_direct_probe()
300 if (!request_region(0xCF8, 4, "PCI conf2")) in pci_direct_probe()
301 return 0; in pci_direct_probe()
302 if (!request_region(0xC000, 0x1000, "PCI conf2")) in pci_direct_probe()
311 release_region(0xC000, 0x1000); in pci_direct_probe()
313 release_region(0xCF8, 4); in pci_direct_probe()
314 return 0; in pci_direct_probe()