mirror of
https://github.com/fail0verflow/switch-coreboot.git
synced 2025-05-04 01:39:18 -04:00
UPSTREAM: sb/bd82x6x: add ACPI method to generate USB port info
Add ACPI method GPLD to generate port location data when
passed visiblity info. Will be used by _PLD method in
board-specific USB .asl files.
BUG=none
BRANCH=none
TEST=none
Change-Id: I6193b5763b63dd5486163460d734f2789822c8f4
Signed-off-by: Patrick Georgi <pgeorgi@google.com>
Original-Commit-Id: fa2df2a3f8
Original-Change-Id: Ib83660d6548112ceb6c75a31e5ce6c4a6041ccfb
Original-Signed-off-by: Matt DeVillier <matt.devillier@gmail.com>
Original-Reviewed-on: https://review.coreboot.org/19962
Original-Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Original-Reviewed-by: Martin Roth <martinroth@google.com>
Reviewed-on: https://chromium-review.googlesource.com/521034
Commit-Ready: Patrick Georgi <pgeorgi@chromium.org>
Tested-by: Patrick Georgi <pgeorgi@chromium.org>
Reviewed-by: Patrick Georgi <pgeorgi@chromium.org>
This commit is contained in:
parent
485efe53c9
commit
99bc4e39a3
1 changed files with 40 additions and 0 deletions
|
@ -40,6 +40,27 @@ Device (EHC1)
|
|||
{
|
||||
Name (_ADR, 0x00000000)
|
||||
|
||||
|
||||
// GPLD: Generate Port Location Data (PLD)
|
||||
Method (GPLD, 1, Serialized)
|
||||
{
|
||||
|
||||
Name (PCKG, Package (0x01)
|
||||
{
|
||||
Buffer (0x10) {}
|
||||
})
|
||||
|
||||
// REV: Revision 0x02 for ACPI 5.0
|
||||
CreateField (DerefOf (Index (PCKG, Zero)), Zero, 0x07, REV)
|
||||
Store (0x02, REV)
|
||||
|
||||
// VISI: Port visibility to user per port
|
||||
CreateField (DerefOf (Index (PCKG, Zero)), 0x40, One, VISI)
|
||||
Store (Arg0, VISI)
|
||||
|
||||
Return (PCKG)
|
||||
}
|
||||
|
||||
// How many are there?
|
||||
Device (PRT1) { Name (_ADR, 1) } // USB Port 0
|
||||
Device (PRT2) { Name (_ADR, 2) } // USB Port 1
|
||||
|
@ -74,6 +95,25 @@ Device (EHC2)
|
|||
{
|
||||
Name (_ADR, 0x00000000)
|
||||
|
||||
// GPLD: Generate Port Location Data (PLD)
|
||||
Method (GPLD, 1, Serialized)
|
||||
{
|
||||
Name (PCKG, Package (0x01)
|
||||
{
|
||||
Buffer (0x10) {}
|
||||
})
|
||||
|
||||
// REV: Revision 0x02 for ACPI 5.0
|
||||
CreateField (DerefOf (Index (PCKG, Zero)), Zero, 0x07, REV)
|
||||
Store (0x02, REV)
|
||||
|
||||
// VISI: Port visibility to user per port
|
||||
CreateField (DerefOf (Index (PCKG, Zero)), 0x40, One, VISI)
|
||||
Store (Arg0, VISI)
|
||||
|
||||
Return (PCKG)
|
||||
}
|
||||
|
||||
// How many are there?
|
||||
Device (PRT1) { Name (_ADR, 1) } // USB Port 0
|
||||
Device (PRT2) { Name (_ADR, 2) } // USB Port 1
|
||||
|
|
Loading…
Add table
Reference in a new issue