From b3d27e224bbf6645a0473246f52695d0c35383d1 Mon Sep 17 00:00:00 2001 From: Ard Biesheuvel Date: Tue, 20 Feb 2018 15:29:44 +0000 Subject: Platform/96Boards: introduce package and mezzanine protocol Introduce the mezzanine protocol and the 96Boards package defining the PCDs and GUIDs that may be used by implementations of the protocol. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Ard Biesheuvel Reviewed-by: Leif Lindholm --- Platform/96Boards/Include/Protocol/Mezzanine.h | 71 ++++++++++++++++++++++++++ 1 file changed, 71 insertions(+) create mode 100644 Platform/96Boards/Include/Protocol/Mezzanine.h (limited to 'Platform/96Boards/Include/Protocol') diff --git a/Platform/96Boards/Include/Protocol/Mezzanine.h b/Platform/96Boards/Include/Protocol/Mezzanine.h new file mode 100644 index 0000000000..9847649d2a --- /dev/null +++ b/Platform/96Boards/Include/Protocol/Mezzanine.h @@ -0,0 +1,71 @@ +/** @file + + Copyright (c) 2018, Linaro, Ltd. All rights reserved.
+ + 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 _96BOARDS_MEZZANINE_H_ +#define _96BOARDS_MEZZANINE_H_ + +#include +#include + +#define MEZZANINE_PROTOCOL_GUID \ + { 0xf0467a37, 0x3436, 0x40ef, { 0x94, 0x09, 0x4d, 0x1d, 0x7f, 0x51, 0x06, 0xd3 } } + +typedef struct _MEZZANINE_PROTOCOL MEZZANINE_PROTOCOL; + +/** + Apply the mezzanine's DT overlay + + @param[in] This Pointer to the MEZZANINE_PROTOCOL instance. + @param[in,out] Dtb Pointer to the device tree blob + + @return EFI_SUCCESS Operation succeeded. + @return other An error has occurred. +**/ +typedef +EFI_STATUS +(EFIAPI *APPLY_DEVICE_TREE_OVERLAY) ( + IN MEZZANINE_PROTOCOL *This, + IN OUT VOID *Dtb + ); + +struct _MEZZANINE_PROTOCOL { + // + // Get the device tree overlay for this mezzanine board + // + APPLY_DEVICE_TREE_OVERLAY ApplyDeviceTreeOverlay; + // + // The number of devices on LS connector I2C bus #0 + // + UINT32 I2c0NumDevices; + // + // The number of devices on LS connector I2C bus #1 + // + UINT32 I2c1NumDevices; + // + // Linear array of I2C devices on LS connector bus #0 + // + CONST EFI_I2C_DEVICE *I2c0DeviceArray; + // + // Linear array of I2C devices on LS connector bus #0 + // + CONST EFI_I2C_DEVICE *I2c1DeviceArray; + // + // NULL terminated linked list of SPI devices attached to the LS connector + // + CONST EFI_SPI_PERIPHERAL *SpiDeviceLinkedList; +}; + +extern EFI_GUID g96BoardsMezzanineProtocolGuid; + +#endif // _96BOARDS_MEZZANINE_H_ -- cgit v1.2.3