Re: [edk2] [PATCH 1/1] SD : Continue setting up sd even if SD_HIGH_SPEED is not supported

2019-03-17 Thread Loh, Tien Hock
OK noted with thanks Ard! 

Thanks
Tien Hock

-Original Message-
From: Ard Biesheuvel  
Sent: Friday, March 15, 2019 7:28 PM
To: Loh, Tien Hock 
Cc: edk2-devel@lists.01.org; Leif Lindholm ; 
thlo...@gmail.com
Subject: Re: [PATCH 1/1] SD : Continue setting up sd even if SD_HIGH_SPEED is 
not supported

On Fri, 22 Feb 2019 at 08:58,  wrote:
>
> From: "Loh, Tien Hock" 
>
> 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 

Thanks Tien Hock

Reviewed-by: Ard Biesheuvel 

I tweaked your patch slightly, to fix some whitespace errors, and downgrade the 
severity of the 'high speed not supported' message to DEBUG_INFO

Pushed as b0189eac00a5..c49f298d28cb
___
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel


Re: [edk2] [PATCH 1/1] SD : Continue setting up sd even if SD_HIGH_SPEED is not supported

2019-03-15 Thread Ard Biesheuvel
On Fri, 22 Feb 2019 at 08:58,  wrote:
>
> From: "Loh, Tien Hock" 
>
> 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 

Thanks Tien Hock

Reviewed-by: Ard Biesheuvel 

I tweaked your patch slightly, to fix some whitespace errors, and
downgrade the severity of the 'high speed not supported' message to
DEBUG_INFO

Pushed as b0189eac00a5..c49f298d28cb
___
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel


Re: [edk2] [PATCH 1/1] SD : Continue setting up sd even if SD_HIGH_SPEED is not supported

2019-03-14 Thread Loh, Tien Hock
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.lindh...@linaro.org; 
ard.biesheu...@linaro.org; thlo...@gmail.com
Cc: Loh, Tien Hock 
Subject: [PATCH 1/1] SD : Continue setting up sd even if SD_HIGH_SPEED is not 
supported

From: "Loh, Tien Hock" 

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 
---
 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) != 0x0100) {
 DEBUG((DEBUG_ERROR, "Problem switching SD card into high-speed 
mode\n"));
 return Status;
+}
   }
 }
   }
--
2.2.2

___
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel


[edk2] [PATCH 1/1] SD : Continue setting up sd even if SD_HIGH_SPEED is not supported

2019-02-21 Thread tien . hock . loh
From: "Loh, Tien Hock" 

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 
---
 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) != 0x0100) {
 DEBUG((DEBUG_ERROR, "Problem switching SD card into high-speed 
mode\n"));
 return Status;
+}
   }
 }
   }
-- 
2.2.2

___
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel


[edk2] [PATCH 1/1] SD : Continue setting up sd even if SD_HIGH_SPEED is not supported

2018-10-25 Thread tien . hock . loh
From: "Loh, Tien Hock" 

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 
---
 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) != 0x0100) {
 DEBUG((DEBUG_ERROR, "Problem switching SD card into high-speed 
mode\n"));
 return Status;
+}
   }
 }
   }
-- 
2.2.2

___
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel