Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions
ti_ssp.h File Reference

Go to the source code of this file.

Data Structures

struct  ti_ssp_dev_data
 
struct  ti_ssp_data
 
struct  ti_ssp_spi_data
 

Macros

#define SSP_IN   0x0000
 
#define SSP_DATA   0x0001
 
#define SSP_CLOCK   0x0002
 
#define SSP_CHIPSEL   0x0003
 
#define SSP_OUT   0x0004
 
#define SSP_PIN_SEL(pin, v)   ((v) << ((pin) * 3))
 
#define SSP_PIN_MASK(pin)   SSP_PIN_SEL(pin, 0x7)
 
#define SSP_INPUT_SEL(pin)   ((pin) << 16)
 
#define SSP_EARLY_DIN   BIT(8)
 
#define SSP_DELAY_DOUT   BIT(9)
 
#define SSP_CLK_HIGH   BIT(0)
 
#define SSP_CLK_LOW   0
 
#define SSP_DATA_HIGH   BIT(1)
 
#define SSP_DATA_LOW   0
 
#define SSP_CS_HIGH   BIT(2)
 
#define SSP_CS_LOW   0
 
#define SSP_OUT_MODE   BIT(3)
 
#define SSP_IN_MODE   0
 
#define SSP_DATA_REG   BIT(4)
 
#define SSP_ADDR_REG   0
 
#define SSP_OPCODE_DIRECT   ((0x0) << 5)
 
#define SSP_OPCODE_TOGGLE   ((0x1) << 5)
 
#define SSP_OPCODE_SHIFT   ((0x2) << 5)
 
#define SSP_OPCODE_BRANCH0   ((0x4) << 5)
 
#define SSP_OPCODE_BRANCH1   ((0x5) << 5)
 
#define SSP_OPCODE_BRANCH   ((0x6) << 5)
 
#define SSP_OPCODE_STOP   ((0x7) << 5)
 
#define SSP_BRANCH(addr)   ((addr) << 8)
 
#define SSP_COUNT(cycles)   ((cycles) << 8)
 

Functions

int ti_ssp_raw_read (struct device *dev)
 
int ti_ssp_raw_write (struct device *dev, u32 val)
 
int ti_ssp_load (struct device *dev, int offs, u32 *prog, int len)
 
int ti_ssp_run (struct device *dev, u32 pc, u32 input, u32 *output)
 
int ti_ssp_set_mode (struct device *dev, int mode)
 
int ti_ssp_set_iosel (struct device *dev, u32 iosel)
 

Macro Definition Documentation

#define SSP_ADDR_REG   0

Definition at line 74 of file ti_ssp.h.

#define SSP_BRANCH (   addr)    ((addr) << 8)

Definition at line 83 of file ti_ssp.h.

#define SSP_CHIPSEL   0x0003

Definition at line 54 of file ti_ssp.h.

#define SSP_CLK_HIGH   BIT(0)

Definition at line 65 of file ti_ssp.h.

#define SSP_CLK_LOW   0

Definition at line 66 of file ti_ssp.h.

#define SSP_CLOCK   0x0002

Definition at line 53 of file ti_ssp.h.

#define SSP_COUNT (   cycles)    ((cycles) << 8)

Definition at line 84 of file ti_ssp.h.

#define SSP_CS_HIGH   BIT(2)

Definition at line 69 of file ti_ssp.h.

#define SSP_CS_LOW   0

Definition at line 70 of file ti_ssp.h.

#define SSP_DATA   0x0001

Definition at line 52 of file ti_ssp.h.

#define SSP_DATA_HIGH   BIT(1)

Definition at line 67 of file ti_ssp.h.

#define SSP_DATA_LOW   0

Definition at line 68 of file ti_ssp.h.

#define SSP_DATA_REG   BIT(4)

Definition at line 73 of file ti_ssp.h.

#define SSP_DELAY_DOUT   BIT(9)

Definition at line 62 of file ti_ssp.h.

#define SSP_EARLY_DIN   BIT(8)

Definition at line 61 of file ti_ssp.h.

#define SSP_IN   0x0000

Definition at line 51 of file ti_ssp.h.

#define SSP_IN_MODE   0

Definition at line 72 of file ti_ssp.h.

#define SSP_INPUT_SEL (   pin)    ((pin) << 16)

Definition at line 58 of file ti_ssp.h.

#define SSP_OPCODE_BRANCH   ((0x6) << 5)

Definition at line 81 of file ti_ssp.h.

#define SSP_OPCODE_BRANCH0   ((0x4) << 5)

Definition at line 79 of file ti_ssp.h.

#define SSP_OPCODE_BRANCH1   ((0x5) << 5)

Definition at line 80 of file ti_ssp.h.

#define SSP_OPCODE_DIRECT   ((0x0) << 5)

Definition at line 76 of file ti_ssp.h.

#define SSP_OPCODE_SHIFT   ((0x2) << 5)

Definition at line 78 of file ti_ssp.h.

#define SSP_OPCODE_STOP   ((0x7) << 5)

Definition at line 82 of file ti_ssp.h.

#define SSP_OPCODE_TOGGLE   ((0x1) << 5)

Definition at line 77 of file ti_ssp.h.

#define SSP_OUT   0x0004

Definition at line 55 of file ti_ssp.h.

#define SSP_OUT_MODE   BIT(3)

Definition at line 71 of file ti_ssp.h.

#define SSP_PIN_MASK (   pin)    SSP_PIN_SEL(pin, 0x7)

Definition at line 57 of file ti_ssp.h.

#define SSP_PIN_SEL (   pin,
  v 
)    ((v) << ((pin) * 3))

Definition at line 56 of file ti_ssp.h.

Function Documentation

int ti_ssp_load ( struct device dev,
int  offs,
u32 prog,
int  len 
)

Definition at line 200 of file ti-ssp.c.

int ti_ssp_raw_read ( struct device dev)

Definition at line 229 of file ti-ssp.c.

int ti_ssp_raw_write ( struct device dev,
u32  val 
)

Definition at line 239 of file ti-ssp.c.

int ti_ssp_run ( struct device dev,
u32  pc,
u32  input,
u32 output 
)

Definition at line 261 of file ti-ssp.c.

int ti_ssp_set_iosel ( struct device dev,
u32  iosel 
)

Definition at line 187 of file ti-ssp.c.

int ti_ssp_set_mode ( struct device dev,
int  mode 
)

Definition at line 150 of file ti-ssp.c.