Lines Matching refs:pin

49  * Implement an 8 pin PCI interrupt router compatible with the router
75 * Returns true if this pin is enabled with a valid IRQ. Setting the
77 * if the pin was disabled.
89 pirq_read(int pin)
92 assert(pin > 0 && pin <= nitems(pirqs));
93 return (pirqs[pin - 1].reg);
97 pirq_write(struct vmctx *ctx, int pin, uint8_t val)
101 assert(pin > 0 && pin <= nitems(pirqs));
102 pirq = &pirqs[pin - 1];
198 int best_count, best_irq, best_pin, irq, pin;
202 /* First, find the least-used PIRQ pin. */
205 for (pin = 1; pin < nitems(pirqs); pin++) {
206 if (pirqs[pin].use_count < best_count) {
207 best_pin = pin;
208 best_count = pirqs[pin].use_count;
213 /* Second, route this pin to an IRQ. */
235 pirq_irq(int pin)
237 assert(pin > 0 && pin <= nitems(pirqs));
238 return (pirqs[pin - 1].reg & PIRQ_IRQ);
247 int irq, pin;
289 for (pin = 0; pin < nitems(pirqs); pin++) {
291 dsdt_line("Device (LNK%c)", 'A' + pin);
294 dsdt_line(" Name (_UID, 0x%02X)", pin + 1);
297 dsdt_line(" If (PIRV (PIR%c))", 'A' + pin);
311 dsdt_line(" Name (CB%02X, ResourceTemplate ()", pin + 1);
317 pin + 1, 'A' + pin);
320 dsdt_line(" And (PIR%c, 0x%02X, Local0)", 'A' + pin,
324 dsdt_line(" ShiftLeft (0x01, Local0, CIR%c)", 'A' + pin);
328 dsdt_line(" Store (0x00, CIR%c)", 'A' + pin);
330 dsdt_line(" Return (CB%02X)", pin + 1);
334 dsdt_line(" Store (0x80, PIR%c)", 'A' + pin);
338 dsdt_line(" CreateWordField (Arg0, 0x01, SIR%c)", 'A' + pin);
339 dsdt_line(" FindSetRightBit (SIR%c, Local0)", 'A' + pin);
340 dsdt_line(" Store (Decrement (Local0), PIR%c)", 'A' + pin);