1 /** @file
2   This file declares the SMBus definitions defined in SmBus Specifciation V2.0
3   and defined in PI1.0 specification volume 5.
4 
5   Copyright (c) 2007 - 2008, Intel Corporation. All rights reserved.<BR>
6   This program and the accompanying materials
7   are licensed and made available under the terms and conditions of the BSD License
8   which accompanies this distribution.  The full text of the license may be found at
9   http://opensource.org/licenses/bsd-license.php
10 
11   THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
12   WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
13 
14 **/
15 
16 #ifndef _SMBUS_H_
17 #define _SMBUS_H_
18 
19 
20 ///
21 /// UDID of SMBUS device.
22 ///
23 typedef struct {
24   UINT32  VendorSpecificId;
25   UINT16  SubsystemDeviceId;
26   UINT16  SubsystemVendorId;
27   UINT16  Interface;
28   UINT16  DeviceId;
29   UINT16  VendorId;
30   UINT8   VendorRevision;
31   UINT8   DeviceCapabilities;
32 } EFI_SMBUS_UDID;
33 
34 ///
35 /// Smbus Device Address
36 ///
37 typedef struct {
38   ///
39   /// The SMBUS hardware address to which the SMBUS device is preassigned or allocated.
40   ///
41   UINTN SmbusDeviceAddress : 7;
42 } EFI_SMBUS_DEVICE_ADDRESS;
43 
44 typedef struct {
45   ///
46   /// The SMBUS hardware address to which the SMBUS device is preassigned or
47   /// allocated. Type EFI_SMBUS_DEVICE_ADDRESS is defined in EFI_PEI_SMBUS2_PPI.Execute().
48   ///
49   EFI_SMBUS_DEVICE_ADDRESS  SmbusDeviceAddress;
50   ///
51   /// The SMBUS Unique Device Identifier (UDID) as defined in EFI_SMBUS_UDID.
52   /// Type EFI_SMBUS_UDID is defined in EFI_PEI_SMBUS2_PPI.ArpDevice().
53   ///
54   EFI_SMBUS_UDID            SmbusDeviceUdid;
55 } EFI_SMBUS_DEVICE_MAP;
56 
57 ///
58 /// Smbus Operations
59 ///
60 typedef enum _EFI_SMBUS_OPERATION {
61   EfiSmbusQuickRead,
62   EfiSmbusQuickWrite,
63   EfiSmbusReceiveByte,
64   EfiSmbusSendByte,
65   EfiSmbusReadByte,
66   EfiSmbusWriteByte,
67   EfiSmbusReadWord,
68   EfiSmbusWriteWord,
69   EfiSmbusReadBlock,
70   EfiSmbusWriteBlock,
71   EfiSmbusProcessCall,
72   EfiSmbusBWBRProcessCall
73 } EFI_SMBUS_OPERATION;
74 
75 ///
76 /// EFI_SMBUS_DEVICE_COMMAND
77 ///
78 typedef UINTN   EFI_SMBUS_DEVICE_COMMAND;
79 
80 #endif
81 
82