From: "Loh, Tien Hock" <tien.hock.loh@intel.com>
To: "edk2-devel@lists.01.org" <edk2-devel@lists.01.org>,
"leif.lindholm@linaro.org" <leif.lindholm@linaro.org>,
"ard.biesheuvel@linaro.org" <ard.biesheuvel@linaro.org>,
"thloh85@gmail.com" <thloh85@gmail.com>
Subject: Re: [PATCH 1/1] SD : Continue setting up sd even if SD_HIGH_SPEED is not supported
Date: Fri, 15 Mar 2019 03:27:17 +0000 [thread overview]
Message-ID: <EF88013823EA1B42AC7142BA7DA05E0634C79C27@PGSMSX110.gar.corp.intel.com> (raw)
In-Reply-To: <1550822283-26255-1-git-send-email-tien.hock.loh@intel.com>
Hi Leif, Ard,
Any comments on this patch?
Thanks
Tien Hock
-----Original Message-----
From: Loh, Tien Hock
Sent: Friday, February 22, 2019 3:58 PM
To: edk2-devel@lists.01.org; leif.lindholm@linaro.org; ard.biesheuvel@linaro.org; thloh85@gmail.com
Cc: Loh, Tien Hock <tien.hock.loh@intel.com>
Subject: [PATCH 1/1] SD : Continue setting up sd even if SD_HIGH_SPEED is not supported
From: "Loh, Tien Hock" <tien.hock.loh@intel.com>
If SD doesn't support SD_HIGH_SPEED, function should still continue to setup SD to go into 4 bits more if it is supported.
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Loh Tien Hock <tien.hock.loh@intel.com>
---
EmbeddedPkg/Universal/MmcDxe/MmcIdentification.c | 20 ++++++++++----------
1 file changed, 10 insertions(+), 10 deletions(-)
diff --git a/EmbeddedPkg/Universal/MmcDxe/MmcIdentification.c b/EmbeddedPkg/Universal/MmcDxe/MmcIdentification.c
index f661a0c..8fd5c31 100755
--- a/EmbeddedPkg/Universal/MmcDxe/MmcIdentification.c
+++ b/EmbeddedPkg/Universal/MmcDxe/MmcIdentification.c
@@ -474,18 +474,17 @@ InitializeSdMmcDevice (
if (!(Buffer[3] & SD_HIGH_SPEED_SUPPORTED)) {
DEBUG ((DEBUG_ERROR, "%a : High Speed not supported by Card %r\n", __FUNCTION__, Status));
- return Status;
}
+ else {
+ Speed = SD_HIGH_SPEED;
- Speed = SD_HIGH_SPEED;
-
- /* SD Switch, Mode:1, Group:0, Value:1 */
- CmdArg = CreateSwitchCmdArgument(1, 0, 1);
- Status = MmcHost->SendCommand (MmcHost, MMC_CMD6, CmdArg);
- if (EFI_ERROR (Status)) {
- DEBUG ((DEBUG_ERROR, "%a (MMC_CMD6): Error and Status = %r\n", __FUNCTION__, Status));
- return Status;
- } else {
+ /* SD Switch, Mode:1, Group:0, Value:1 */
+ CmdArg = CreateSwitchCmdArgument(1, 0, 1);
+ Status = MmcHost->SendCommand (MmcHost, MMC_CMD6, CmdArg);
+ if (EFI_ERROR (Status)) {
+ DEBUG ((DEBUG_ERROR, "%a (MMC_CMD6): Error and Status = %r\n", __FUNCTION__, Status));
+ return Status;
+ } else {
Status = MmcHost->ReadBlockData (MmcHost, 0, SWITCH_CMD_DATA_LENGTH, Buffer);
if (EFI_ERROR (Status)) {
DEBUG ((DEBUG_ERROR, "%a (MMC_CMD6): ReadBlockData Error and Status = %r\n", __FUNCTION__, Status)); @@ -495,6 +494,7 @@ InitializeSdMmcDevice (
if ((Buffer[4] & SWITCH_CMD_SUCCESS_MASK) != 0x01000000) {
DEBUG((DEBUG_ERROR, "Problem switching SD card into high-speed mode\n"));
return Status;
+ }
}
}
}
--
2.2.2
next prev parent reply other threads:[~2019-03-15 3:28 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-02-22 7:58 [PATCH 1/1] SD : Continue setting up sd even if SD_HIGH_SPEED is not supported tien.hock.loh
2019-03-15 3:27 ` Loh, Tien Hock [this message]
2019-03-15 11:27 ` Ard Biesheuvel
2019-03-18 1:53 ` Loh, Tien Hock
-- strict thread matches above, loose matches on Subject: below --
2018-10-25 6:56 tien.hock.loh
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=EF88013823EA1B42AC7142BA7DA05E0634C79C27@PGSMSX110.gar.corp.intel.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