summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArd Biesheuvel <ard.biesheuvel@linaro.org>2018-02-08 10:08:23 +0000
committerArd Biesheuvel <ard.biesheuvel@linaro.org>2018-02-08 10:23:10 +0000
commit94bbda98f27edf05795add1343262164875ea773 (patch)
tree5b9b8222b548fa9530f7c03d8e4f3a8f09f739c5
parentd82055b43db4dc16d44d4c0ef55fa16e244977f6 (diff)
downloadedk2-platforms-94bbda98f27edf05795add1343262164875ea773.tar.xz
Silicon/SynQuacer/PlatformDxe: disable eMMC DDR50 support
We already disable SDR104 support on the SynQuacer eMMC controller to work around the need for a special tuning quirk that is difficult to implement without modifying the generic driver, even in the presence of a SD/MMC override protocol designed to carry such quirks. Unfortunately, as it turns out, DDR50 does not work either with the particular 8 GB Kingston part that has been fitted on the rev0.2/0.3 96board samples. Since the mode UEFI drives the eMMC in is independent from what the OS chooses, and the fact that you would not use eMMC in the first place if performance was a major concern, let's just disable DDR50 as well, and fall back to SDR50 mode. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
-rw-r--r--Silicon/Socionext/SynQuacer/Drivers/PlatformDxe/Emmc.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/Silicon/Socionext/SynQuacer/Drivers/PlatformDxe/Emmc.c b/Silicon/Socionext/SynQuacer/Drivers/PlatformDxe/Emmc.c
index c40b30929d..7284ea6a7c 100644
--- a/Silicon/Socionext/SynQuacer/Drivers/PlatformDxe/Emmc.c
+++ b/Silicon/Socionext/SynQuacer/Drivers/PlatformDxe/Emmc.c
@@ -52,6 +52,7 @@
#define SYNQUACER_CLOCK_CTRL_VAL 0xBC01
#define SD_HC_CAP_SDR104 BIT33
+#define SD_HC_CAP_DDR50 BIT34
#define ESD_CONTROL_RESET_DELAY (20 * 1000)
#define IO_CONTROL2_SETTLE_US 3000
@@ -93,9 +94,11 @@ SynQuacerSdMmcCapability (
//
// Clear the SDR104 capability bit. This avoids the need for a HS200 tuning
// quirk that is difficult to support using the generic driver.
+ // Clear the DDR50 bit as well to work around an issue with the Kingston
+ // EMMC08G-M325-A52 part that was fitted on 96board DeveloperBox samples.
//
Capability = ReadUnaligned64 (SdMmcHcSlotCapability);
- Capability &= ~(UINT64)SD_HC_CAP_SDR104;
+ Capability &= ~(UINT64)(SD_HC_CAP_SDR104 | SD_HC_CAP_DDR50);
WriteUnaligned64 (SdMmcHcSlotCapability, Capability);
return EFI_SUCCESS;