Home | History | Annotate | Download | only in Smbus
      1 /*++
      2 
      3 Copyright (c) 1999 - 2006, Intel Corporation. All rights reserved.<BR>
      4 This program and the accompanying materials
      5 are licensed and made available under the terms and conditions of the BSD License
      6 which accompanies this distribution.  The full text of the license may be found at
      7 http://opensource.org/licenses/bsd-license.php
      8 
      9 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
     10 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
     11 
     12 
     13 Module Name:
     14 
     15   Smbus.h
     16 
     17 Abstract:
     18 
     19   EFI SMBUS Protocol
     20 
     21 --*/
     22 
     23 #ifndef _EFI_SMBUS_H
     24 #define _EFI_SMBUS_H
     25 
     26 #include "EfiSmbus.h"
     27 
     28 #define EFI_SMBUS_HC_PROTOCOL_GUID \
     29   { \
     30     0xe49d33ed, 0x513d, 0x4634, {0xb6, 0x98, 0x6f, 0x55, 0xaa, 0x75, 0x1c, 0x1b} \
     31   }
     32 
     33 EFI_FORWARD_DECLARATION (EFI_SMBUS_HC_PROTOCOL);
     34 
     35 typedef
     36 EFI_STATUS
     37 (EFIAPI *EFI_SMBUS_HC_EXECUTE_OPERATION) (
     38   IN EFI_SMBUS_HC_PROTOCOL              * This,
     39   IN      EFI_SMBUS_DEVICE_ADDRESS      SlaveAddress,
     40   IN      EFI_SMBUS_DEVICE_COMMAND      Command,
     41   IN      EFI_SMBUS_OPERATION           Operation,
     42   IN      BOOLEAN                       PecCheck,
     43   IN OUT  UINTN                         *Length,
     44   IN OUT  VOID                          *Buffer
     45   );
     46 
     47 typedef
     48 EFI_STATUS
     49 (EFIAPI *EFI_SMBUS_NOTIFY_FUNCTION) (
     50   IN      EFI_SMBUS_DEVICE_ADDRESS      SlaveAddress,
     51   IN      UINTN                         Data
     52   );
     53 
     54 //
     55 // If ArpAll is TRUE, SmbusUdid/SlaveAddress is Optional.
     56 // If FALSE, ArpDevice will enum SmbusUdid and the address will be at SlaveAddress
     57 //
     58 typedef
     59 EFI_STATUS
     60 (EFIAPI *EFI_SMBUS_HC_PROTOCOL_ARP_DEVICE) (
     61   IN EFI_SMBUS_HC_PROTOCOL              * This,
     62   IN      BOOLEAN                       ArpAll,
     63   IN      EFI_SMBUS_UDID                * SmbusUdid, OPTIONAL
     64   IN OUT  EFI_SMBUS_DEVICE_ADDRESS      * SlaveAddress OPTIONAL
     65   );
     66 
     67 
     68 typedef
     69 EFI_STATUS
     70 (EFIAPI *EFI_SMBUS_HC_PROTOCOL_GET_ARP_MAP) (
     71   IN EFI_SMBUS_HC_PROTOCOL              * This,
     72   IN OUT  UINTN                         *Length,
     73   IN OUT  EFI_SMBUS_DEVICE_MAP          **SmbusDeviceMap
     74   );
     75 
     76 typedef
     77 EFI_STATUS
     78 (EFIAPI *EFI_SMBUS_HC_PROTOCOL_NOTIFY) (
     79   IN EFI_SMBUS_HC_PROTOCOL              * This,
     80   IN      EFI_SMBUS_DEVICE_ADDRESS      SlaveAddress,
     81   IN      UINTN                         Data,
     82   IN      EFI_SMBUS_NOTIFY_FUNCTION     NotifyFunction
     83   );
     84 
     85 struct _EFI_SMBUS_HC_PROTOCOL {
     86   EFI_SMBUS_HC_EXECUTE_OPERATION    Execute;
     87   EFI_SMBUS_HC_PROTOCOL_ARP_DEVICE  ArpDevice;
     88   EFI_SMBUS_HC_PROTOCOL_GET_ARP_MAP GetArpMap;
     89   EFI_SMBUS_HC_PROTOCOL_NOTIFY      Notify;
     90 };
     91 
     92 extern EFI_GUID gEfiSmbusProtocolGuid;
     93 #endif
     94