1 #ifndef _ASM_X86_INTEL_SCU_IPC_H_
2 #define  _ASM_X86_INTEL_SCU_IPC_H_
3 
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 
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 /* Issue commands to the SCU with or without data */
38 int intel_scu_ipc_simple_command(int cmd, int sub);
39 int intel_scu_ipc_command(int cmd, int sub, u32 *in, int inlen,
40 							u32 *out, int outlen);
41 /* I2C control api */
42 int intel_scu_ipc_i2c_cntrl(u32 addr, u32 *data);
43 
44 /* Update FW version */
45 int intel_scu_ipc_fw_update(u8 *buffer, u32 length);
46 
47 #endif
48