Tom Rini | 10e4779 | 2018-05-06 17:58:06 -0400 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0+ */ |
Bin Meng | 6c9f944 | 2016-05-07 07:46:31 -0700 | [diff] [blame] | 2 | /* |
| 3 | * Copyright (C) 2007-2009 coresystems GmbH |
| 4 | * Copyright (C) 2013 Google Inc. |
| 5 | * Copyright (C) 2016 Bin Meng <bmeng.cn@gmail.com> |
| 6 | * |
| 7 | * Modified from coreboot src/soc/intel/baytrail/acpi/irqroute.asl |
Bin Meng | 6c9f944 | 2016-05-07 07:46:31 -0700 | [diff] [blame] | 8 | */ |
| 9 | |
| 10 | Name(\PICM, 0) |
| 11 | |
| 12 | /* |
| 13 | * The _PIC method is called by the OS to choose between interrupt |
| 14 | * routing via the i8259 interrupt controller or the APIC. |
| 15 | * |
| 16 | * _PIC is called with a parameter of 0 for i8259 configuration and |
| 17 | * with a parameter of 1 for Local APIC/IOAPIC configuration. |
| 18 | */ |
| 19 | Method(\_PIC, 1) |
| 20 | { |
| 21 | /* Remember the OS' IRQ routing choice */ |
| 22 | Store(Arg0, PICM) |
| 23 | } |
| 24 | |
| 25 | /* PCI interrupt routing */ |
| 26 | Method(_PRT) { |
| 27 | If (PICM) { |
| 28 | Return (Package() { |
| 29 | #undef PIC_MODE |
| 30 | #include "irq_helper.h" |
| 31 | PCI_DEV_PIRQ_ROUTES |
| 32 | }) |
| 33 | } Else { |
| 34 | Return (Package() { |
| 35 | #define PIC_MODE |
| 36 | #include "irq_helper.h" |
| 37 | PCI_DEV_PIRQ_ROUTES |
| 38 | }) |
| 39 | } |
| 40 | |
| 41 | } |
| 42 | |
| 43 | /* PCIe downstream ports interrupt routing */ |
| 44 | PCIE_BRIDGE_IRQ_ROUTES |
| 45 | #undef PIC_MODE |
| 46 | #include "irq_helper.h" |
| 47 | PCIE_BRIDGE_IRQ_ROUTES |