summaryrefslogtreecommitdiff
path: root/arch/x86/include/asm/acpi/irqroute.asl
diff options
context:
space:
mode:
authorBin Meng <bmeng.cn@gmail.com>2016-05-25 19:19:07 -0700
committerBin Meng <bmeng.cn@gmail.com>2016-05-30 10:21:12 +0800
commit3498cc9775e255875ae30ecfb4e29ea1220923a3 (patch)
treea2adeb4a11da16c0e937037777ac05ae122705de /arch/x86/include/asm/acpi/irqroute.asl
parent0d71511a2ae03aeb3794a0461bd8c14752438c7f (diff)
downloadu-boot-imx-3498cc9775e255875ae30ecfb4e29ea1220923a3.zip
u-boot-imx-3498cc9775e255875ae30ecfb4e29ea1220923a3.tar.gz
u-boot-imx-3498cc9775e255875ae30ecfb4e29ea1220923a3.tar.bz2
x86: acpi: Make irqroute.asl common
The irqroute.asl file is already common enough to all x86 platforms. Platform ASL files need only provide a irqroute.h to describe how internal PCI devices and PCIe downstream port devices' INTx pins are routed to which PIRQ pin. Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'arch/x86/include/asm/acpi/irqroute.asl')
-rw-r--r--arch/x86/include/asm/acpi/irqroute.asl48
1 files changed, 48 insertions, 0 deletions
diff --git a/arch/x86/include/asm/acpi/irqroute.asl b/arch/x86/include/asm/acpi/irqroute.asl
new file mode 100644
index 0000000..64d3820
--- /dev/null
+++ b/arch/x86/include/asm/acpi/irqroute.asl
@@ -0,0 +1,48 @@
+/*
+ * Copyright (C) 2007-2009 coresystems GmbH
+ * Copyright (C) 2013 Google Inc.
+ * Copyright (C) 2016 Bin Meng <bmeng.cn@gmail.com>
+ *
+ * Modified from coreboot src/soc/intel/baytrail/acpi/irqroute.asl
+ *
+ * SPDX-License-Identifier: GPL-2.0+
+ */
+
+Name(\PICM, 0)
+
+/*
+ * The _PIC method is called by the OS to choose between interrupt
+ * routing via the i8259 interrupt controller or the APIC.
+ *
+ * _PIC is called with a parameter of 0 for i8259 configuration and
+ * with a parameter of 1 for Local APIC/IOAPIC configuration.
+ */
+Method(\_PIC, 1)
+{
+ /* Remember the OS' IRQ routing choice */
+ Store(Arg0, PICM)
+}
+
+/* PCI interrupt routing */
+Method(_PRT) {
+ If (PICM) {
+ Return (Package() {
+ #undef PIC_MODE
+ #include "irq_helper.h"
+ PCI_DEV_PIRQ_ROUTES
+ })
+ } Else {
+ Return (Package() {
+ #define PIC_MODE
+ #include "irq_helper.h"
+ PCI_DEV_PIRQ_ROUTES
+ })
+ }
+
+}
+
+/* PCIe downstream ports interrupt routing */
+PCIE_BRIDGE_IRQ_ROUTES
+#undef PIC_MODE
+#include "irq_helper.h"
+PCIE_BRIDGE_IRQ_ROUTES