Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions | Variables
dcdbas.h File Reference
#include <linux/device.h>
#include <linux/sysfs.h>
#include <linux/types.h>

Go to the source code of this file.

Data Structures

struct  smi_cmd
 
struct  apm_cmd
 

Macros

#define MAX_SMI_DATA_BUF_SIZE   (256 * 1024)
 
#define HC_ACTION_NONE   (0)
 
#define HC_ACTION_HOST_CONTROL_POWEROFF   BIT(1)
 
#define HC_ACTION_HOST_CONTROL_POWERCYCLE   BIT(2)
 
#define HC_SMITYPE_NONE   (0)
 
#define HC_SMITYPE_TYPE1   (1)
 
#define HC_SMITYPE_TYPE2   (2)
 
#define HC_SMITYPE_TYPE3   (3)
 
#define ESM_APM_CMD   (0x0A0)
 
#define ESM_APM_POWER_CYCLE   (0x10)
 
#define ESM_STATUS_CMD_UNSUCCESSFUL   (-1)
 
#define CMOS_BASE_PORT   (0x070)
 
#define CMOS_PAGE1_INDEX_PORT   (0)
 
#define CMOS_PAGE1_DATA_PORT   (1)
 
#define CMOS_PAGE2_INDEX_PORT_PIIX4   (2)
 
#define CMOS_PAGE2_DATA_PORT_PIIX4   (3)
 
#define PE1400_APM_CONTROL_PORT   (0x0B0)
 
#define PCAT_APM_CONTROL_PORT   (0x0B2)
 
#define PCAT_APM_STATUS_PORT   (0x0B3)
 
#define PE1300_CMOS_CMD_STRUCT_PTR   (0x38)
 
#define PE1400_CMOS_CMD_STRUCT_PTR   (0x70)
 
#define MAX_SYSMGMT_SHORTCMD_PARMBUF_LEN   (14)
 
#define MAX_SYSMGMT_LONGCMD_SGENTRY_NUM   (16)
 
#define TIMEOUT_USEC_SHORT_SEMA_BLOCKING   (10000)
 
#define EXPIRED_TIMER   (0)
 
#define SMI_CMD_MAGIC   (0x534D4931)
 
#define DCDBAS_DEV_ATTR_RW(_name)   DEVICE_ATTR(_name,0600,_name##_show,_name##_store);
 
#define DCDBAS_DEV_ATTR_RO(_name)   DEVICE_ATTR(_name,0400,_name##_show,NULL);
 
#define DCDBAS_DEV_ATTR_WO(_name)   DEVICE_ATTR(_name,0200,NULL,_name##_store);
 
#define DCDBAS_BIN_ATTR_RW(_name)
 

Functions

struct smi_cmd __attribute__ ((packed))
 
int dcdbas_smi_request (struct smi_cmd *smi_cmd)
 

Variables

__u32 magic
 
__u32 ebx
 
__u32 ecx
 
__u16 command_address
 
__u8 command_code
 
__u8 reserved
 
__u8 command_buffer [1]
 
__u8 parm [MAX_SYSMGMT_SHORTCMD_PARMBUF_LEN]
 
__u32 size
 
__u64 addr
 
__u16 num_sg_entries
 
__u8 command
 
__s8 status
 

Macro Definition Documentation

#define CMOS_BASE_PORT   (0x070)

Definition at line 38 of file dcdbas.h.

#define CMOS_PAGE1_DATA_PORT   (1)

Definition at line 40 of file dcdbas.h.

#define CMOS_PAGE1_INDEX_PORT   (0)

Definition at line 39 of file dcdbas.h.

#define CMOS_PAGE2_DATA_PORT_PIIX4   (3)

Definition at line 42 of file dcdbas.h.

#define CMOS_PAGE2_INDEX_PORT_PIIX4   (2)

Definition at line 41 of file dcdbas.h.

#define DCDBAS_BIN_ATTR_RW (   _name)
Value:
struct bin_attribute bin_attr_##_name = { \
.attr = { .name = __stringify(_name), \
.mode = 0600 }, \
.read = _name##_read, \
.write = _name##_write, \
}

Definition at line 66 of file dcdbas.h.

