Sreedhara DS | 9a58a33 | 2010-04-26 18:13:05 +0100 | [diff] [blame] | 1 | #ifndef _ASM_X86_INTEL_SCU_IPC_H_ |
| 2 | #define _ASM_X86_INTEL_SCU_IPC_H_ |
| 3 | |
Feng Tang | 35f2915 | 2010-06-01 13:07:34 +0100 | [diff] [blame^] | 4 | #define IPCMSG_VRTC 0xFA /* Set vRTC device */ |
| 5 | |
| 6 | /* Command id associated with message IPCMSG_VRTC */ |
| 7 | #define IPC_CMD_VRTC_SETTIME 1 /* Set time */ |
| 8 | #define IPC_CMD_VRTC_SETALARM 2 /* Set alarm */ |
| 9 | |
Sreedhara DS | 9a58a33 | 2010-04-26 18:13:05 +0100 | [diff] [blame] | 10 | /* Read single register */ |
| 11 | int intel_scu_ipc_ioread8(u16 addr, u8 *data); |
| 12 | |
| 13 | /* Read two sequential registers */ |
| 14 | int intel_scu_ipc_ioread16(u16 addr, u16 *data); |
| 15 | |
| 16 | /* Read four sequential registers */ |
| 17 | int intel_scu_ipc_ioread32(u16 addr, u32 *data); |
| 18 | |
| 19 | /* Read a vector */ |
| 20 | int intel_scu_ipc_readv(u16 *addr, u8 *data, int len); |
| 21 | |
| 22 | /* Write single register */ |
| 23 | int intel_scu_ipc_iowrite8(u16 addr, u8 data); |
| 24 | |
| 25 | /* Write two sequential registers */ |
| 26 | int intel_scu_ipc_iowrite16(u16 addr, u16 data); |
| 27 | |
| 28 | /* Write four sequential registers */ |
| 29 | int intel_scu_ipc_iowrite32(u16 addr, u32 data); |
| 30 | |
| 31 | /* Write a vector */ |
| 32 | int intel_scu_ipc_writev(u16 *addr, u8 *data, int len); |
| 33 | |
| 34 | /* Update single register based on the mask */ |
| 35 | int intel_scu_ipc_update_register(u16 addr, u8 data, u8 mask); |
| 36 | |
| 37 | /* |
| 38 | * Indirect register read |
| 39 | * Can be used when SCCB(System Controller Configuration Block) register |
| 40 | * HRIM(Honor Restricted IPC Messages) is set (bit 23) |
| 41 | */ |
| 42 | int intel_scu_ipc_register_read(u32 addr, u32 *data); |
| 43 | |
| 44 | /* |
| 45 | * Indirect register write |
| 46 | * Can be used when SCCB(System Controller Configuration Block) register |
| 47 | * HRIM(Honor Restricted IPC Messages) is set (bit 23) |
| 48 | */ |
| 49 | int intel_scu_ipc_register_write(u32 addr, u32 data); |
| 50 | |
| 51 | /* Issue commands to the SCU with or without data */ |
| 52 | int intel_scu_ipc_simple_command(int cmd, int sub); |
| 53 | int intel_scu_ipc_command(int cmd, int sub, u32 *in, int inlen, |
| 54 | u32 *out, int outlen); |
| 55 | /* I2C control api */ |
| 56 | int intel_scu_ipc_i2c_cntrl(u32 addr, u32 *data); |
| 57 | |
| 58 | /* Update FW version */ |
| 59 | int intel_scu_ipc_fw_update(u8 *buffer, u32 length); |
| 60 | |
| 61 | #endif |