The Android Open Source Project | a27d2ba | 2008-10-21 07:00:00 -0700 | [diff] [blame^] | 1 | /**************************************************************************** |
| 2 | **************************************************************************** |
| 3 | *** |
| 4 | *** This header was automatically generated from a Linux kernel header |
| 5 | *** of the same name, to make information necessary for userspace to |
| 6 | *** call into the kernel available to libc. It contains only constants, |
| 7 | *** structures, and macros generated from the original header, and thus, |
| 8 | *** contains no copyrightable information. |
| 9 | *** |
| 10 | **************************************************************************** |
| 11 | ****************************************************************************/ |
| 12 | #ifndef __LINUX_IPMI_SMI_H |
| 13 | #define __LINUX_IPMI_SMI_H |
| 14 | |
| 15 | #include <linux/ipmi_msgdefs.h> |
| 16 | #include <linux/proc_fs.h> |
| 17 | #include <linux/module.h> |
| 18 | #include <linux/device.h> |
| 19 | #include <linux/platform_device.h> |
| 20 | #include <linux/ipmi_smi.h> |
| 21 | |
| 22 | typedef struct ipmi_smi *ipmi_smi_t; |
| 23 | |
| 24 | struct ipmi_smi_msg |
| 25 | { |
| 26 | struct list_head link; |
| 27 | |
| 28 | long msgid; |
| 29 | void *user_data; |
| 30 | |
| 31 | int data_size; |
| 32 | unsigned char data[IPMI_MAX_MSG_LENGTH]; |
| 33 | |
| 34 | int rsp_size; |
| 35 | unsigned char rsp[IPMI_MAX_MSG_LENGTH]; |
| 36 | |
| 37 | void (*done)(struct ipmi_smi_msg *msg); |
| 38 | }; |
| 39 | |
| 40 | struct ipmi_smi_handlers |
| 41 | { |
| 42 | struct module *owner; |
| 43 | |
| 44 | int (*start_processing)(void *send_info, |
| 45 | ipmi_smi_t new_intf); |
| 46 | |
| 47 | void (*sender)(void *send_info, |
| 48 | struct ipmi_smi_msg *msg, |
| 49 | int priority); |
| 50 | |
| 51 | void (*request_events)(void *send_info); |
| 52 | |
| 53 | void (*set_run_to_completion)(void *send_info, int run_to_completion); |
| 54 | |
| 55 | void (*poll)(void *send_info); |
| 56 | |
| 57 | int (*inc_usecount)(void *send_info); |
| 58 | void (*dec_usecount)(void *send_info); |
| 59 | }; |
| 60 | |
| 61 | struct ipmi_device_id { |
| 62 | unsigned char device_id; |
| 63 | unsigned char device_revision; |
| 64 | unsigned char firmware_revision_1; |
| 65 | unsigned char firmware_revision_2; |
| 66 | unsigned char ipmi_version; |
| 67 | unsigned char additional_device_support; |
| 68 | unsigned int manufacturer_id; |
| 69 | unsigned int product_id; |
| 70 | unsigned char aux_firmware_revision[4]; |
| 71 | unsigned int aux_firmware_revision_set : 1; |
| 72 | }; |
| 73 | |
| 74 | #define ipmi_version_major(v) ((v)->ipmi_version & 0xf) |
| 75 | #define ipmi_version_minor(v) ((v)->ipmi_version >> 4) |
| 76 | |
| 77 | struct ipmi_smi_msg *ipmi_alloc_smi_msg(void); |
| 78 | |
| 79 | #endif |