From: "Marcin Wojtas" <mw@semihalf.com>
To: devel@edk2.groups.io
Cc: leif.lindholm@linaro.org, ard.biesheuvel@linaro.org,
mw@semihalf.com, jsd@semihalf.com, jaz@semihalf.com,
kostap@marvell.com
Subject: [edk2-platforms: PATCH] Marvell/Drivers: XenonDxe: Use new enums for SD card initialization
Date: Fri, 27 Sep 2019 17:08:14 +0200 [thread overview]
Message-ID: <1569596894-9601-1-git-send-email-mw@semihalf.com> (raw)
MdeModulePkg/SdMmcHcDxe update to use rev 3 of SdMmcOverrideProtocol
reworked SD card initialization and added new enums describing lower
speeds. Include this in XenonDxe, which fixes Armada70x0Db SD interface.
Signed-off-by: Marcin Wojtas <mw@semihalf.com>
---
Silicon/Marvell/Drivers/SdMmc/XenonDxe/XenonSdhci.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/Silicon/Marvell/Drivers/SdMmc/XenonDxe/XenonSdhci.c b/Silicon/Marvell/Drivers/SdMmc/XenonDxe/XenonSdhci.c
index 7bfe240..6059cf8 100755
--- a/Silicon/Marvell/Drivers/SdMmc/XenonDxe/XenonSdhci.c
+++ b/Silicon/Marvell/Drivers/SdMmc/XenonDxe/XenonSdhci.c
@@ -360,6 +360,8 @@ XenonPhySlowMode (
if (((Timing == SdMmcUhsSdr50) ||
(Timing == SdMmcUhsSdr25) ||
(Timing == SdMmcUhsSdr12) ||
+ (Timing == SdMmcSdDs) ||
+ (Timing == SdMmcSdHs) ||
(Timing == SdMmcMmcHsDdr) ||
(Timing == SdMmcMmcHsSdr) ||
(Timing == SdMmcMmcLegacy)) && SlowMode) {
@@ -396,7 +398,7 @@ XenonSetPhy (
Var &= ~(EMMC5_1_FC_CMD_PD | EMMC5_1_FC_DQ_PD);
XenonHcRwMmio (PciIo, SD_BAR_INDEX, EMMC_PHY_PAD_CONTROL1, FALSE, SDHC_REG_SIZE_4B, &Var);
- if (Timing == SdMmcUhsSdr12) {
+ if (Timing == SdMmcUhsSdr12 || Timing == SdMmcSdDs) {
if (SlowMode) {
XenonHcRwMmio (PciIo, SD_BAR_INDEX, EMMC_PHY_TIMING_ADJUST, TRUE, SDHC_REG_SIZE_4B, &Var);
Var |= QSN_PHASE_SLOW_MODE_BIT;
@@ -749,7 +751,7 @@ XenonInit (
// Set lowest clock and the PHY for the initialization phase
XenonSetClk (PciIo, XENON_MMC_BASE_CLK);
- Status = XenonSetPhy (PciIo, SlowMode, TuningStepDivisor, SdMmcUhsSdr12);
+ Status = XenonSetPhy (PciIo, SlowMode, TuningStepDivisor, SdMmcSdDs);
if (EFI_ERROR (Status)) {
return Status;
}
--
2.7.4
next reply other threads:[~2019-09-27 15:08 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-09-27 15:08 Marcin Wojtas [this message]
2019-09-28 22:54 ` [edk2-platforms: PATCH] Marvell/Drivers: XenonDxe: Use new enums for SD card initialization Leif Lindholm
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-list from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1569596894-9601-1-git-send-email-mw@semihalf.com \
--to=devel@edk2.groups.io \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox