public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* [PATCH 2/4] EmbeddedPkg: Fix response check flag
@ 2019-05-09  7:49 Loh, Tien Hock
  2019-05-22  7:57 ` [edk2-devel] " Loh, Tien Hock
  0 siblings, 1 reply; 2+ messages in thread
From: Loh, Tien Hock @ 2019-05-09  7:49 UTC (permalink / raw)
  To: devel, thloh85; +Cc: Tien Hock, Loh, Leif Lindholm, Ard Biesheuvel

From: "Tien Hock, Loh" <tien.hock.loh@intel.com>

Do not send CRC response check if the MMC command does not support CRC
response

Signed-off-by: Tien Hock, Loh <tien.hock.loh@intel.com>
Cc: Leif Lindholm <leif.lindholm@linaro.org>
Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
---
 EmbeddedPkg/Drivers/DwEmmcDxe/DwEmmcDxe.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/EmbeddedPkg/Drivers/DwEmmcDxe/DwEmmcDxe.c b/EmbeddedPkg/Drivers/DwEmmcDxe/DwEmmcDxe.c
index c44e310c04..e0068655ca 100644
--- a/EmbeddedPkg/Drivers/DwEmmcDxe/DwEmmcDxe.c
+++ b/EmbeddedPkg/Drivers/DwEmmcDxe/DwEmmcDxe.c
@@ -385,7 +385,7 @@ DwEmmcSendCommand (
            BIT_CMD_READ | BIT_CMD_WAIT_PRVDATA_COMPLETE;
     break;
   default:
-    Cmd = BIT_CMD_RESPONSE_EXPECT | BIT_CMD_CHECK_RESPONSE_CRC;
+    Cmd = BIT_CMD_RESPONSE_EXPECT;
     break;
   }
 
@@ -396,6 +396,10 @@ DwEmmcSendCommand (
   else
     IsACmd = FALSE;
 
+  if (!(MmcCmd & MMC_CMD_NO_CRC_RESPONSE)) {
+    Cmd |= BIT_CMD_CHECK_RESPONSE_CRC;
+  }
+
   if (IsPendingReadCommand (Cmd) || IsPendingWriteCommand (Cmd)) {
     mDwEmmcCommand = Cmd;
     mDwEmmcArgument = Argument;
-- 
2.19.0


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [edk2-devel] [PATCH 2/4] EmbeddedPkg: Fix response check flag
  2019-05-09  7:49 [PATCH 2/4] EmbeddedPkg: Fix response check flag Loh, Tien Hock
@ 2019-05-22  7:57 ` Loh, Tien Hock
  0 siblings, 0 replies; 2+ messages in thread
From: Loh, Tien Hock @ 2019-05-22  7:57 UTC (permalink / raw)
  To: Loh, Tien Hock, devel

[-- Attachment #1: Type: text/plain, Size: 55 bytes --]

Hi Ard, Leif,

Can you help review this?

Thanks!

[-- Attachment #2: Type: text/html, Size: 71 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-05-22  7:57 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-05-09  7:49 [PATCH 2/4] EmbeddedPkg: Fix response check flag Loh, Tien Hock
2019-05-22  7:57 ` [edk2-devel] " Loh, Tien Hock

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox