]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Bus/Sd/EmmcDxe/EmmcDxe.c
MdeModulePkg/EmmcDxe: Implementation of Disk Information Protocol
[mirror_edk2.git] / MdeModulePkg / Bus / Sd / EmmcDxe / EmmcDxe.c
index 5040882d622fe3f31e547b867e915e046ce71320..4ebced0b949751c953bf91933a3107c4ae5f892e 100644 (file)
@@ -4,7 +4,7 @@
   It produces BlockIo, BlockIo2 and StorageSecurity protocols to allow upper layer\r
   access the EMMC device.\r
 \r
   It produces BlockIo, BlockIo2 and StorageSecurity protocols to allow upper layer\r
   access the EMMC device.\r
 \r
-  Copyright (c) 2015 - 2016, Intel Corporation. All rights reserved.<BR>\r
+  Copyright (c) 2015 - 2017, Intel Corporation. All rights reserved.<BR>\r
   This program and the accompanying materials\r
   are licensed and made available under the terms and conditions of the BSD License\r
   which accompanies this distribution.  The full text of the license may be found at\r
   This program and the accompanying materials\r
   are licensed and made available under the terms and conditions of the BSD License\r
   which accompanies this distribution.  The full text of the license may be found at\r
@@ -73,6 +73,13 @@ EMMC_PARTITION mEmmcPartitionTemplate = {
     1,\r
     EmmcEraseBlocks\r
   },\r
     1,\r
     EmmcEraseBlocks\r
   },\r
+  {                            // DiskInfo\r
+    EFI_DISK_INFO_SD_MMC_INTERFACE_GUID,\r
+    EmmcDiskInfoInquiry,\r
+    EmmcDiskInfoIdentify,\r
+    EmmcDiskInfoSenseData,\r
+    EmmcDiskInfoWhichIde\r
+  },\r
   {\r
     NULL,\r
     NULL\r
   {\r
     NULL,\r
     NULL\r
@@ -454,6 +461,8 @@ InstallProtocolOnPartition (
                       &Partition->BlockIo2,\r
                       &gEfiEraseBlockProtocolGuid,\r
                       &Partition->EraseBlock,\r
                       &Partition->BlockIo2,\r
                       &gEfiEraseBlockProtocolGuid,\r
                       &Partition->EraseBlock,\r
+                      &gEfiDiskInfoProtocolGuid,\r
+                      &Partition->DiskInfo,\r
                       NULL\r
                       );\r
       if (EFI_ERROR (Status)) {\r
                       NULL\r
                       );\r
       if (EFI_ERROR (Status)) {\r
@@ -481,6 +490,8 @@ InstallProtocolOnPartition (
                  &Partition->BlockIo2,\r
                  &gEfiEraseBlockProtocolGuid,\r
                  &Partition->EraseBlock,\r
                  &Partition->BlockIo2,\r
                  &gEfiEraseBlockProtocolGuid,\r
                  &Partition->EraseBlock,\r
+                 &gEfiDiskInfoProtocolGuid,\r
+                 &Partition->DiskInfo,\r
                  NULL\r
                  );\r
           goto Error;\r
                  NULL\r
                  );\r
           goto Error;\r
@@ -1104,6 +1115,8 @@ EmmcDxeDriverBindingStop (
                     &Partition->BlockIo2,\r
                     &gEfiEraseBlockProtocolGuid,\r
                     &Partition->EraseBlock,\r
                     &Partition->BlockIo2,\r
                     &gEfiEraseBlockProtocolGuid,\r
                     &Partition->EraseBlock,\r
+                    &gEfiDiskInfoProtocolGuid,\r
+                    &Partition->DiskInfo,\r
                     NULL\r
                     );\r
     if (EFI_ERROR (Status)) {\r
                     NULL\r
                     );\r
     if (EFI_ERROR (Status)) {\r