]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Bus/Sd/SdDxe/SdDxe.h
MdeModulePkg/Sd: add Erase Block support on sd/emmc device
[mirror_edk2.git] / MdeModulePkg / Bus / Sd / SdDxe / SdDxe.h
index ca1609e900d07cee0cda27b2bb23c1a1ebaf4eb0..0ba72b7f9ce1977e9112491b52d94a8df0dd4981 100644 (file)
@@ -4,7 +4,7 @@
   This file defines common data structures, macro definitions and some module\r
   internal function header files.\r
 \r
-  Copyright (c) 2015, Intel Corporation. All rights reserved.<BR>\r
+  Copyright (c) 2015 - 2016, 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
@@ -24,6 +24,7 @@
 #include <Protocol/SdMmcPassThru.h>\r
 #include <Protocol/BlockIo.h>\r
 #include <Protocol/BlockIo2.h>\r
+#include <Protocol/EraseBlock.h>\r
 \r
 #include <Protocol/DevicePath.h>\r
 \r
@@ -53,6 +54,9 @@ extern EFI_COMPONENT_NAME2_PROTOCOL     gSdDxeComponentName2;
 #define SD_DEVICE_DATA_FROM_BLKIO2(a) \\r
     CR(a, SD_DEVICE, BlockIo2, SD_DEVICE_SIGNATURE)\r
 \r
+#define SD_DEVICE_DATA_FROM_ERASEBLK(a) \\r
+    CR(a, SD_DEVICE, EraseBlock, SD_DEVICE_SIGNATURE)\r
+\r
 //\r
 // Take 2.5 seconds as generic time out value, 1 microsecond as unit.\r
 //\r
@@ -95,6 +99,7 @@ struct _SD_DEVICE {
   EFI_BLOCK_IO_PROTOCOL                 BlockIo;\r
   EFI_BLOCK_IO2_PROTOCOL                BlockIo2;\r
   EFI_BLOCK_IO_MEDIA                    BlockMedia;\r
+  EFI_ERASE_BLOCK_PROTOCOL              EraseBlock;\r
 \r
   LIST_ENTRY                            Queue;\r
 \r