summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDuncan Laurie <dlaurie@chromium.org>2015-08-27 16:48:11 -0700
committerPatrick Georgi <pgeorgi@google.com>2015-09-08 11:18:05 +0000
commit9171f1ab8d9164f909f794a8a308a944ddefc74d (patch)
treee980c0ecb103d71b3d2f79f4d88a48da18c4ad92
parentfbd5367b1c8d5d95063fc03930effb8f54c96831 (diff)
downloadcoreboot-9171f1ab8d9164f909f794a8a308a944ddefc74d.tar.xz
skylake: ACPI: Remove itss.asl and cleanup irqlinks.asl
Move the itss.asl code that was exporting PIRQ routing control registers into irqlinks.asl and use the PCR access methods to find the appropriate address. At the same time clean up the code in irqlinks.asl to follow formatting rules. Also now that the GPIO code in itss.asl is unused the file can be removed. BUG=chrome-os-partner:44622 BRANCH=none TEST=emerge-glados coreboot Change-Id: I1af7d730542fd0e79b9f3db9f0796e7c701c59e6 Signed-off-by: Patrick Georgi <pgeorgi@chromium.org> Original-Commit-Id: 39a96063d01d00ab768db1c723f78b5af9ed6513 Original-Change-Id: Iafa03c276cb276ec8c00c24ed2dba48d0dc9612b Original-Signed-off-by: Duncan Laurie <dlaurie@chromium.org> Original-Reviewed-on: https://chromium-review.googlesource.com/295907 Original-Reviewed-by: Aaron Durbin <adurbin@chromium.org> Reviewed-on: http://review.coreboot.org/11534 Tested-by: build bot (Jenkins) Reviewed-by: Alexandru Gagniuc <mr.nuke.me@gmail.com> Reviewed-by: Aaron Durbin <adurbin@chromium.org>
-rw-r--r--src/soc/intel/skylake/acpi/irqlinks.asl337
-rw-r--r--src/soc/intel/skylake/acpi/itss.asl96
-rw-r--r--src/soc/intel/skylake/acpi/pch.asl1
3 files changed, 137 insertions, 297 deletions
diff --git a/src/soc/intel/skylake/acpi/irqlinks.asl b/src/soc/intel/skylake/acpi/irqlinks.asl
index 1f6e62352c..b7a78f0b18 100644
--- a/src/soc/intel/skylake/acpi/irqlinks.asl
+++ b/src/soc/intel/skylake/acpi/irqlinks.asl
@@ -19,475 +19,412 @@
* Foundation, Inc.
*/
+/* PIRQ routing control is in PCR ITSS region */
+OperationRegion (ITSS, SystemMemory,
+ Add (PCRB (PID_ITSS), R_PCH_PCR_ITSS_PIRQA_ROUT), 8)
+Field (ITSS, ByteAcc, NoLock, Preserve)
+{
+ PIRA, 8, /* PIRQA Routing Control */
+ PIRB, 8, /* PIRQB Routing Control */
+ PIRC, 8, /* PIRQC Routing Control */
+ PIRD, 8, /* PIRQD Routing Control */
+ PIRE, 8, /* PIRQE Routing Control */
+ PIRF, 8, /* PIRQF Routing Control */
+ PIRG, 8, /* PIRQG Routing Control */
+ PIRH, 8, /* PIRQH Routing Control */
+}
+
+Name (IREN, 0x80) /* Interrupt Routing Enable */
+Name (IREM, 0x0f) /* Interrupt Routing Mask */
+
Device (LNKA)
{
- Name (_HID, EISAID("PNP0C0F"))
+ Name (_HID, EISAID ("PNP0C0F"))
Name (_UID, 1)
- // Disable method
- Method (_DIS, 0, Serialized)
- {
- Or (\_SB.PARC, 0x80, \_SB.PARC)
- }
-
- // Possible Resource Settings for this Link
- Name (_PRS, ResourceTemplate()
+ Name (_PRS, ResourceTemplate ()
{
IRQ (Level, ActiveLow, Shared)
{ 3, 4, 5, 6, 10, 12, 14, 15 }
})
- // Current Resource Settings for this link
Method (_CRS, 0, Serialized)
{
- Name (RTLA, ResourceTemplate()
+ Name (RTLA, ResourceTemplate ()
{
IRQ (Level, ActiveLow, Shared) {}
})
CreateWordField (RTLA, 1, IRQ0)
-
- // Clear the WordField
Store (Zero, IRQ0)
- // Set the bit from PRTA
- ShiftLeft (1, And (\_SB.PARC, 0x0f), IRQ0)
+ /* Set the bit from PIRQ Routing Register */
+ ShiftLeft (1, And (^^PIRA, ^^IREM), IRQ0)
Return (RTLA)
}
- // Set Resource Setting for this IRQ link
Method (_SRS, 1, Serialized)
{
CreateWordField (Arg0, 1, IRQ0)
-
- // Which bit is set?
FindSetRightBit (IRQ0, Local0)
-
- Decrement(Local0)
- Store (Local0, \_SB.PARC)
+ Decrement (Local0)
+ Store (Local0, ^^PIRA)
}
- // Status
Method (_STA, 0, Serialized)
{
- If(And (\_SB.PARC, 0x80)) {
+ If (And (^^PIRA, ^^IREN)) {
Return (0x9)
} Else {
Return (0xb)
}
}
+
+ Method (_DIS, 0, Serialized)
+ {
+ Or (^^PIRA, ^^IREN, ^^PIRA)
+ }
}
Device (LNKB)
{
- Name (_HID, EISAID("PNP0C0F"))
+ Name (_HID, EISAID ("PNP0C0F"))
Name (_UID, 2)
- // Disable method
- Method (_DIS, 0, Serialized)
- {
- Or (\_SB.PBRC, 0x80, \_SB.PBRC)
- }
-
- // Possible Resource Settings for this Link
- Name (_PRS, ResourceTemplate()
+ Name (_PRS, ResourceTemplate ()
{
IRQ (Level, ActiveLow, Shared)
{ 3, 4, 5, 6, 10, 12, 14, 15 }
})
- // Current Resource Settings for this link
Method (_CRS, 0, Serialized)
{
- Name (RTLB, ResourceTemplate()
+ Name (RTLA, ResourceTemplate ()
{
IRQ (Level, ActiveLow, Shared) {}
})
- CreateWordField (RTLB, 1, IRQ0)
-
- // Clear the WordField
+ CreateWordField (RTLA, 1, IRQ0)
Store (Zero, IRQ0)
- // Set the bit from PRTB
- ShiftLeft (1, And (\_SB.PBRC, 0x0f), IRQ0)
+ /* Set the bit from PIRQ Routing Register */
+ ShiftLeft (1, And (^^PIRB, ^^IREM), IRQ0)
- Return (RTLB)
+ Return (RTLA)
}
- // Set Resource Setting for this IRQ link
Method (_SRS, 1, Serialized)
{
CreateWordField (Arg0, 1, IRQ0)
-
- // Which bit is set?
FindSetRightBit (IRQ0, Local0)
-
- Decrement(Local0)
- Store (Local0, \_SB.PBRC)
+ Decrement (Local0)
+ Store (Local0, ^^PIRB)
}
- // Status
Method (_STA, 0, Serialized)
{
- If(And (\_SB.PBRC, 0x80)) {
+ If (And (^^PIRB, ^^IREN)) {
Return (0x9)
} Else {
Return (0xb)
}
}
+
+ Method (_DIS, 0, Serialized)
+ {
+ Or (^^PIRB, ^^IREN, ^^PIRB)
+ }
}
Device (LNKC)
{
- Name (_HID, EISAID("PNP0C0F"))
+ Name (_HID, EISAID ("PNP0C0F"))
Name (_UID, 3)
- // Disable method
- Method (_DIS, 0, Serialized)
- {
- Or (\_SB.PCRC, 0x80, \_SB.PCRC)
- }
-
- // Possible Resource Settings for this Link
- Name (_PRS, ResourceTemplate()
+ Name (_PRS, ResourceTemplate ()
{
IRQ (Level, ActiveLow, Shared)
{ 3, 4, 5, 6, 10, 12, 14, 15 }
})
- // Current Resource Settings for this link
Method (_CRS, 0, Serialized)
{
- Name (RTLC, ResourceTemplate()
+ Name (RTLA, ResourceTemplate ()
{
IRQ (Level, ActiveLow, Shared) {}
})
- CreateWordField (RTLC, 1, IRQ0)
-
- // Clear the WordField
+ CreateWordField (RTLA, 1, IRQ0)
Store (Zero, IRQ0)
- // Set the bit from PRTC
- ShiftLeft (1, And (\_SB.PCRC, 0x0f), IRQ0)
+ /* Set the bit from PIRQ Routing Register */
+ ShiftLeft (1, And (^^PIRC, ^^IREM), IRQ0)
- Return (RTLC)
+ Return (RTLA)
}
- // Set Resource Setting for this IRQ link
Method (_SRS, 1, Serialized)
{
CreateWordField (Arg0, 1, IRQ0)
-
- // Which bit is set?
FindSetRightBit (IRQ0, Local0)
-
- Decrement(Local0)
- Store (Local0, \_SB.PCRC)
+ Decrement (Local0)
+ Store (Local0, ^^PIRC)
}
- // Status
Method (_STA, 0, Serialized)
{
- If(And (\_SB.PCRC, 0x80)) {
+ If (And (^^PIRC, ^^IREN)) {
Return (0x9)
} Else {
Return (0xb)
}
}
+
+ Method (_DIS, 0, Serialized)
+ {
+ Or (^^PIRC, ^^IREN, ^^PIRC)
+ }
}
Device (LNKD)
{
- Name (_HID, EISAID("PNP0C0F"))
+ Name (_HID, EISAID ("PNP0C0F"))
Name (_UID, 4)
- // Disable method
- Method (_DIS, 0, Serialized)
- {
- Or (\_SB.PDRC, 0x80, \_SB.PDRC)
- }
-
- // Possible Resource Settings for this Link
- Name (_PRS, ResourceTemplate()
+ Name (_PRS, ResourceTemplate ()
{
IRQ (Level, ActiveLow, Shared)
{ 3, 4, 5, 6, 10, 12, 14, 15 }
})
- // Current Resource Settings for this link
Method (_CRS, 0, Serialized)
{
- Name (RTLD, ResourceTemplate()
+ Name (RTLA, ResourceTemplate ()
{
IRQ (Level, ActiveLow, Shared) {}
})
- CreateWordField (RTLD, 1, IRQ0)
-
- // Clear the WordField
+ CreateWordField (RTLA, 1, IRQ0)
Store (Zero, IRQ0)
- // Set the bit from PRTD
- ShiftLeft (1, And (\_SB.PDRC, 0x0f), IRQ0)
+ /* Set the bit from PIRQ Routing Register */
+ ShiftLeft (1, And (^^PIRD, ^^IREM), IRQ0)
- Return (RTLD)
+ Return (RTLA)
}
- // Set Resource Setting for this IRQ link
Method (_SRS, 1, Serialized)
{
CreateWordField (Arg0, 1, IRQ0)
-
- // Which bit is set?
FindSetRightBit (IRQ0, Local0)
-
- Decrement(Local0)
- Store (Local0, \_SB.PDRC)
+ Decrement (Local0)
+ Store (Local0, ^^PIRD)
}
- // Status
Method (_STA, 0, Serialized)
{
- If(And (\_SB.PDRC, 0x80)) {
+ If (And (^^PIRD, ^^IREN)) {
Return (0x9)
} Else {
Return (0xb)
}
}
+
+ Method (_DIS, 0, Serialized)
+ {
+ Or (^^PIRD, ^^IREN, ^^PIRD)
+ }
}
Device (LNKE)
{
- Name (_HID, EISAID("PNP0C0F"))
+ Name (_HID, EISAID ("PNP0C0F"))
Name (_UID, 5)
- // Disable method
- Method (_DIS, 0, Serialized)
- {
- Or (\_SB.PERC, 0x80, \_SB.PERC)
- }
-
- // Possible Resource Settings for this Link
- Name (_PRS, ResourceTemplate()
+ Name (_PRS, ResourceTemplate ()
{
IRQ (Level, ActiveLow, Shared)
{ 3, 4, 5, 6, 10, 12, 14, 15 }
})
- // Current Resource Settings for this link
Method (_CRS, 0, Serialized)
{
- Name (RTLE, ResourceTemplate()
+ Name (RTLA, ResourceTemplate ()
{
IRQ (Level, ActiveLow, Shared) {}
})
- CreateWordField (RTLE, 1, IRQ0)
-
- // Clear the WordField
+ CreateWordField (RTLA, 1, IRQ0)
Store (Zero, IRQ0)
- // Set the bit from PRTE
- ShiftLeft (1, And (\_SB.PERC, 0x0f), IRQ0)
+ /* Set the bit from PIRQ Routing Register */
+ ShiftLeft (1, And (^^PIRE, ^^IREM), IRQ0)
- Return (RTLE)
+ Return (RTLA)
}
- // Set Resource Setting for this IRQ link
Method (_SRS, 1, Serialized)
{
CreateWordField (Arg0, 1, IRQ0)
-
- // Which bit is set?
FindSetRightBit (IRQ0, Local0)
-
- Decrement(Local0)
- Store (Local0, \_SB.PERC)
+ Decrement (Local0)
+ Store (Local0, ^^PIRE)
}
- // Status
Method (_STA, 0, Serialized)
{
- If(And (\_SB.PERC, 0x80)) {
+ If (And (^^PIRE, ^^IREN)) {
Return (0x9)
} Else {
Return (0xb)
}
}
+
+ Method (_DIS, 0, Serialized)
+ {
+ Or (^^PIRE, ^^IREN, ^^PIRE)
+ }
}
Device (LNKF)
{
- Name (_HID, EISAID("PNP0C0F"))
+ Name (_HID, EISAID ("PNP0C0F"))
Name (_UID, 6)
- // Disable method
- Method (_DIS, 0, Serialized)
- {
- Or (\_SB.PFRC, 0x80, \_SB.PFRC)
- }
-
- // Possible Resource Settings for this Link
- Name (_PRS, ResourceTemplate()
+ Name (_PRS, ResourceTemplate ()
{
IRQ (Level, ActiveLow, Shared)
{ 3, 4, 5, 6, 10, 12, 14, 15 }
})
- // Current Resource Settings for this link
Method (_CRS, 0, Serialized)
{
- Name (RTLF, ResourceTemplate()
+ Name (RTLA, ResourceTemplate ()
{
IRQ (Level, ActiveLow, Shared) {}
})
- CreateWordField (RTLF, 1, IRQ0)
-
- // Clear the WordField
+ CreateWordField (RTLA, 1, IRQ0)
Store (Zero, IRQ0)
- // Set the bit from PRTF
- ShiftLeft (1, And (\_SB.PFRC, 0x0f), IRQ0)
+ /* Set the bit from PIRQ Routing Register */
+ ShiftLeft (1, And (^^PIRF, ^^IREM), IRQ0)
- Return (RTLF)
+ Return (RTLA)
}
- // Set Resource Setting for this IRQ link
Method (_SRS, 1, Serialized)
{
CreateWordField (Arg0, 1, IRQ0)
-
- // Which bit is set?
FindSetRightBit (IRQ0, Local0)
-
- Decrement(Local0)
- Store (Local0, \_SB.PFRC)
+ Decrement (Local0)
+ Store (Local0, ^^PIRF)
}
- // Status
Method (_STA, 0, Serialized)
{
- If(And (\_SB.PFRC, 0x80)) {
+ If (And (^^PIRF, ^^IREN)) {
Return (0x9)
} Else {
Return (0xb)
}
}
+
+ Method (_DIS, 0, Serialized)
+ {
+ Or (^^PIRF, ^^IREN, ^^PIRF)
+ }
}
Device (LNKG)
{
- Name (_HID, EISAID("PNP0C0F"))
+ Name (_HID, EISAID ("PNP0C0F"))
Name (_UID, 7)
- // Disable method
- Method (_DIS, 0, Serialized)
- {
- Or (\_SB.PGRC, 0x80, \_SB.PGRC)
- }
-
- // Possible Resource Settings for this Link
- Name (_PRS, ResourceTemplate()
+ Name (_PRS, ResourceTemplate ()
{
IRQ (Level, ActiveLow, Shared)
{ 3, 4, 5, 6, 10, 12, 14, 15 }
})
- // Current Resource Settings for this link
Method (_CRS, 0, Serialized)
{
- Name (RTLG, ResourceTemplate()
+ Name (RTLA, ResourceTemplate ()
{
IRQ (Level, ActiveLow, Shared) {}
})
- CreateWordField (RTLG, 1, IRQ0)
-
- // Clear the WordField
+ CreateWordField (RTLA, 1, IRQ0)
Store (Zero, IRQ0)
- // Set the bit from PRTG
- ShiftLeft (1, And (\_SB.PGRC, 0x0f), IRQ0)
+ /* Set the bit from PIRQ Routing Register */
+ ShiftLeft (1, And (^^PIRG, ^^IREM), IRQ0)
- Return (RTLG)
+ Return (RTLA)
}
- // Set Resource Setting for this IRQ link
Method (_SRS, 1, Serialized)
{
CreateWordField (Arg0, 1, IRQ0)
-
- // Which bit is set?
FindSetRightBit (IRQ0, Local0)
-
- Decrement(Local0)
- Store (Local0, \_SB.PGRC)
+ Decrement (Local0)
+ Store (Local0, ^^PIRG)
}
- // Status
Method (_STA, 0, Serialized)
{
- If(And (\_SB.PGRC, 0x80)) {
+ If (And (^^PIRG, ^^IREN)) {
Return (0x9)
} Else {
Return (0xb)
}
}
-}
-Device (LNKH)
-{
- Name (_HID, EISAID("PNP0C0F"))
- Name (_UID, 8)
-
- // Disable method
Method (_DIS, 0, Serialized)
{
- Or (\_SB.PHRC, 0x80, \_SB.PHRC)
+ Or (^^PIRG, ^^IREN, ^^PIRG)
}
+}
- // Possible Resource Settings for this Link
- Name (_PRS, ResourceTemplate()
+Device (LNKH)
+{
+ Name (_HID, EISAID ("PNP0C0F"))
+ Name (_UID, 1)
+
+ Name (_PRS, ResourceTemplate ()
{
IRQ (Level, ActiveLow, Shared)
{ 3, 4, 5, 6, 10, 12, 14, 15 }
})
- // Current Resource Settings for this link
Method (_CRS, 0, Serialized)
{
- Name (RTLH, ResourceTemplate()
+ Name (RTLA, ResourceTemplate ()
{
IRQ (Level, ActiveLow, Shared) {}
})
- CreateWordField (RTLH, 1, IRQ0)
-
- // Clear the WordField
+ CreateWordField (RTLA, 1, IRQ0)
Store (Zero, IRQ0)
- // Set the bit from PRTH
- ShiftLeft (1, And (\_SB.PHRC, 0x0f), IRQ0)
+ /* Set the bit from PIRQ Routing Register */
+ ShiftLeft (1, And (^^PIRH, ^^IREM), IRQ0)
- Return (RTLH)
+ Return (RTLA)
}
- // Set Resource Setting for this IRQ link
Method (_SRS, 1, Serialized)
{
CreateWordField (Arg0, 1, IRQ0)
-
- // Which bit is set?
FindSetRightBit (IRQ0, Local0)
-
- Decrement(Local0)
- Store (Local0, \_SB.PHRC)
+ Decrement (Local0)
+ Store (Local0, ^^PIRH)
}
- // Status
Method (_STA, 0, Serialized)
{
- If(And (\_SB.PHRC, 0x80)) {
+ If (And (^^PIRH, ^^IREN)) {
Return (0x9)
} Else {
Return (0xb)
}
}
-}
+ Method (_DIS, 0, Serialized)
+ {
+ Or (^^PIRH, ^^IREN, ^^PIRH)
+ }
+}
diff --git a/src/soc/intel/skylake/acpi/itss.asl b/src/soc/intel/skylake/acpi/itss.asl
deleted file mode 100644
index 8ba9513abd..0000000000
--- a/src/soc/intel/skylake/acpi/itss.asl
+++ /dev/null
@@ -1,96 +0,0 @@
-/*
- * This file is part of the coreboot project.
- * Copyright (C) 2015 Intel Corporation.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- */
-
-/* ITSS */
-/* Define the needed ITSS registers used by ASL on Interrupt */
-
-Scope (\_SB)
-{
- OperationRegion (ITSS, SystemMemory, 0xfdc43100, 0x8)
- Field (ITSS, ByteAcc, NoLock, Preserve)
- {
- PARC, 8,
- PBRC, 8,
- PCRC, 8,
- PDRC, 8,
- PERC, 8,
- PFRC, 8,
- PGRC, 8,
- PHRC, 8,
- }
-
- /*
- * Pin# = group_pad# + group# * 24.
- * For instance, GPP_A_6 would be pin#6,
- * GPP_D_23 would be 23+(3*24), pin#95.
- */
- Name (GPPG, Package (0x02)
- {
- Package (0x08)
- {
- 0x18,
- 0x18,
- 0x18,
- 0x18,
- 0x18,
- 0x18,
- 0x08,
- 0x0C
- },
-
- Package (0x0A)
- {
- 0x18,
- 0x18,
- 0x18,
- 0x18,
- 0x0D,
- 0x18,
- 0x18,
- 0x18,
- 0x0B,
- 0x0C
- }
- })
-
- Method (GNMB, 1, Serialized)
- {
- Return (And (Arg0, 0xFFFF))
- }
-
- Method (GGRP, 1, Serialized)
- {
- ShiftRight (And (Arg0, 0x00FF0000), 0x10, Local0)
- Return (Local0)
- }
-
- /* Convert GPIO PAD name to GPIO number */
- Method (INUM, 1, NotSerialized)
- {
- Store (One, Local0)
- Store (GNMB (Arg0), Local1)
- Store (GGRP (Arg0), Local2)
- Store (Zero, Local3)
-
- While (LLess (Local3, Local2))
- {
- Add (DerefOf (Index (DerefOf (Index
- (GPPG, Local0)), Local3)),
- Local1, Local1)
- Increment (Local3)
- }
-
- Return (Add (0x18, Mod (Local1, 0x60)))
- }
-}
diff --git a/src/soc/intel/skylake/acpi/pch.asl b/src/soc/intel/skylake/acpi/pch.asl
index 581efa082b..c72a704fc4 100644
--- a/src/soc/intel/skylake/acpi/pch.asl
+++ b/src/soc/intel/skylake/acpi/pch.asl
@@ -47,7 +47,6 @@
#include "smbus.asl"
-#include "itss.asl"
/* USB XHCI 0:14.0 */
#include "xhci.asl"