[edk2,v5,5/9] MmcDxe: add interface to change io width and speed

Message ID 1479019678-12621-6-git-send-email-haojian.zhuang@linaro.org
State New
Headers show

Commit Message

Haojian Zhuang Nov. 13, 2016, 6:47 a.m.
By default, MMC is initialized with 1-bit mode and less than 400KHz bus
clock. It causes MMC working inefficiently.

Add the interface to change the bus width and speed.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Haojian Zhuang <haojian.zhuang@linaro.org>

Tested-by: Ryan Harkin <ryan.harkin@linaro.org>

---
 EmbeddedPkg/Include/Protocol/MmcHost.h | 8 ++++++++
 1 file changed, 8 insertions(+)

-- 
2.7.4

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

Comments

Leif Lindholm Nov. 14, 2016, 4:12 p.m. | #1
On Sun, Nov 13, 2016 at 02:47:54PM +0800, Haojian Zhuang wrote:
> By default, MMC is initialized with 1-bit mode and less than 400KHz bus

> clock. It causes MMC working inefficiently.

> 

> Add the interface to change the bus width and speed.

> 

> Contributed-under: TianoCore Contribution Agreement 1.0

> Signed-off-by: Haojian Zhuang <haojian.zhuang@linaro.org>

> Tested-by: Ryan Harkin <ryan.harkin@linaro.org>


So, I have no objections to this one, but on its own it provides no
new functionality, and the definition it introduces is changed in the
next patch. Can you squash this into 6/9 and add a line to the commit
message please?

/
    Leif

> ---

>  EmbeddedPkg/Include/Protocol/MmcHost.h | 8 ++++++++

>  1 file changed, 8 insertions(+)

> 

> diff --git a/EmbeddedPkg/Include/Protocol/MmcHost.h b/EmbeddedPkg/Include/Protocol/MmcHost.h

> index 89f2e80..a242291 100644

> --- a/EmbeddedPkg/Include/Protocol/MmcHost.h

> +++ b/EmbeddedPkg/Include/Protocol/MmcHost.h

> @@ -131,6 +131,12 @@ typedef EFI_STATUS (EFIAPI *MMC_WRITEBLOCKDATA) (

>    IN  UINT32                    *Buffer

>    );

>  

> +typedef EFI_STATUS (EFIAPI *MMC_SETIOS) (

> +  IN  EFI_MMC_HOST_PROTOCOL     *This,

> +  IN  UINT32                    BusClockRate,

> +  IN  UINT32                    BusWidth

> +  );

> +

>  

>  struct _EFI_MMC_HOST_PROTOCOL {

>  

> @@ -147,6 +153,8 @@ struct _EFI_MMC_HOST_PROTOCOL {

>    MMC_READBLOCKDATA       ReadBlockData;

>    MMC_WRITEBLOCKDATA      WriteBlockData;

>  

> +  MMC_SETIOS              SetIos;

> +

>  };

>  

>  #define MMC_HOST_PROTOCOL_REVISION    0x00010001    // 1.1

> -- 

> 2.7.4

> 

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

Patch hide | download patch | download mbox

diff --git a/EmbeddedPkg/Include/Protocol/MmcHost.h b/EmbeddedPkg/Include/Protocol/MmcHost.h
index 89f2e80..a242291 100644
--- a/EmbeddedPkg/Include/Protocol/MmcHost.h
+++ b/EmbeddedPkg/Include/Protocol/MmcHost.h
@@ -131,6 +131,12 @@  typedef EFI_STATUS (EFIAPI *MMC_WRITEBLOCKDATA) (
   IN  UINT32                    *Buffer
   );
 
+typedef EFI_STATUS (EFIAPI *MMC_SETIOS) (
+  IN  EFI_MMC_HOST_PROTOCOL     *This,
+  IN  UINT32                    BusClockRate,
+  IN  UINT32                    BusWidth
+  );
+
 
 struct _EFI_MMC_HOST_PROTOCOL {
 
@@ -147,6 +153,8 @@  struct _EFI_MMC_HOST_PROTOCOL {
   MMC_READBLOCKDATA       ReadBlockData;
   MMC_WRITEBLOCKDATA      WriteBlockData;
 
+  MMC_SETIOS              SetIos;
+
 };
 
 #define MMC_HOST_PROTOCOL_REVISION    0x00010001    // 1.1