Skip to content

Commit 416b2fa

Browse files
committed
FydetabDuo: Disable SD card detection
There's a trick to boot from SD on this tablet: the card tray has to be opened slightly, just enough so that the card detect pin is released while the card itself still makes contact with the data pins. Given that both states can mean "connected", UEFI should no longer rely on this signal to detect card presence. Signed-off-by: Mario Bălănică <[email protected]>
1 parent 915093f commit 416b2fa

File tree

4 files changed

+6
-9
lines changed

4 files changed

+6
-9
lines changed

edk2-rockchip/Platform/FydeInnovations/FydetabDuo/FydetabDuo.dsc

+1-1
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@
9898
gRK3588TokenSpaceGuid.PcdI2S0Supported|TRUE
9999

100100
# SD card detect signal is inverted
101-
gRockchipTokenSpaceGuid.PcdRkSdmmcCardDetectInverted|TRUE
101+
gRockchipTokenSpaceGuid.PcdRkSdmmcCardDetectBroken|TRUE
102102

103103
################################################################################
104104
#

edk2-rockchip/Silicon/Rockchip/Drivers/RkSdmmcDxe/RkSdmmcDxe.c

+3-6
Original file line numberDiff line numberDiff line change
@@ -123,15 +123,12 @@ RkSdmmcCardDetect (
123123

124124
PresenceState = RkSdmmcGetCardPresenceState ();
125125

126-
if (PresenceState == RkSdmmcCardPresenceUnsupported) {
126+
if ((PresenceState == RkSdmmcCardPresenceUnsupported) ||
127+
FixedPcdGetBool (PcdRkSdmmcCardDetectBroken)) {
127128
return TRUE; // let the driver do software detection
128129
}
129130

130-
if (FixedPcdGetBool (PcdRkSdmmcCardDetectInverted)) {
131-
return PresenceState != RkSdmmcCardPresent;
132-
} else {
133-
return PresenceState == RkSdmmcCardPresent;
134-
}
131+
return PresenceState == RkSdmmcCardPresent;
135132
}
136133

137134
STATIC PLATFORM_DW_MMC_PROTOCOL mDwMmcDeviceProtocol = {

edk2-rockchip/Silicon/Rockchip/Drivers/RkSdmmcDxe/RkSdmmcDxe.inf

+1-1
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343

4444
[Pcd]
4545
gRockchipTokenSpaceGuid.PcdRkSdmmcBaseAddress
46-
gRockchipTokenSpaceGuid.PcdRkSdmmcCardDetectInverted
46+
gRockchipTokenSpaceGuid.PcdRkSdmmcCardDetectBroken
4747

4848
[Depex]
4949
TRUE

edk2-rockchip/Silicon/Rockchip/RockchipPkg.dec

+1-1
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@
6262
gRockchipTokenSpaceGuid.PcdRtc8563Bus|0|UINT8|0x0200000E
6363

6464
gRockchipTokenSpaceGuid.PcdRkSdmmcBaseAddress|0x0|UINT32|0x40000030
65-
gRockchipTokenSpaceGuid.PcdRkSdmmcCardDetectInverted|FALSE|BOOLEAN|0x40000031
65+
gRockchipTokenSpaceGuid.PcdRkSdmmcCardDetectBroken|FALSE|BOOLEAN|0x40000031
6666

6767
gRockchipTokenSpaceGuid.PcdDwcSdhciBaseAddress|0x0|UINT32|0x40000035
6868
gRockchipTokenSpaceGuid.PcdDwcSdhciForceHighSpeed|FALSE|BOOLEAN|0x40000036

0 commit comments

Comments
 (0)