#define DCDBAS_DEV_ATTR_RO (   _name)    DEVICE_ATTR(_name,0400,_name##_show,NULL);

Definition at line 60 of file dcdbas.h.

#define DCDBAS_DEV_ATTR_RW (   _name)    DEVICE_ATTR(_name,0600,_name##_show,_name##_store);

Definition at line 57 of file dcdbas.h.

#define DCDBAS_DEV_ATTR_WO (   _name)    DEVICE_ATTR(_name,0200,NULL,_name##_store);

Definition at line 63 of file dcdbas.h.

#define ESM_APM_CMD   (0x0A0)

Definition at line 34 of file dcdbas.h.

#define ESM_APM_POWER_CYCLE   (0x10)

Definition at line 35 of file dcdbas.h.

#define ESM_STATUS_CMD_UNSUCCESSFUL   (-1)

Definition at line 36 of file dcdbas.h.

#define EXPIRED_TIMER   (0)

Definition at line 53 of file dcdbas.h.

#define HC_ACTION_HOST_CONTROL_POWERCYCLE   BIT(2)

Definition at line 27 of file dcdbas.h.

#define HC_ACTION_HOST_CONTROL_POWEROFF   BIT(1)

Definition at line 26 of file dcdbas.h.

#define HC_ACTION_NONE   (0)

Definition at line 25 of file dcdbas.h.

#define HC_SMITYPE_NONE   (0)

Definition at line 29 of file dcdbas.h.

#define HC_SMITYPE_TYPE1   (1)

Definition at line 30 of file dcdbas.h.

#define HC_SMITYPE_TYPE2   (2)

Definition at line 31 of file dcdbas.h.

#define HC_SMITYPE_TYPE3   (3)

Definition at line 32 of file dcdbas.h.

#define MAX_SMI_DATA_BUF_SIZE   (256 * 1024)

Definition at line 23 of file dcdbas.h.

#define MAX_SYSMGMT_LONGCMD_SGENTRY_NUM   (16)

Definition at line 50 of file dcdbas.h.

#define MAX_SYSMGMT_SHORTCMD_PARMBUF_LEN   (14)

Definition at line 49 of file dcdbas.h.

#define PCAT_APM_CONTROL_PORT   (0x0B2)

Definition at line 44 of file dcdbas.h.

#define PCAT_APM_STATUS_PORT   (0x0B3)

Definition at line 45 of file dcdbas.h.

#define PE1300_CMOS_CMD_STRUCT_PTR   (0x38)

Definition at line 46 of file dcdbas.h.

#define PE1400_APM_CONTROL_PORT   (0x0B0)

Definition at line 43 of file dcdbas.h.

#define PE1400_CMOS_CMD_STRUCT_PTR   (0x70)

Definition at line 47 of file dcdbas.h.

#define SMI_CMD_MAGIC   (0x534D4931)

Definition at line 55 of file dcdbas.h.

#define TIMEOUT_USEC_SHORT_SEMA_BLOCKING   (10000)

Definition at line 52 of file dcdbas.h.

Function Documentation

struct smi_cmd __attribute__ ( (packed)  )
read

Definition at line 171 of file esd_usb2.c.

int dcdbas_smi_request ( struct smi_cmd smi_cmd)

dcdbas_smi_request: generate SMI request

Called with smi_data_lock.

Definition at line 246 of file dcdbas.c.

Variable Documentation

__u64 addr

Definition at line 101 of file dcdbas.h.

Definition at line 103 of file dcdbas.h.

__u16 command_address

Definition at line 86 of file dcdbas.h.

__u8 command_buffer[1]

Definition at line 89 of file dcdbas.h.

__u32 command_code

Definition at line 87 of file dcdbas.h.

__u32 ebx

Definition at line 84 of file dcdbas.h.

__u32 ecx

Definition at line 85 of file dcdbas.h.

__u32 magic

Definition at line 83 of file dcdbas.h.

__u16 num_sg_entries

Definition at line 101 of file dcdbas.h.

Definition at line 92 of file dcdbas.h.

__u16 reserved

Definition at line 88 of file dcdbas.h.

__u32 size

Definition at line 100 of file dcdbas.h.

Definition at line 104 of file dcdbas.h.