From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: mx.groups.io; dkim=pass header.i=@semihalf-com.20150623.gappssmtp.com header.s=20150623 header.b=cCkv/Frv; spf=none, err=SPF record not found (domain: semihalf.com, ip: 209.85.208.194, mailfrom: mw@semihalf.com) Received: from mail-lj1-f194.google.com (mail-lj1-f194.google.com [209.85.208.194]) by groups.io with SMTP; Fri, 27 Sep 2019 08:08:32 -0700 Received: by mail-lj1-f194.google.com with SMTP id l21so2851430lje.4 for ; Fri, 27 Sep 2019 08:08:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=semihalf-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id; bh=wTHHEeWDYGjBL/z441i9Si/tUQDQrTBjk0iyxiBYhcU=; b=cCkv/FrvoYTZakRgQj1zfZklOpExWxB0up6UPg5yXIdENqEMQIDv3djDg6A95PK/49 /SafaZb2KegJZvmWVIGFi+ofjr/gPdzZ/ZRawahFAD3zfymdJGJ1OZxXHuhJqHVMRqQ7 1qYNav/kr1AXHE7Tg6+1vH3cG1BAv9VWwZrVXYYtjjU6haGP2VBBM+chy3SvFOdOR8st JA/QFcYsDWuolE8lHHi18fGFPSUii2KB229knydRPaVbfpKO4sfbelHkn/E18w+HGBBs xi7sgCuu3GWsya4LXJ7vLoGZB2nEcI0jq2Lx5BrenuwkzvvW1ufjcpFdgZfI+ZAe7lFr t/bw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=wTHHEeWDYGjBL/z441i9Si/tUQDQrTBjk0iyxiBYhcU=; b=JaaNyyHIn6A4Bnx83+SP+m/wdMIRnk3iHEYkGYEgJndPu+cIHAiMVobE7gJOGQIq28 epMdT111ozW58RwO3AnzeSblBGwnOURqjMtWAic91qy1mFUBPFRMjul3daKdYHeJFG/o w2WMKKIWy2V7K7cnNxn6qThZltdJNusLvhGWqIhRaOcausSE5oiKL9P8MHc2jG+UqafY HaXl04yiVnyJQA8+Gpgzv+p4+7Z4Y2lzClhKIlgaYZwi7Kt8T4tADacFk0CJrdtgjY7X 8aZ5gcUnWarq0kgm2byg9BbFzS+vssM6q3lKu3CmH1h1ktq3i+QDuJ1DW3RZbEiE85Om XvRw== X-Gm-Message-State: APjAAAVmdfMRrhFJ6lHZhbcFZZDWs4SSs8Ez18HGxbVWFnsw5MOXE4cJ YNmleb4v7D99BUtSIf8U+KUjVnJ0n1byBA== X-Google-Smtp-Source: APXvYqwfcyyWCXSihWqO5MCFfZV74EfbkEaf3zp1Q1YBDzVmjHITFuLpnLyXHXgVNd/l2uv4F4iXrQ== X-Received: by 2002:a2e:4e12:: with SMTP id c18mr3183786ljb.47.1569596909535; Fri, 27 Sep 2019 08:08:29 -0700 (PDT) Return-Path: Received: from gilgamesh.semihalf.com (31-172-191-173.noc.fibertech.net.pl. [31.172.191.173]) by smtp.gmail.com with ESMTPSA id l5sm522076lfk.17.2019.09.27.08.08.28 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 27 Sep 2019 08:08:28 -0700 (PDT) From: "Marcin Wojtas" 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 Message-Id: <1569596894-9601-1-git-send-email-mw@semihalf.com> X-Mailer: git-send-email 2.7.4 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 --- 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