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