summaryrefslogtreecommitdiff
path: root/EDK/Foundation/Framework/Protocol/Smbus
diff options
context:
space:
mode:
Diffstat (limited to 'EDK/Foundation/Framework/Protocol/Smbus')
-rw-r--r--EDK/Foundation/Framework/Protocol/Smbus/Smbus.c31
-rw-r--r--EDK/Foundation/Framework/Protocol/Smbus/Smbus.h108
2 files changed, 139 insertions, 0 deletions
diff --git a/EDK/Foundation/Framework/Protocol/Smbus/Smbus.c b/EDK/Foundation/Framework/Protocol/Smbus/Smbus.c
new file mode 100644
index 0000000..ecdbe14
--- /dev/null
+++ b/EDK/Foundation/Framework/Protocol/Smbus/Smbus.c
@@ -0,0 +1,31 @@
+/*++
+
+Copyright (c) 1999 - 2002, Intel Corporation
+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.
+
+
+Module Name:
+
+ SmBus.c
+
+Abstract:
+
+ EFI SMBUS Protocol
+
+Revision History
+
+--*/
+
+#include "Tiano.h"
+
+#include EFI_PROTOCOL_DEFINITION (Smbus)
+
+EFI_GUID gEfiSmbusProtocolGuid = EFI_SMBUS_HC_PROTOCOL_GUID;
+
+EFI_GUID_STRING(&gEfiSmbusProtocolGuid, "SMBUS Protocol", "EFI 2.0 SMBUS Protocol");
diff --git a/EDK/Foundation/Framework/Protocol/Smbus/Smbus.h b/EDK/Foundation/Framework/Protocol/Smbus/Smbus.h
new file mode 100644
index 0000000..067823f
--- /dev/null
+++ b/EDK/Foundation/Framework/Protocol/Smbus/Smbus.h
@@ -0,0 +1,108 @@
+/*++
+
+Copyright (c) 1999 - 2006, Intel Corporation
+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.
+
+
+Module Name:
+
+ Smbus.h
+
+Abstract:
+
+ EFI SMBUS Protocol
+
+--*/
+
+#ifndef _EFI_SMBUS_H
+#define _EFI_SMBUS_H
+
+#include "EfiSmbus.h"
+
+#define EFI_SMBUS_HC_PROTOCOL_GUID \
+ { \
+ 0xe49d33ed, 0x513d, 0x4634, 0xb6, 0x98, 0x6f, 0x55, 0xaa, 0x75, 0x1c, 0x1b \
+ }
+
+EFI_FORWARD_DECLARATION (EFI_SMBUS_HC_PROTOCOL);
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_SMBUS_HC_EXECUTE_OPERATION) (
+ IN EFI_SMBUS_HC_PROTOCOL * This,
+ IN EFI_SMBUS_DEVICE_ADDRESS SlaveAddress,
+ IN EFI_SMBUS_DEVICE_COMMAND Command,
+ IN EFI_SMBUS_OPERATION Operation,
+ IN BOOLEAN PecCheck,
+ IN OUT UINTN *Length,
+ IN OUT VOID *Buffer
+ );
+
+//;;## ...AMI_OVERRIDE... Support PI1.x typedef struct {
+//;;## ...AMI_OVERRIDE... Support PI1.x UINT32 VendorSpecificId;
+//;;## ...AMI_OVERRIDE... Support PI1.x UINT16 SubsystemDeviceId;
+//;;## ...AMI_OVERRIDE... Support PI1.x UINT16 SubsystemVendorId;
+//;;## ...AMI_OVERRIDE... Support PI1.x UINT16 Interface;
+//;;## ...AMI_OVERRIDE... Support PI1.x UINT16 DeviceId;
+//;;## ...AMI_OVERRIDE... Support PI1.x UINT16 VendorId;
+//;;## ...AMI_OVERRIDE... Support PI1.x UINT8 VendorRevision;
+//;;## ...AMI_OVERRIDE... Support PI1.x UINT8 DeviceCapabilities;
+//;;## ...AMI_OVERRIDE... Support PI1.x } EFI_SMBUS_UDID;
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_SMBUS_NOTIFY_FUNCTION) (
+ IN EFI_SMBUS_DEVICE_ADDRESS SlaveAddress,
+ IN UINTN Data
+ );
+
+//
+// If ArpAll is TRUE, SmbusUdid/SlaveAddress is Optional.
+// If FALSE, ArpDevice will enum SmbusUdid and the address will be at SlaveAddress
+//
+typedef
+EFI_STATUS
+(EFIAPI *EFI_SMBUS_HC_PROTOCOL_ARP_DEVICE) (
+ IN EFI_SMBUS_HC_PROTOCOL * This,
+ IN BOOLEAN ArpAll,
+ IN EFI_SMBUS_UDID * SmbusUdid, OPTIONAL
+ IN OUT EFI_SMBUS_DEVICE_ADDRESS * SlaveAddress OPTIONAL
+ );
+
+//;;## ...AMI_OVERRIDE... Support PI1.x typedef struct {
+//;;## ...AMI_OVERRIDE... Support PI1.x EFI_SMBUS_DEVICE_ADDRESS SmbusDeviceAddress;
+//;;## ...AMI_OVERRIDE... Support PI1.x EFI_SMBUS_UDID SmbusDeviceUdid;
+//;;## ...AMI_OVERRIDE... Support PI1.x } EFI_SMBUS_DEVICE_MAP;
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_SMBUS_HC_PROTOCOL_GET_ARP_MAP) (
+ IN EFI_SMBUS_HC_PROTOCOL * This,
+ IN OUT UINTN *Length,
+ IN OUT EFI_SMBUS_DEVICE_MAP **SmbusDeviceMap
+ );
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_SMBUS_HC_PROTOCOL_NOTIFY) (
+ IN EFI_SMBUS_HC_PROTOCOL * This,
+ IN EFI_SMBUS_DEVICE_ADDRESS SlaveAddress,
+ IN UINTN Data,
+ IN EFI_SMBUS_NOTIFY_FUNCTION NotifyFunction
+ );
+
+typedef struct _EFI_SMBUS_HC_PROTOCOL {
+ EFI_SMBUS_HC_EXECUTE_OPERATION Execute;
+ EFI_SMBUS_HC_PROTOCOL_ARP_DEVICE ArpDevice;
+ EFI_SMBUS_HC_PROTOCOL_GET_ARP_MAP GetArpMap;
+ EFI_SMBUS_HC_PROTOCOL_NOTIFY Notify;
+} EFI_SMBUS_HC_PROTOCOL;
+
+extern EFI_GUID gEfiSmbusProtocolGuid;
+#endif