From a5bc20938261d9bdc2876f399326743a50959c47 Mon Sep 17 00:00:00 2001 From: Jared McNeill Date: Thu, 22 Feb 2024 21:25:44 -0400 Subject: [PATCH] Rk356x: Disable host bridge device if PHY init fails. --- .../Platform/Rockchip/Rk356x/AcpiTables/Pcie3x1.asl | 12 ++++++++++++ .../Platform/Rockchip/Rk356x/AcpiTables/Pcie3x2.asl | 12 ++++++++++++ 2 files changed, 24 insertions(+) diff --git a/edk2-rockchip/Platform/Rockchip/Rk356x/AcpiTables/Pcie3x1.asl b/edk2-rockchip/Platform/Rockchip/Rk356x/AcpiTables/Pcie3x1.asl index a671bd2c6..7cb0e0a65 100755 --- a/edk2-rockchip/Platform/Rockchip/Rk356x/AcpiTables/Pcie3x1.asl +++ b/edk2-rockchip/Platform/Rockchip/Rk356x/AcpiTables/Pcie3x1.asl @@ -17,6 +17,18 @@ Device (PCI0) { Name (_SEG, 1) Name (_BBN, One) + OperationRegion (PGRF, SystemMemory, 0xFDCB8000, 0x100) + Field (PGRF, DWordAcc, NoLock, Preserve) { + Offset (0x80), + PSTA, 32 + } + Method (_STA, 0, Serialized) { + If (PSTA & 0x4000) { + Return (0xF) + } + Return (0x0) + } + Name (_PRT, Package() { Package (4) { 0x0FFFF, 0, Zero, 189 }, Package (4) { 0x0FFFF, 1, Zero, 189 }, diff --git a/edk2-rockchip/Platform/Rockchip/Rk356x/AcpiTables/Pcie3x2.asl b/edk2-rockchip/Platform/Rockchip/Rk356x/AcpiTables/Pcie3x2.asl index 4070cb57f..6eaa59570 100755 --- a/edk2-rockchip/Platform/Rockchip/Rk356x/AcpiTables/Pcie3x2.asl +++ b/edk2-rockchip/Platform/Rockchip/Rk356x/AcpiTables/Pcie3x2.asl @@ -17,6 +17,18 @@ Device (PCI0) { Name (_SEG, 2) Name (_BBN, One) + OperationRegion (PGRF, SystemMemory, 0xFDCB8000, 0x100) + Field (PGRF, DWordAcc, NoLock, Preserve) { + Offset (0x80), + PSTA, 32 + } + Method (_STA, 0, Serialized) { + If (PSTA & 0x4000) { + Return (0xF) + } + Return (0x0) + } + Name (_PRT, Package() { Package (4) { 0x0FFFF, 0, Zero, 194 }, Package (4) { 0x0FFFF, 1, Zero, 194 },