• Home
  • Raw
  • Download

Lines Matching refs:pirq

45 	int (*get)(struct pci_dev *router, struct pci_dev *dev, int pirq);
46 int (*set)(struct pci_dev *router, struct pci_dev *dev, int pirq,
202 static int pirq_ali_get(struct pci_dev *router, struct pci_dev *dev, int pirq) in pirq_ali_get() argument
206 WARN_ON_ONCE(pirq > 16); in pirq_ali_get()
207 return irqmap[read_config_nybble(router, 0x48, pirq-1)]; in pirq_ali_get()
210 static int pirq_ali_set(struct pci_dev *router, struct pci_dev *dev, int pirq, int irq) in pirq_ali_set() argument
215 WARN_ON_ONCE(pirq > 16); in pirq_ali_set()
217 write_config_nybble(router, 0x48, pirq-1, val); in pirq_ali_set()
227 static int pirq_piix_get(struct pci_dev *router, struct pci_dev *dev, int pirq) in pirq_piix_get() argument
231 pci_read_config_byte(router, pirq, &x); in pirq_piix_get()
235 static int pirq_piix_set(struct pci_dev *router, struct pci_dev *dev, int pirq, int irq) in pirq_piix_set() argument
237 pci_write_config_byte(router, pirq, irq); in pirq_piix_set()
246 static int pirq_via_get(struct pci_dev *router, struct pci_dev *dev, int pirq) in pirq_via_get() argument
248 return read_config_nybble(router, 0x55, pirq == 4 ? 5 : pirq); in pirq_via_get()
251 static int pirq_via_set(struct pci_dev *router, struct pci_dev *dev, int pirq, int irq) in pirq_via_set() argument
253 write_config_nybble(router, 0x55, pirq == 4 ? 5 : pirq, irq); in pirq_via_set()
262 static int pirq_via586_get(struct pci_dev *router, struct pci_dev *dev, int pirq) in pirq_via586_get() argument
266 WARN_ON_ONCE(pirq > 5); in pirq_via586_get()
267 return read_config_nybble(router, 0x55, pirqmap[pirq-1]); in pirq_via586_get()
270 static int pirq_via586_set(struct pci_dev *router, struct pci_dev *dev, int pirq, int irq) in pirq_via586_set() argument
274 WARN_ON_ONCE(pirq > 5); in pirq_via586_set()
275 write_config_nybble(router, 0x55, pirqmap[pirq-1], irq); in pirq_via586_set()
284 static int pirq_ite_get(struct pci_dev *router, struct pci_dev *dev, int pirq) in pirq_ite_get() argument
288 WARN_ON_ONCE(pirq > 4); in pirq_ite_get()
289 return read_config_nybble(router, 0x43, pirqmap[pirq-1]); in pirq_ite_get()
292 static int pirq_ite_set(struct pci_dev *router, struct pci_dev *dev, int pirq, int irq) in pirq_ite_set() argument
296 WARN_ON_ONCE(pirq > 4); in pirq_ite_set()
297 write_config_nybble(router, 0x43, pirqmap[pirq-1], irq); in pirq_ite_set()
305 static int pirq_opti_get(struct pci_dev *router, struct pci_dev *dev, int pirq) in pirq_opti_get() argument
307 return read_config_nybble(router, 0xb8, pirq >> 4); in pirq_opti_get()
310 static int pirq_opti_set(struct pci_dev *router, struct pci_dev *dev, int pirq, int irq) in pirq_opti_set() argument
312 write_config_nybble(router, 0xb8, pirq >> 4, irq); in pirq_opti_set()
321 static int pirq_cyrix_get(struct pci_dev *router, struct pci_dev *dev, int pirq) in pirq_cyrix_get() argument
323 return read_config_nybble(router, 0x5C, (pirq-1)^1); in pirq_cyrix_get()
326 static int pirq_cyrix_set(struct pci_dev *router, struct pci_dev *dev, int pirq, int irq) in pirq_cyrix_set() argument
328 write_config_nybble(router, 0x5C, (pirq-1)^1, irq); in pirq_cyrix_set()
397 static int pirq_sis_get(struct pci_dev *router, struct pci_dev *dev, int pirq) in pirq_sis_get() argument
402 reg = pirq; in pirq_sis_get()
409 static int pirq_sis_set(struct pci_dev *router, struct pci_dev *dev, int pirq, int irq) in pirq_sis_set() argument
414 reg = pirq; in pirq_sis_set()
433 static int pirq_vlsi_get(struct pci_dev *router, struct pci_dev *dev, int pirq) in pirq_vlsi_get() argument
435 WARN_ON_ONCE(pirq >= 9); in pirq_vlsi_get()
436 if (pirq > 8) { in pirq_vlsi_get()
437 dev_info(&dev->dev, "VLSI router PIRQ escape (%d)\n", pirq); in pirq_vlsi_get()
440 return read_config_nybble(router, 0x74, pirq-1); in pirq_vlsi_get()
443 static int pirq_vlsi_set(struct pci_dev *router, struct pci_dev *dev, int pirq, int irq) in pirq_vlsi_set() argument
445 WARN_ON_ONCE(pirq >= 9); in pirq_vlsi_set()
446 if (pirq > 8) { in pirq_vlsi_set()
447 dev_info(&dev->dev, "VLSI router PIRQ escape (%d)\n", pirq); in pirq_vlsi_set()
450 write_config_nybble(router, 0x74, pirq-1, irq); in pirq_vlsi_set()
465 static int pirq_serverworks_get(struct pci_dev *router, struct pci_dev *dev, int pirq) in pirq_serverworks_get() argument
467 outb(pirq, 0xc00); in pirq_serverworks_get()
472 int pirq, int irq) in pirq_serverworks_set()
474 outb(pirq, 0xc00); in pirq_serverworks_set()
487 static int pirq_amd756_get(struct pci_dev *router, struct pci_dev *dev, int pirq) in pirq_amd756_get() argument
491 if (pirq <= 4) in pirq_amd756_get()
492 irq = read_config_nybble(router, 0x56, pirq - 1); in pirq_amd756_get()
495 dev->vendor, dev->device, pirq, irq); in pirq_amd756_get()
499 static int pirq_amd756_set(struct pci_dev *router, struct pci_dev *dev, int pirq, int irq) in pirq_amd756_set() argument
503 dev->vendor, dev->device, pirq, irq); in pirq_amd756_set()
504 if (pirq <= 4) in pirq_amd756_set()
505 write_config_nybble(router, 0x56, pirq - 1, irq); in pirq_amd756_set()
512 static int pirq_pico_get(struct pci_dev *router, struct pci_dev *dev, int pirq) in pirq_pico_get() argument
514 outb(0x10 + ((pirq - 1) >> 1), 0x24); in pirq_pico_get()
515 return ((pirq - 1) & 1) ? (inb(0x26) >> 4) : (inb(0x26) & 0xf); in pirq_pico_get()
518 static int pirq_pico_set(struct pci_dev *router, struct pci_dev *dev, int pirq, in pirq_pico_set() argument
522 outb(0x10 + ((pirq - 1) >> 1), 0x24); in pirq_pico_set()
524 x = ((pirq - 1) & 1) ? ((x & 0x0f) | (irq << 4)) : ((x & 0xf0) | (irq)); in pirq_pico_set()
531 static int pirq_bios_set(struct pci_dev *router, struct pci_dev *dev, int pirq, int irq) in pirq_bios_set() argument
885 int i, pirq, newirq; in pcibios_lookup_irq() local
913 pirq = info->irq[pin - 1].link; in pcibios_lookup_irq()
915 if (!pirq) { in pcibios_lookup_irq()
920 'A' + pin - 1, pirq, mask, pirq_table->exclusive_irqs); in pcibios_lookup_irq()
926 if (broken_hp_bios_irq9 && pirq == 0x59 && dev->irq == 9) { in pcibios_lookup_irq()
929 r->set(pirq_router_dev, dev, pirq, 11); in pcibios_lookup_irq()
935 pirq = 0x68; in pcibios_lookup_irq()
937 dev->irq = r->get(pirq_router_dev, dev, pirq); in pcibios_lookup_irq()
965 if ((pirq & 0xf0) == 0xf0) { in pcibios_lookup_irq()
966 irq = pirq & 0xf; in pcibios_lookup_irq()
968 } else if (r->get && (irq = r->get(pirq_router_dev, dev, pirq)) && \ in pcibios_lookup_irq()
974 if (r->set(pirq_router_dev, dev, pirq, newirq)) { in pcibios_lookup_irq()
1001 if (info->irq[pin - 1].link == pirq) { in pcibios_lookup_irq()