summaryrefslogtreecommitdiff
path: root/Platform/BroxtonPlatformPkg/Common/Include/Protocol/SpiBus.h
diff options
context:
space:
mode:
Diffstat (limited to 'Platform/BroxtonPlatformPkg/Common/Include/Protocol/SpiBus.h')
-rw-r--r--Platform/BroxtonPlatformPkg/Common/Include/Protocol/SpiBus.h56
1 files changed, 56 insertions, 0 deletions
diff --git a/Platform/BroxtonPlatformPkg/Common/Include/Protocol/SpiBus.h b/Platform/BroxtonPlatformPkg/Common/Include/Protocol/SpiBus.h
new file mode 100644
index 0000000000..1c43515c8a
--- /dev/null
+++ b/Platform/BroxtonPlatformPkg/Common/Include/Protocol/SpiBus.h
@@ -0,0 +1,56 @@
+/** @file
+ SPI Bus Protocol.
+
+ Copyright (c) 2012 - 2016, 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
+ which accompanies this distribution. The full text of the license may be found at
+ http://opensource.org/licenses/bsd-license.php.
+
+ THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+
+**/
+
+#ifndef __SPI_BUS_H__
+#define __SPI_BUS_H__
+
+
+typedef struct _EFI_SPI_BUS_PROTOCOL EFI_SPI_BUS_PROTOCOL;
+
+typedef
+EFI_STATUS (EFIAPI* SPI_BUS_STARTREQUEST)(
+ IN EFI_SPI_BUS_PROTOCOL *This,
+ IN EFI_EVENT Event OPTIONAL,
+ IN EFI_SPI_REQUEST_PACKET *RequestPacket,
+ OUT EFI_STATUS *SpiStatus OPTIONAL
+ );
+
+typedef
+UINTN
+(EFIAPI* SPI_BUS_READ)(
+ IN OUT UINT8 *Buffer,
+ IN UINTN NumberOfBytes
+ );
+
+typedef
+UINTN
+(EFIAPI* SPI_BUS_WRITE)(
+ IN OUT UINT8 *Buffer,
+ IN UINTN NumberOfBytes
+ );
+
+struct _EFI_SPI_BUS_PROTOCOL {
+ SPI_BUS_STARTREQUEST StartRequest;
+ SPI_BUS_READ SPIRead;
+ SPI_BUS_WRITE SPIWrite;
+ UINT32 MaximumReceiveBytes;
+ UINT32 MaximumTransmitBytes;
+ UINT32 MaximumTotalBytes;
+};
+
+extern EFI_GUID gEfiSpiBusProtocolGuid;
+
+#endif // __SPI_BUS_H__
+