Lines Matching +full:port +full:- +full:level

1 // SPDX-License-Identifier: GPL-2.0-or-later
3 * eisa.c - provide support for EISA adapters in PA-RISC machines
10 * Wax ASIC also includes a PS/2 and RS-232 controller, but those are
15 * -----
17 * set an edge trigger level. This may be done on the palo command line
38 #include <asm/parisc-device.h>
67 /* Port ops */
69 static inline unsigned long eisa_permute(unsigned short port) in eisa_permute() argument
71 if (port & 0x300) { in eisa_permute()
72 return 0xfc000000 | ((port & 0xfc00) >> 6) in eisa_permute()
73 | ((port & 0x3f8) << 9) | (port & 7); in eisa_permute()
75 return 0xfc000000 | port; in eisa_permute()
79 unsigned char eisa_in8(unsigned short port) in eisa_in8() argument
82 return gsc_readb(eisa_permute(port)); in eisa_in8()
86 unsigned short eisa_in16(unsigned short port) in eisa_in16() argument
89 return le16_to_cpu(gsc_readw(eisa_permute(port))); in eisa_in16()
93 unsigned int eisa_in32(unsigned short port) in eisa_in32() argument
96 return le32_to_cpu(gsc_readl(eisa_permute(port))); in eisa_in32()
100 void eisa_out8(unsigned char data, unsigned short port) in eisa_out8() argument
103 gsc_writeb(data, eisa_permute(port)); in eisa_out8()
106 void eisa_out16(unsigned short data, unsigned short port) in eisa_out16() argument
109 gsc_writew(cpu_to_le16(data), eisa_permute(port)); in eisa_out16()
112 void eisa_out32(unsigned int data, unsigned short port) in eisa_out32() argument
115 gsc_writel(cpu_to_le32(data), eisa_permute(port)); in eisa_out32()
134 /* the trig level can be set with the
146 unsigned int irq = d->irq; in eisa_mask_irq()
167 unsigned int irq = d->irq; in eisa_unmask_irq()
200 EISA_DBG("irq IAR %02x 8259-1 irr %02x 8259-2 irr %02x\n", in eisa_irq()
206 EISA_DBG("irq 8259-1 isr %02x imr %02x 8259-2 isr %02x imr %02x\n", in eisa_irq()
216 eisa_out8(0x62, 0x20); /* 'Specific EOI' to master-IRQ2 */ in eisa_irq()
276 /* setup trig level */ in init_eisa_pic()
277 EISA_DBG("EISA edge/level %04x\n", eisa_irq_level); in init_eisa_pic()
284 EISA_DBG("pic0 edge/level %02x\n", eisa_in8(0x4d0)); in init_eisa_pic()
285 EISA_DBG("pic1 edge/level %02x\n", eisa_in8(0x4d1)); in init_eisa_pic()
292 #define is_mongoose(dev) (dev->id.sversion == 0x00076)
301 name, (unsigned long)dev->hpa.start); in eisa_probe()
321 printk(KERN_ERR "EISA: failed to claim EISA Bus port space!\n"); in eisa_probe()
326 result = request_irq(dev->irq, eisa_irq, IRQF_SHARED, "EISA", &eisa_dev); in eisa_probe()
342 if (dev->num_addrs) { in eisa_probe()
344 eisa_dev.eeprom_addr = dev->addr[0]; in eisa_probe()
355 result = -ENOMEM; in eisa_probe()
365 eisa_dev.root.dev = &dev->dev; in eisa_probe()
366 dev_set_drvdata(&dev->dev, &eisa_dev.root); in eisa_probe()
373 result = -ENOMEM; in eisa_probe()
383 free_irq(dev->irq, &eisa_dev); in eisa_probe()
415 "IRQ %d polarity configured twice (last to level)\n", in eisa_make_irq_level()
444 printk(KERN_ERR "eisa: EISA irq value are 0-15\n"); in eisa_irq_setup()
451 EISA_DBG("setting IRQ %d to edge-triggered mode\n", val); in eisa_irq_setup()