boot.c (ca31fef11dc83e672415d5925a134749761329bd) | boot.c (d25316616842b593de6f89ce2101f1af62f4d559) |
---|---|
1// SPDX-License-Identifier: GPL-2.0-or-later 2/* 3 * boot.c - Architecture-Specific Low-Level ACPI Boot Support 4 * 5 * Copyright (C) 2001, 2002 Paul Diefenbaugh <paul.s.diefenbaugh@intel.com> 6 * Copyright (C) 2001 Jun Nakajima <jun.nakajima@intel.com> 7 */ 8#define pr_fmt(fmt) "ACPI: " fmt --- 556 unchanged lines hidden (view full) --- 565 */ 566 567void __init acpi_pic_sci_set_trigger(unsigned int irq, u16 trigger) 568{ 569 unsigned int mask = 1 << irq; 570 unsigned int old, new; 571 572 /* Real old ELCR mask */ | 1// SPDX-License-Identifier: GPL-2.0-or-later 2/* 3 * boot.c - Architecture-Specific Low-Level ACPI Boot Support 4 * 5 * Copyright (C) 2001, 2002 Paul Diefenbaugh <paul.s.diefenbaugh@intel.com> 6 * Copyright (C) 2001 Jun Nakajima <jun.nakajima@intel.com> 7 */ 8#define pr_fmt(fmt) "ACPI: " fmt --- 556 unchanged lines hidden (view full) --- 565 */ 566 567void __init acpi_pic_sci_set_trigger(unsigned int irq, u16 trigger) 568{ 569 unsigned int mask = 1 << irq; 570 unsigned int old, new; 571 572 /* Real old ELCR mask */ |
573 old = inb(0x4d0) | (inb(0x4d1) << 8); | 573 old = inb(PIC_ELCR1) | (inb(PIC_ELCR2) << 8); |
574 575 /* 576 * If we use ACPI to set PCI IRQs, then we should clear ELCR 577 * since we will set it correctly as we enable the PCI irq 578 * routing. 579 */ 580 new = acpi_noirq ? old : 0; 581 --- 9 unchanged lines hidden (view full) --- 591 new |= mask; 592 break; 593 } 594 595 if (old == new) 596 return; 597 598 pr_warn("setting ELCR to %04x (from %04x)\n", new, old); | 574 575 /* 576 * If we use ACPI to set PCI IRQs, then we should clear ELCR 577 * since we will set it correctly as we enable the PCI irq 578 * routing. 579 */ 580 new = acpi_noirq ? old : 0; 581 --- 9 unchanged lines hidden (view full) --- 591 new |= mask; 592 break; 593 } 594 595 if (old == new) 596 return; 597 598 pr_warn("setting ELCR to %04x (from %04x)\n", new, old); |
599 outb(new, 0x4d0); 600 outb(new >> 8, 0x4d1); | 599 outb(new, PIC_ELCR1); 600 outb(new >> 8, PIC_ELCR2); |
601} 602 603int acpi_gsi_to_irq(u32 gsi, unsigned int *irqp) 604{ 605 int rc, irq, trigger, polarity; 606 607 if (acpi_irq_model == ACPI_IRQ_MODEL_PIC) { 608 *irqp = gsi; --- 1146 unchanged lines hidden --- | 601} 602 603int acpi_gsi_to_irq(u32 gsi, unsigned int *irqp) 604{ 605 int rc, irq, trigger, polarity; 606 607 if (acpi_irq_model == ACPI_IRQ_MODEL_PIC) { 608 *irqp = gsi; --- 1146 unchanged lines hidden --- |