summaryrefslogtreecommitdiffstats
path: root/MdeModulePkg/Include/Protocol
diff options
context:
space:
mode:
authorFeng Tian <feng.tian@intel.com>2015-05-28 07:42:05 +0000
committererictian <erictian@Edk2>2015-05-28 07:42:05 +0000
commit095f07799368af011b70db3c87ff5fffaefc313c (patch)
treede64dccebf6d3b5654e09dffe04d794d14e3cc40 /MdeModulePkg/Include/Protocol
parent500e2ac246e14dd4f861026db112248252f47246 (diff)
downloadedk2-095f07799368af011b70db3c87ff5fffaefc313c.tar.gz
edk2-095f07799368af011b70db3c87ff5fffaefc313c.tar.bz2
edk2-095f07799368af011b70db3c87ff5fffaefc313c.zip
MdeModulePkg/Ufs: Refine EDKII_UFS_HOST_CONTROLLER_PROTOCOL interface
The EDKII_UFS_HOST_CONTROLLER_PROTOCOL is refined to provide interfaces accessing UFS host controller MMIO register. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Feng Tian <feng.tian@intel.com> Reviewed-by: Star Zeng <star.zeng@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17533 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'MdeModulePkg/Include/Protocol')
-rw-r--r--MdeModulePkg/Include/Protocol/UfsHostController.h40
1 files changed, 39 insertions, 1 deletions
diff --git a/MdeModulePkg/Include/Protocol/UfsHostController.h b/MdeModulePkg/Include/Protocol/UfsHostController.h
index 83db1a7bbd..909c981729 100644
--- a/MdeModulePkg/Include/Protocol/UfsHostController.h
+++ b/MdeModulePkg/Include/Protocol/UfsHostController.h
@@ -2,7 +2,7 @@
EDKII Universal Flash Storage Host Controller Protocol.
-Copyright (c) 2014, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2014 - 2015, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials are licensed and made available under
the terms and conditions of the BSD License that accompanies this distribution.
The full text of the license may be found at
@@ -185,6 +185,42 @@ EFI_STATUS
IN EDKII_UFS_HOST_CONTROLLER_PROTOCOL *This
);
+typedef enum {
+ EfiUfsHcWidthUint8 = 0,
+ EfiUfsHcWidthUint16,
+ EfiUfsHcWidthUint32,
+ EfiUfsHcWidthUint64,
+ EfiUfsHcWidthMaximum
+} EDKII_UFS_HOST_CONTROLLER_PROTOCOL_WIDTH;
+
+/**
+ Enable a UFS bus driver to access UFS MMIO registers in the UFS Host Controller memory space.
+
+ @param This A pointer to the EDKII_UFS_HOST_CONTROLLER_PROTOCOL instance.
+ @param Width Signifies the width of the memory operations.
+ @param Offset The offset within the UFS Host Controller MMIO space to start the
+ memory operation.
+ @param Count The number of memory operations to perform.
+ @param Buffer For read operations, the destination buffer to store the results.
+ For write operations, the source buffer to write data from.
+
+ @retval EFI_SUCCESS The data was read from or written to the UFS host controller.
+ @retval EFI_UNSUPPORTED The address range specified by Offset, Width, and Count is not
+ valid for the UFS Host Controller memory space.
+ @retval EFI_OUT_OF_RESOURCES The request could not be completed due to a lack of resources.
+ @retval EFI_INVALID_PARAMETER One or more parameters are invalid.
+
+**/
+typedef
+EFI_STATUS
+(EFIAPI *EDKII_UFS_HC_MMIO_READ_WRITE)(
+ IN EDKII_UFS_HOST_CONTROLLER_PROTOCOL *This,
+ IN EDKII_UFS_HOST_CONTROLLER_PROTOCOL_WIDTH Width,
+ IN UINT64 Offset,
+ IN UINTN Count,
+ IN OUT VOID *Buffer
+ );
+
///
/// UFS Host Controller Protocol structure.
///
@@ -195,6 +231,8 @@ struct _EDKII_UFS_HOST_CONTROLLER_PROTOCOL {
EDKII_UFS_HC_MAP Map;
EDKII_UFS_HC_UNMAP Unmap;
EDKII_UFS_HC_FLUSH Flush;
+ EDKII_UFS_HC_MMIO_READ_WRITE Read;
+ EDKII_UFS_HC_MMIO_READ_WRITE Write;
};
///