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

Go to the source code of this file.

Macros

#define IPCMSG_WARM_RESET   0xF0
 
#define IPCMSG_COLD_RESET   0xF1
 
#define IPCMSG_SOFT_RESET   0xF2
 
#define IPCMSG_COLD_BOOT   0xF3
 
#define IPCMSG_VRTC   0xFA /* Set vRTC device */
 
#define IPC_CMD_VRTC_SETTIME   1 /* Set time */
 
#define IPC_CMD_VRTC_SETALARM   2 /* Set alarm */
 
#define SCU_AVAILABLE   1
 
#define SCU_DOWN   2
 

Functions

int intel_scu_ipc_ioread8 (u16 addr, u8 *data)
 
int intel_scu_ipc_ioread16 (u16 addr, u16 *data)
 
int intel_scu_ipc_ioread32 (u16 addr, u32 *data)
 
int intel_scu_ipc_readv (u16 *addr, u8 *data, int len)
 
int intel_scu_ipc_iowrite8 (u16 addr, u8 data)
 
int intel_scu_ipc_iowrite16 (u16 addr, u16 data)
 
int intel_scu_ipc_iowrite32 (u16 addr, u32 data)
 
int intel_scu_ipc_writev (u16 *addr, u8 *data, int len)
 
int intel_scu_ipc_update_register (u16 addr, u8 data, u8 mask)
 
int intel_scu_ipc_simple_command (int cmd, int sub)
 
int intel_scu_ipc_command (int cmd, int sub, u32 *in, int inlen, u32 *out, int outlen)
 
int intel_scu_ipc_i2c_cntrl (u32 addr, u32 *data)
 
int intel_scu_ipc_fw_update (u8 *buffer, u32 length)
 

Variables

struct blocking_notifier_head intel_scu_notifier
 

Macro Definition Documentation

#define IPC_CMD_VRTC_SETALARM   2 /* Set alarm */

Definition at line 14 of file intel_scu_ipc.h.

#define IPC_CMD_VRTC_SETTIME   1 /* Set time */

Definition at line 13 of file intel_scu_ipc.h.

#define IPCMSG_COLD_BOOT   0xF3

Definition at line 9 of file intel_scu_ipc.h.

#define IPCMSG_COLD_RESET   0xF1

Definition at line 7 of file intel_scu_ipc.h.

#define IPCMSG_SOFT_RESET   0xF2

Definition at line 8 of file intel_scu_ipc.h.

#define IPCMSG_VRTC   0xFA /* Set vRTC device */

Definition at line 11 of file intel_scu_ipc.h.

#define IPCMSG_WARM_RESET   0xF0

Definition at line 6 of file intel_scu_ipc.h.

#define SCU_AVAILABLE   1

Definition at line 70 of file intel_scu_ipc.h.

#define SCU_DOWN   2

Definition at line 71 of file intel_scu_ipc.h.

Function Documentation

int intel_scu_ipc_command ( int  cmd,
int  sub,
u32 in,
int  inlen,
u32 out,
int  outlen 
)

intel_scu_ipc_command - command with data : command : sub type : input data : input length in dwords : output data : output length in dwords

Issue a command to the SCU which involves data transfers. Do the data copies under the lock but leave it for the caller to interpret

Definition at line 413 of file intel_scu_ipc.c.

int intel_scu_ipc_fw_update ( u8 buffer,
u32  length 
)
int intel_scu_ipc_i2c_cntrl ( u32  addr,
u32 data 
)

intel_scu_ipc_i2c_cntrl - I2C read/write operations : I2C address + command bits : data to read/write

Perform an an I2C read/write operation via the SCU. All locking is handled for the caller. This function may sleep.

Returns an error code or 0 on success.

This has to be in the IPC driver for the locking.

Definition at line 454 of file intel_scu_ipc.c.

int intel_scu_ipc_ioread16 ( u16  addr,
u16 data 
)

intel_scu_ipc_ioread16 - read a word via the SCU : register on SCU : return pointer for read word

Read a register pair. Returns 0 on success or an error code. All locking between SCU accesses is handled for the caller.

This function may sleep.

Definition at line 236 of file intel_scu_ipc.c.

int intel_scu_ipc_ioread32 ( u16  addr,
u32 data 
)

intel_scu_ipc_ioread32 - read a dword via the SCU : register on SCU : return pointer for read dword

Read four registers. Returns 0 on success or an error code. All locking between SCU accesses is handled for the caller.

This function may sleep.

Definition at line 253 of file intel_scu_ipc.c.

int intel_scu_ipc_ioread8 ( u16  addr,
u8 data 
)

intel_scu_ipc_ioread8 - read a word via the SCU : register on SCU : return pointer for read byte

Read a single register. Returns 0 on success or an error code. All locking between SCU accesses is handled for the caller.

This function may sleep.

Definition at line 220 of file intel_scu_ipc.c.

int intel_scu_ipc_iowrite16 ( u16  addr,
u16  data 
)

intel_scu_ipc_iowrite16 - write a word via the SCU : register on SCU : word to write

Write two registers. Returns 0 on success or an error code. All locking between SCU accesses is handled for the caller.

This function may sleep.

Definition at line 286 of file intel_scu_ipc.c.

int intel_scu_ipc_iowrite32 ( u16  addr,
u32  data 
)

intel_scu_ipc_iowrite32 - write a dword via the SCU : register on SCU : dword to write

Write four registers. Returns 0 on success or an error code. All locking between SCU accesses is handled for the caller.

This function may sleep.

Definition at line 303 of file intel_scu_ipc.c.

int intel_scu_ipc_iowrite8 ( u16  addr,
u8  data 
)

intel_scu_ipc_iowrite8 - write a byte via the SCU : register on SCU : byte to write

Write a single register. Returns 0 on success or an error code. All locking between SCU accesses is handled for the caller.

This function may sleep.

Definition at line 270 of file intel_scu_ipc.c.

int intel_scu_ipc_readv ( u16 addr,
u8 data,
int  len 
)

intel_scu_ipc_readvv - read a set of registers : register list : bytes to return : length of array

Read registers. Returns 0 on success or an error code. All locking between SCU accesses is handled for the caller.

The largest array length permitted by the hardware is 5 items.

This function may sleep.

Definition at line 323 of file intel_scu_ipc.c.

int intel_scu_ipc_simple_command ( int  cmd,
int  sub 
)

intel_scu_ipc_simple_command - send a simple command : command : sub type

Issue a simple command to the SCU. Do not use this interface if you must then access data as any data values may be overwritten by another SCU access by the time this function returns.

This function may sleep. Locking for SCU accesses is handled for the caller.

Definition at line 384 of file intel_scu_ipc.c.

int intel_scu_ipc_update_register ( u16  addr,
u8  bits,
u8  mask 
)

intel_scu_ipc_update_register - r/m/w a register : register address : bits to update : mask of bits to update

Read-modify-write power control unit register. The first data argument must be register value and second is mask value mask is a bitmap that indicates which bits to update. 0 = masked. Don't modify this bit, 1 = modify this bit. returns 0 on success or an error code.

This function may sleep. Locking between SCU accesses is handled for the caller.

Definition at line 365 of file intel_scu_ipc.c.

int intel_scu_ipc_writev ( u16 addr,
u8 data,
int  len 
)

intel_scu_ipc_writev - write a set of registers : register list : bytes to write : length of array

Write registers. Returns 0 on success or an error code. All locking between SCU accesses is handled for the caller.

The largest array length permitted by the hardware is 5 items.

This function may sleep.

Definition at line 343 of file intel_scu_ipc.c.

Variable Documentation

struct blocking_notifier_head intel_scu_notifier