• Home
  • Raw
  • Download

Lines Matching refs:pirq

47 	int (*get)(struct pci_dev *router, struct pci_dev *dev, int pirq);
48 int (*set)(struct pci_dev *router, struct pci_dev *dev, int pirq,
201 static int pirq_ali_get(struct pci_dev *router, struct pci_dev *dev, int pirq) in pirq_ali_get() argument
205 WARN_ON_ONCE(pirq > 16); in pirq_ali_get()
206 return irqmap[read_config_nybble(router, 0x48, pirq-1)]; in pirq_ali_get()
209 static int pirq_ali_set(struct pci_dev *router, struct pci_dev *dev, int pirq, int irq) in pirq_ali_set() argument
214 WARN_ON_ONCE(pirq > 16); in pirq_ali_set()
216 write_config_nybble(router, 0x48, pirq-1, val); in pirq_ali_set()
226 static int pirq_piix_get(struct pci_dev *router, struct pci_dev *dev, int pirq) in pirq_piix_get() argument
230 pci_read_config_byte(router, pirq, &x); in pirq_piix_get()
234 static int pirq_piix_set(struct pci_dev *router, struct pci_dev *dev, int pirq, int irq) in pirq_piix_set() argument
236 pci_write_config_byte(router, pirq, irq); in pirq_piix_set()
245 static int pirq_via_get(struct pci_dev *router, struct pci_dev *dev, int pirq) in pirq_via_get() argument
247 return read_config_nybble(router, 0x55, pirq == 4 ? 5 : pirq); in pirq_via_get()
250 static int pirq_via_set(struct pci_dev *router, struct pci_dev *dev, int pirq, int irq) in pirq_via_set() argument
252 write_config_nybble(router, 0x55, pirq == 4 ? 5 : pirq, irq); in pirq_via_set()
261 static int pirq_via586_get(struct pci_dev *router, struct pci_dev *dev, int pirq) in pirq_via586_get() argument
265 WARN_ON_ONCE(pirq > 5); in pirq_via586_get()
266 return read_config_nybble(router, 0x55, pirqmap[pirq-1]); in pirq_via586_get()
269 static int pirq_via586_set(struct pci_dev *router, struct pci_dev *dev, int pirq, int irq) in pirq_via586_set() argument
273 WARN_ON_ONCE(pirq > 5); in pirq_via586_set()
274 write_config_nybble(router, 0x55, pirqmap[pirq-1], irq); in pirq_via586_set()
283 static int pirq_ite_get(struct pci_dev *router, struct pci_dev *dev, int pirq) in pirq_ite_get() argument
287 WARN_ON_ONCE(pirq > 4); in pirq_ite_get()
288 return read_config_nybble(router, 0x43, pirqmap[pirq-1]); in pirq_ite_get()
291 static int pirq_ite_set(struct pci_dev *router, struct pci_dev *dev, int pirq, int irq) in pirq_ite_set() argument
295 WARN_ON_ONCE(pirq > 4); in pirq_ite_set()
296 write_config_nybble(router, 0x43, pirqmap[pirq-1], irq); in pirq_ite_set()
304 static int pirq_opti_get(struct pci_dev *router, struct pci_dev *dev, int pirq) in pirq_opti_get() argument
306 return read_config_nybble(router, 0xb8, pirq >> 4); in pirq_opti_get()
309 static int pirq_opti_set(struct pci_dev *router, struct pci_dev *dev, int pirq, int irq) in pirq_opti_set() argument
311 write_config_nybble(router, 0xb8, pirq >> 4, irq); in pirq_opti_set()
320 static int pirq_cyrix_get(struct pci_dev *router, struct pci_dev *dev, int pirq) in pirq_cyrix_get() argument
322 return read_config_nybble(router, 0x5C, (pirq-1)^1); in pirq_cyrix_get()
325 static int pirq_cyrix_set(struct pci_dev *router, struct pci_dev *dev, int pirq, int irq) in pirq_cyrix_set() argument
327 write_config_nybble(router, 0x5C, (pirq-1)^1, irq); in pirq_cyrix_set()
396 static int pirq_sis_get(struct pci_dev *router, struct pci_dev *dev, int pirq) in pirq_sis_get() argument
401 reg = pirq; in pirq_sis_get()
408 static int pirq_sis_set(struct pci_dev *router, struct pci_dev *dev, int pirq, int irq) in pirq_sis_set() argument
413 reg = pirq; in pirq_sis_set()
432 static int pirq_vlsi_get(struct pci_dev *router, struct pci_dev *dev, int pirq) in pirq_vlsi_get() argument
434 WARN_ON_ONCE(pirq >= 9); in pirq_vlsi_get()
435 if (pirq > 8) { in pirq_vlsi_get()
436 dev_info(&dev->dev, "VLSI router PIRQ escape (%d)\n", pirq); in pirq_vlsi_get()
439 return read_config_nybble(router, 0x74, pirq-1); in pirq_vlsi_get()
442 static int pirq_vlsi_set(struct pci_dev *router, struct pci_dev *dev, int pirq, int irq) in pirq_vlsi_set() argument
444 WARN_ON_ONCE(pirq >= 9); in pirq_vlsi_set()
445 if (pirq > 8) { in pirq_vlsi_set()
446 dev_info(&dev->dev, "VLSI router PIRQ escape (%d)\n", pirq); in pirq_vlsi_set()
449 write_config_nybble(router, 0x74, pirq-1, irq); in pirq_vlsi_set()
464 static int pirq_serverworks_get(struct pci_dev *router, struct pci_dev *dev, int pirq) in pirq_serverworks_get() argument
466 outb(pirq, 0xc00); in pirq_serverworks_get()
471 int pirq, int irq) in pirq_serverworks_set()
473 outb(pirq, 0xc00); in pirq_serverworks_set()
486 static int pirq_amd756_get(struct pci_dev *router, struct pci_dev *dev, int pirq) in pirq_amd756_get() argument
490 if (pirq <= 4) in pirq_amd756_get()
491 irq = read_config_nybble(router, 0x56, pirq - 1); in pirq_amd756_get()
494 dev->vendor, dev->device, pirq, irq); in pirq_amd756_get()
498 static int pirq_amd756_set(struct pci_dev *router, struct pci_dev *dev, int pirq, int irq) in pirq_amd756_set() argument
502 dev->vendor, dev->device, pirq, irq); in pirq_amd756_set()
503 if (pirq <= 4) in pirq_amd756_set()
504 write_config_nybble(router, 0x56, pirq - 1, irq); in pirq_amd756_set()
511 static int pirq_pico_get(struct pci_dev *router, struct pci_dev *dev, int pirq) in pirq_pico_get() argument
513 outb(0x10 + ((pirq - 1) >> 1), 0x24); in pirq_pico_get()
514 return ((pirq - 1) & 1) ? (inb(0x26) >> 4) : (inb(0x26) & 0xf); in pirq_pico_get()
517 static int pirq_pico_set(struct pci_dev *router, struct pci_dev *dev, int pirq, in pirq_pico_set() argument
521 outb(0x10 + ((pirq - 1) >> 1), 0x24); in pirq_pico_set()
523 x = ((pirq - 1) & 1) ? ((x & 0x0f) | (irq << 4)) : ((x & 0xf0) | (irq)); in pirq_pico_set()
530 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()