diff --git a/edk2-rockchip/Platform/FydeInnovations/FydetabDuo/FydetabDuo.dsc b/edk2-rockchip/Platform/FydeInnovations/FydetabDuo/FydetabDuo.dsc index caafb5a0..df88dc59 100644 --- a/edk2-rockchip/Platform/FydeInnovations/FydetabDuo/FydetabDuo.dsc +++ b/edk2-rockchip/Platform/FydeInnovations/FydetabDuo/FydetabDuo.dsc @@ -98,7 +98,7 @@ gRK3588TokenSpaceGuid.PcdI2S0Supported|TRUE # SD card detect signal is inverted - gRockchipTokenSpaceGuid.PcdRkSdmmcCardDetectInverted|TRUE + gRockchipTokenSpaceGuid.PcdRkSdmmcCardDetectBroken|TRUE ################################################################################ # diff --git a/edk2-rockchip/Silicon/Rockchip/Drivers/RkSdmmcDxe/RkSdmmcDxe.c b/edk2-rockchip/Silicon/Rockchip/Drivers/RkSdmmcDxe/RkSdmmcDxe.c index 337962cf..a890fc32 100644 --- a/edk2-rockchip/Silicon/Rockchip/Drivers/RkSdmmcDxe/RkSdmmcDxe.c +++ b/edk2-rockchip/Silicon/Rockchip/Drivers/RkSdmmcDxe/RkSdmmcDxe.c @@ -123,15 +123,12 @@ RkSdmmcCardDetect ( PresenceState = RkSdmmcGetCardPresenceState (); - if (PresenceState == RkSdmmcCardPresenceUnsupported) { + if ((PresenceState == RkSdmmcCardPresenceUnsupported) || + FixedPcdGetBool (PcdRkSdmmcCardDetectBroken)) { return TRUE; // let the driver do software detection } - if (FixedPcdGetBool (PcdRkSdmmcCardDetectInverted)) { - return PresenceState != RkSdmmcCardPresent; - } else { - return PresenceState == RkSdmmcCardPresent; - } + return PresenceState == RkSdmmcCardPresent; } STATIC PLATFORM_DW_MMC_PROTOCOL mDwMmcDeviceProtocol = { diff --git a/edk2-rockchip/Silicon/Rockchip/Drivers/RkSdmmcDxe/RkSdmmcDxe.inf b/edk2-rockchip/Silicon/Rockchip/Drivers/RkSdmmcDxe/RkSdmmcDxe.inf index 26dcedba..61433031 100644 --- a/edk2-rockchip/Silicon/Rockchip/Drivers/RkSdmmcDxe/RkSdmmcDxe.inf +++ b/edk2-rockchip/Silicon/Rockchip/Drivers/RkSdmmcDxe/RkSdmmcDxe.inf @@ -43,7 +43,7 @@ [Pcd] gRockchipTokenSpaceGuid.PcdRkSdmmcBaseAddress - gRockchipTokenSpaceGuid.PcdRkSdmmcCardDetectInverted + gRockchipTokenSpaceGuid.PcdRkSdmmcCardDetectBroken [Depex] TRUE diff --git a/edk2-rockchip/Silicon/Rockchip/RockchipPkg.dec b/edk2-rockchip/Silicon/Rockchip/RockchipPkg.dec index d48e1a12..440d6ae1 100644 --- a/edk2-rockchip/Silicon/Rockchip/RockchipPkg.dec +++ b/edk2-rockchip/Silicon/Rockchip/RockchipPkg.dec @@ -62,7 +62,7 @@ gRockchipTokenSpaceGuid.PcdRtc8563Bus|0|UINT8|0x0200000E gRockchipTokenSpaceGuid.PcdRkSdmmcBaseAddress|0x0|UINT32|0x40000030 - gRockchipTokenSpaceGuid.PcdRkSdmmcCardDetectInverted|FALSE|BOOLEAN|0x40000031 + gRockchipTokenSpaceGuid.PcdRkSdmmcCardDetectBroken|FALSE|BOOLEAN|0x40000031 gRockchipTokenSpaceGuid.PcdDwcSdhciBaseAddress|0x0|UINT32|0x40000035 gRockchipTokenSpaceGuid.PcdDwcSdhciForceHighSpeed|FALSE|BOOLEAN|0x40000036