diff options
-rw-r--r-- | src/soc/amd/picasso/acpi/aoac.asl | 39 | ||||
-rw-r--r-- | src/soc/amd/picasso/acpi/sb_fch.asl | 61 |
2 files changed, 18 insertions, 82 deletions
diff --git a/src/soc/amd/picasso/acpi/aoac.asl b/src/soc/amd/picasso/acpi/aoac.asl index 7a9a9e628f..d7523dfe23 100644 --- a/src/soc/amd/picasso/acpi/aoac.asl +++ b/src/soc/amd/picasso/acpi/aoac.asl @@ -1,9 +1,7 @@ /* SPDX-License-Identifier: GPL-2.0-or-later */ -#include <amdblocks/acpimmio_map.h> - -#define AOAC_DEVICE(DEV_NAME, DEV_ID, SX) \ - PowerResource(DEV_NAME, SX, 0) { \ +#define AOAC_DEVICE(DEV_ID, SX) \ + PowerResource(AOAC, SX, 0) { \ OperationRegion (AOAC, SystemMemory, ACPIMMIO_BASE(AOAC) + 0x40 + (DEV_ID << 1), 2) \ Field (AOAC, ByteAcc, NoLock, Preserve) { \ /* \ @@ -105,28 +103,13 @@ Stall (100) \ } \ } \ + } \ + Name (_PR0, Package () { AOAC }) \ + Name (_PR2, Package () { AOAC }) \ + Name (_PR3, Package () { AOAC }) \ + Method (_PS0, 0, Serialized) { \ + ^AOAC.TDS = 1 \ + } \ + Method (_PS3, 0, Serialized) { \ + ^AOAC.TDS = 3 \ } - - -Device (AOAC) { - Name (_HID, EISAID("PNP0C02")) // ID for Motherboard resources - - Method (_STA, 0x0, NotSerialized) - { - /* - * This case is used to indicate a valid device for which no - * device driver should be loaded (for example, a bridge - * device.) Children of this device may be present and valid. - * OSPM should continue enumeration below a device whose _STA - * returns this bit combination. - */ - Return (0x08) - } - - AOAC_DEVICE(I2C2, 7, 0) - AOAC_DEVICE(I2C3, 8, 0) - AOAC_DEVICE(FUR0, 11, 0) - AOAC_DEVICE(FUR1, 12, 0) - AOAC_DEVICE(FUR2, 16, 0) - AOAC_DEVICE(FUR3, 26, 0) -} diff --git a/src/soc/amd/picasso/acpi/sb_fch.asl b/src/soc/amd/picasso/acpi/sb_fch.asl index 712de6618f..895abfd70c 100644 --- a/src/soc/amd/picasso/acpi/sb_fch.asl +++ b/src/soc/amd/picasso/acpi/sb_fch.asl @@ -3,6 +3,7 @@ #include <soc/gpio.h> #include <soc/iomap.h> #include <amdblocks/acpimmio_map.h> +#include <aoac.asl> Device (AAHB) { @@ -123,15 +124,7 @@ Device (FUR0) } } - Name (_PR0, Package () { \_SB.AOAC.FUR0 }) - Name (_PR2, Package () { \_SB.AOAC.FUR0 }) - Name (_PR3, Package () { \_SB.AOAC.FUR0 }) - Method (_PS0, 0, Serialized) { - \_SB.AOAC.FUR0.TDS = 1 - } - Method (_PS3, 0, Serialized) { - \_SB.AOAC.FUR0.TDS = 3 - } + AOAC_DEVICE(11, 0) } Device (FUR1) { @@ -164,15 +157,7 @@ Device (FUR1) { } } - Name (_PR0, Package () { \_SB.AOAC.FUR1 }) - Name (_PR2, Package () { \_SB.AOAC.FUR1 }) - Name (_PR3, Package () { \_SB.AOAC.FUR1 }) - Method (_PS0, 0, Serialized) { - \_SB.AOAC.FUR1.TDS = 1 - } - Method (_PS3, 0, Serialized) { - \_SB.AOAC.FUR1.TDS = 3 - } + AOAC_DEVICE(12, 0) } Device (FUR2) { @@ -205,15 +190,7 @@ Device (FUR2) { } } - Name (_PR0, Package () { \_SB.AOAC.FUR2 }) - Name (_PR2, Package () { \_SB.AOAC.FUR2 }) - Name (_PR3, Package () { \_SB.AOAC.FUR2 }) - Method (_PS0, 0, Serialized) { - \_SB.AOAC.FUR2.TDS = 1 - } - Method (_PS3, 0, Serialized) { - \_SB.AOAC.FUR2.TDS = 3 - } + AOAC_DEVICE(16, 0) } Device (FUR3) { @@ -246,15 +223,7 @@ Device (FUR3) { } } - Name (_PR0, Package () { \_SB.AOAC.FUR3 }) - Name (_PR2, Package () { \_SB.AOAC.FUR3 }) - Name (_PR3, Package () { \_SB.AOAC.FUR3 }) - Method (_PS0, 0, Serialized) { - \_SB.AOAC.FUR3.TDS = 1 - } - Method (_PS3, 0, Serialized) { - \_SB.AOAC.FUR3.TDS = 3 - } + AOAC_DEVICE(26, 0) } Device (I2C2) { @@ -290,15 +259,7 @@ Device (I2C2) { Return (0x0F) } - Name (_PR0, Package () { \_SB.AOAC.I2C2 }) - Name (_PR2, Package () { \_SB.AOAC.I2C2 }) - Name (_PR3, Package () { \_SB.AOAC.I2C2 }) - Method (_PS0, 0, Serialized) { - \_SB.AOAC.I2C2.TDS = 1 - } - Method (_PS3, 0, Serialized) { - \_SB.AOAC.I2C2.TDS = 3 - } + AOAC_DEVICE(7, 0) } Device (I2C3) @@ -334,15 +295,7 @@ Device (I2C3) Return (0x0F) } - Name (_PR0, Package () { \_SB.AOAC.I2C3 }) - Name (_PR2, Package () { \_SB.AOAC.I2C3 }) - Name (_PR3, Package () { \_SB.AOAC.I2C3 }) - Method (_PS0, 0, Serialized) { - \_SB.AOAC.I2C3.TDS = 1 - } - Method (_PS3, 0, Serialized) { - \_SB.AOAC.I2C3.TDS = 3 - } + AOAC_DEVICE(8, 0) } Device (MISC) |