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, int new);
164 static int pirq_ali_get(struct pci_dev *router, struct pci_dev *dev, int pirq) in pirq_ali_get() argument
168 return irqmap[read_config_nybble(router, 0x48, pirq-1)]; in pirq_ali_get()
171 static int pirq_ali_set(struct pci_dev *router, struct pci_dev *dev, int pirq, int irq) in pirq_ali_set() argument
177 write_config_nybble(router, 0x48, pirq-1, val); in pirq_ali_set()
187 static int pirq_piix_get(struct pci_dev *router, struct pci_dev *dev, int pirq) in pirq_piix_get() argument
191 pci_read_config_byte(router, pirq, &x); in pirq_piix_get()
195 static int pirq_piix_set(struct pci_dev *router, struct pci_dev *dev, int pirq, int irq) in pirq_piix_set() argument
197 pci_write_config_byte(router, pirq, irq); in pirq_piix_set()
206 static int pirq_via_get(struct pci_dev *router, struct pci_dev *dev, int pirq) in pirq_via_get() argument
208 return read_config_nybble(router, 0x55, pirq == 4 ? 5 : pirq); in pirq_via_get()
211 static int pirq_via_set(struct pci_dev *router, struct pci_dev *dev, int pirq, int irq) in pirq_via_set() argument
213 write_config_nybble(router, 0x55, pirq == 4 ? 5 : pirq, irq); in pirq_via_set()
222 static int pirq_via586_get(struct pci_dev *router, struct pci_dev *dev, int pirq) in pirq_via586_get() argument
225 return read_config_nybble(router, 0x55, pirqmap[pirq-1]); in pirq_via586_get()
228 static int pirq_via586_set(struct pci_dev *router, struct pci_dev *dev, int pirq, int irq) in pirq_via586_set() argument
231 write_config_nybble(router, 0x55, pirqmap[pirq-1], irq); in pirq_via586_set()
240 static int pirq_ite_get(struct pci_dev *router, struct pci_dev *dev, int pirq) in pirq_ite_get() argument
243 return read_config_nybble(router,0x43, pirqmap[pirq-1]); in pirq_ite_get()
246 static int pirq_ite_set(struct pci_dev *router, struct pci_dev *dev, int pirq, int irq) in pirq_ite_set() argument
249 write_config_nybble(router, 0x43, pirqmap[pirq-1], irq); in pirq_ite_set()
257 static int pirq_opti_get(struct pci_dev *router, struct pci_dev *dev, int pirq) in pirq_opti_get() argument
259 return read_config_nybble(router, 0xb8, pirq >> 4); in pirq_opti_get()
262 static int pirq_opti_set(struct pci_dev *router, struct pci_dev *dev, int pirq, int irq) in pirq_opti_set() argument
264 write_config_nybble(router, 0xb8, pirq >> 4, irq); in pirq_opti_set()
273 static int pirq_viper_get(struct pci_dev *router, struct pci_dev *dev, int pirq) in pirq_viper_get() argument
279 irq >>= (pirq-1)*3; in pirq_viper_get()
285 static int pirq_viper_set(struct pci_dev *router, struct pci_dev *dev, int pirq, int irq) in pirq_viper_set() argument
290 u32 mask = 7 << (3*(pirq-1)); in pirq_viper_set()
292 mask |= 0x10000UL << (pirq-1); /* edge triggered */ in pirq_viper_set()
300 val |= newval << (3*(pirq-1)); in pirq_viper_set()
309 static int pirq_cyrix_get(struct pci_dev *router, struct pci_dev *dev, int pirq) in pirq_cyrix_get() argument
311 return read_config_nybble(router, 0x5C, (pirq-1)^1); in pirq_cyrix_get()
314 static int pirq_cyrix_set(struct pci_dev *router, struct pci_dev *dev, int pirq, int irq) in pirq_cyrix_set() argument
316 write_config_nybble(router, 0x5C, (pirq-1)^1, irq); in pirq_cyrix_set()
391 static inline int pirq_sis5595_onchip(int pirq, int *reg) in pirq_sis5595_onchip() argument
395 *reg = pirq; in pirq_sis5595_onchip()
396 switch(pirq) { in pirq_sis5595_onchip()
417 (unsigned) pirq); in pirq_sis5595_onchip()
421 (unsigned) pirq); in pirq_sis5595_onchip()
432 static inline int pirq_sis96x_onchip(int pirq, int *reg) in pirq_sis96x_onchip() argument
436 *reg = pirq; in pirq_sis96x_onchip()
437 switch(pirq) { in pirq_sis96x_onchip()
456 (unsigned) pirq); in pirq_sis96x_onchip()
463 static int pirq_sis5595_get(struct pci_dev *router, struct pci_dev *dev, int pirq) in pirq_sis5595_get() argument
468 check = pirq_sis5595_onchip(pirq, ®); in pirq_sis5595_get()
479 static int pirq_sis96x_get(struct pci_dev *router, struct pci_dev *dev, int pirq) in pirq_sis96x_get() argument
484 check = pirq_sis96x_onchip(pirq, ®); in pirq_sis96x_get()
495 static int pirq_sis5595_set(struct pci_dev *router, struct pci_dev *dev, int pirq, int irq) in pirq_sis5595_set() argument
500 set = pirq_sis5595_onchip(pirq, ®); in pirq_sis5595_set()
515 static int pirq_sis96x_set(struct pci_dev *router, struct pci_dev *dev, int pirq, int irq) in pirq_sis96x_set() argument
520 set = pirq_sis96x_onchip(pirq, ®); in pirq_sis96x_set()
544 static int pirq_vlsi_get(struct pci_dev *router, struct pci_dev *dev, int pirq) in pirq_vlsi_get() argument
546 if (pirq > 8) { in pirq_vlsi_get()
547 printk(KERN_INFO "VLSI router pirq escape (%d)\n", pirq); in pirq_vlsi_get()
550 return read_config_nybble(router, 0x74, pirq-1); in pirq_vlsi_get()
553 static int pirq_vlsi_set(struct pci_dev *router, struct pci_dev *dev, int pirq, int irq) in pirq_vlsi_set() argument
555 if (pirq > 8) { in pirq_vlsi_set()
556 printk(KERN_INFO "VLSI router pirq escape (%d)\n", pirq); in pirq_vlsi_set()
559 write_config_nybble(router, 0x74, pirq-1, irq); in pirq_vlsi_set()
574 static int pirq_serverworks_get(struct pci_dev *router, struct pci_dev *dev, int pirq) in pirq_serverworks_get() argument
576 outb_p(pirq, 0xc00); in pirq_serverworks_get()
580 static int pirq_serverworks_set(struct pci_dev *router, struct pci_dev *dev, int pirq, int irq) in pirq_serverworks_set() argument
582 outb_p(pirq, 0xc00); in pirq_serverworks_set()
595 static int pirq_amd756_get(struct pci_dev *router, struct pci_dev *dev, int pirq) in pirq_amd756_get() argument
599 if (pirq <= 4) in pirq_amd756_get()
601 irq = read_config_nybble(router, 0x56, pirq - 1); in pirq_amd756_get()
604 dev->vendor, dev->device, pirq, irq); in pirq_amd756_get()
608 static int pirq_amd756_set(struct pci_dev *router, struct pci_dev *dev, int pirq, int irq) in pirq_amd756_set() argument
611 dev->vendor, dev->device, pirq, irq); in pirq_amd756_set()
612 if (pirq <= 4) in pirq_amd756_set()
614 write_config_nybble(router, 0x56, pirq - 1, irq); in pirq_amd756_set()
621 static int pirq_bios_set(struct pci_dev *router, struct pci_dev *dev, int pirq, int irq) in pirq_bios_set() argument
948 int i, pirq, newirq; in pcibios_lookup_irq() local
972 pirq = info->irq[pin].link; in pcibios_lookup_irq()
974 if (!pirq) { in pcibios_lookup_irq()
978 DBG(" -> PIRQ %02x, mask %04x, excl %04x", pirq, mask, pirq_table->exclusive_irqs); in pcibios_lookup_irq()
984 if (broken_hp_bios_irq9 && pirq == 0x59 && dev->irq == 9) { in pcibios_lookup_irq()
987 r->set(pirq_router_dev, dev, pirq, 11); in pcibios_lookup_irq()
992 pirq = 0x68; in pcibios_lookup_irq()
994 dev->irq = r->get(pirq_router_dev, dev, pirq); in pcibios_lookup_irq()
1017 if ((pirq & 0xf0) == 0xf0) { in pcibios_lookup_irq()
1018 irq = pirq & 0xf; in pcibios_lookup_irq()
1021 } else if (r->get && (irq = r->get(pirq_router_dev, dev, pirq))) { in pcibios_lookup_irq()
1026 if (r->set(pirq_router_dev, dev, pirq, newirq)) { in pcibios_lookup_irq()
1053 if (info->irq[pin].link == pirq) { in pcibios_lookup_irq()