Skip to content

Commit

Permalink
EmbeddedPkg: rename gEfiMmcHostProtocolGuid to gEmbeddedMmcHostProtoc…
Browse files Browse the repository at this point in the history
…olGuid

In EDK2, identifiers carrying the EFI prefix are reserved for ones
that are defined in the UEFI or PI specifications.

Since the MMC host protocol defined in EmbeddedPkg is not the one that
the UEFI spec defines, and given the confusion around this, let's rename
it to from gEfiMmcHostProtocolGuid to gEmbeddedMmcHostProtocolGuid.

Signed-off-by: Ard Biesheuvel <ard.biesheuvel@arm.com>
Reviewed-by: Leif Lindholm <leif@nuviainc.com>
  • Loading branch information
Ard Biesheuvel authored and mergify[bot] committed Apr 30, 2020
1 parent 13406bd commit 2a7a122
Show file tree
Hide file tree
Showing 8 changed files with 13 additions and 13 deletions.
2 changes: 1 addition & 1 deletion ArmPlatformPkg/Drivers/PL180MciDxe/PL180Mci.c
Expand Up @@ -554,7 +554,7 @@ PL180MciDxeInitialize (
//Publish Component Name, BlockIO protocol interfaces
Status = gBS->InstallMultipleProtocolInterfaces (
&Handle,
&gEfiMmcHostProtocolGuid, &gMciHost,
&gEmbeddedMmcHostProtocolGuid, &gMciHost,
NULL
);
ASSERT_EFI_ERROR (Status);
Expand Down
2 changes: 1 addition & 1 deletion ArmPlatformPkg/Drivers/PL180MciDxe/PL180MciDxe.inf
Expand Up @@ -36,7 +36,7 @@
[Protocols]
gEfiCpuArchProtocolGuid
gEfiDevicePathProtocolGuid
gEfiMmcHostProtocolGuid
gEmbeddedMmcHostProtocolGuid

[Pcd]
gArmPlatformTokenSpaceGuid.PcdPL180SysMciRegAddress
Expand Down
2 changes: 1 addition & 1 deletion EmbeddedPkg/Drivers/DwEmmcDxe/DwEmmcDxe.c
Expand Up @@ -679,7 +679,7 @@ DwEmmcDxeInitialize (
//Publish Component Name, BlockIO protocol interfaces
Status = gBS->InstallMultipleProtocolInterfaces (
&Handle,
&gEfiMmcHostProtocolGuid, &gMciHost,
&gEmbeddedMmcHostProtocolGuid, &gMciHost,
NULL
);
ASSERT_EFI_ERROR (Status);
Expand Down
2 changes: 1 addition & 1 deletion EmbeddedPkg/Drivers/DwEmmcDxe/DwEmmcDxe.inf
Expand Up @@ -37,7 +37,7 @@
[Protocols]
gEfiCpuArchProtocolGuid
gEfiDevicePathProtocolGuid
gEfiMmcHostProtocolGuid
gEmbeddedMmcHostProtocolGuid

[Pcd]
gEmbeddedTokenSpaceGuid.PcdDwEmmcDxeBaseAddress
Expand Down
2 changes: 1 addition & 1 deletion EmbeddedPkg/EmbeddedPkg.dec
Expand Up @@ -71,7 +71,7 @@
gEmbeddedExternalDeviceProtocolGuid = { 0x735F8C64, 0xD696, 0x44D0, { 0xBD, 0xF2, 0x44, 0x7F, 0xD0, 0x5A, 0x54, 0x06 }}
gEmbeddedGpioProtocolGuid = { 0x17a0a3d7, 0xc0a5, 0x4635, { 0xbb, 0xd5, 0x07, 0x21, 0x87, 0xdf, 0xe2, 0xee }}
gPeCoffLoaderProtocolGuid = { 0xB323179B, 0x97FB, 0x477E, { 0xB0, 0xFE, 0xD8, 0x85, 0x91, 0xFA, 0x11, 0xAB } }
gEfiMmcHostProtocolGuid = { 0x3e591c00, 0x9e4a, 0x11df, {0x92, 0x44, 0x00, 0x02, 0xA5, 0xD5, 0xC5, 0x1B }}
gEmbeddedMmcHostProtocolGuid = { 0x3e591c00, 0x9e4a, 0x11df, {0x92, 0x44, 0x00, 0x02, 0xA5, 0xD5, 0xC5, 0x1B }}
gAndroidFastbootTransportProtocolGuid = { 0x74bd9fe0, 0x8902, 0x11e3, {0xb9, 0xd3, 0xf7, 0x22, 0x38, 0xfc, 0x9a, 0x31}}
gAndroidFastbootPlatformProtocolGuid = { 0x524685a0, 0x89a0, 0x11e3, {0x9d, 0x4d, 0xbf, 0xa9, 0xf6, 0xa4, 0x03, 0x08}}
gUsbDeviceProtocolGuid = { 0x021bd2ca, 0x51d2, 0x11e3, {0x8e, 0x56, 0xb7, 0x54, 0x17, 0xc7, 0x0b, 0x44 }}
Expand Down
4 changes: 2 additions & 2 deletions EmbeddedPkg/Include/Protocol/MmcHost.h
Expand Up @@ -13,7 +13,7 @@
///
/// Global ID for the MMC Host Protocol
///
#define EFI_MMC_HOST_PROTOCOL_GUID \
#define EMBEDDED_MMC_HOST_PROTOCOL_GUID \
{ 0x3e591c00, 0x9e4a, 0x11df, {0x92, 0x44, 0x00, 0x02, 0xA5, 0xD5, 0xC5, 0x1B } }

#define MMC_RESPONSE_TYPE_R1 0
Expand Down Expand Up @@ -178,7 +178,7 @@ struct _EFI_MMC_HOST_PROTOCOL {
#define MMC_HOST_HAS_ISMULTIBLOCK(Host) (Host->Revision >= MMC_HOST_PROTOCOL_REVISION && \
Host->IsMultiBlock != NULL)

extern EFI_GUID gEfiMmcHostProtocolGuid;
extern EFI_GUID gEmbeddedMmcHostProtocolGuid;

#endif

10 changes: 5 additions & 5 deletions EmbeddedPkg/Universal/MmcDxe/Mmc.c
Expand Up @@ -216,7 +216,7 @@ MmcDriverBindingSupported (
//
Status = gBS->OpenProtocol (
Controller,
&gEfiMmcHostProtocolGuid,
&gEmbeddedMmcHostProtocolGuid,
(VOID **) &MmcHost,
This->DriverBindingHandle,
Controller,
Expand All @@ -234,7 +234,7 @@ MmcDriverBindingSupported (
//
gBS->CloseProtocol (
Controller,
&gEfiMmcHostProtocolGuid,
&gEmbeddedMmcHostProtocolGuid,
This->DriverBindingHandle,
Controller
);
Expand Down Expand Up @@ -275,7 +275,7 @@ MmcDriverBindingStart (
//
Status = gBS->OpenProtocol (
Controller,
&gEfiMmcHostProtocolGuid,
&gEmbeddedMmcHostProtocolGuid,
(VOID **) &MmcHost,
This->DriverBindingHandle,
Controller,
Expand Down Expand Up @@ -326,10 +326,10 @@ MmcDriverBindingStop (
MmcHostInstance = MMC_HOST_INSTANCE_FROM_LINK(CurrentLink);
ASSERT(MmcHostInstance != NULL);

// Close gEfiMmcHostProtocolGuid
// Close gEmbeddedMmcHostProtocolGuid
Status = gBS->CloseProtocol (
Controller,
&gEfiMmcHostProtocolGuid,
&gEmbeddedMmcHostProtocolGuid,
This->DriverBindingHandle,
Controller
);
Expand Down
2 changes: 1 addition & 1 deletion EmbeddedPkg/Universal/MmcDxe/MmcDxe.inf
Expand Up @@ -38,7 +38,7 @@
gEfiDiskIoProtocolGuid
gEfiBlockIoProtocolGuid
gEfiDevicePathProtocolGuid
gEfiMmcHostProtocolGuid
gEmbeddedMmcHostProtocolGuid
gEfiDriverDiagnostics2ProtocolGuid

[Depex]
Expand Down

0 comments on commit 2a7a122

Please sign in to comment.