Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions
ti-ssp.c File Reference
#include <linux/errno.h>
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/slab.h>
#include <linux/err.h>
#include <linux/init.h>
#include <linux/wait.h>
#include <linux/clk.h>
#include <linux/interrupt.h>
#include <linux/device.h>
#include <linux/spinlock.h>
#include <linux/platform_device.h>
#include <linux/delay.h>
#include <linux/io.h>
#include <linux/mfd/core.h>
#include <linux/mfd/ti_ssp.h>

Go to the source code of this file.

Data Structures

struct  ti_ssp
 

Macros

#define REG_REV   0x00
 
#define REG_IOSEL_1   0x04
 
#define REG_IOSEL_2   0x08
 
#define REG_PREDIV   0x0c
 
#define REG_INTR_ST   0x10
 
#define REG_INTR_EN   0x14
 
#define REG_TEST_CTRL   0x18
 
#define PORT_CFG_2   0x00
 
#define PORT_ADDR   0x04
 
#define PORT_DATA   0x08
 
#define PORT_CFG_1   0x0c
 
#define PORT_STATE   0x10
 
#define SSP_PORT_CONFIG_MASK   (SSP_EARLY_DIN | SSP_DELAY_DOUT)
 
#define SSP_PORT_CLKRATE_MASK   0x0f
 
#define SSP_SEQRAM_WR_EN   BIT(4)
 
#define SSP_SEQRAM_RD_EN   BIT(5)
 
#define SSP_START   BIT(15)
 
#define SSP_BUSY   BIT(10)
 
#define SSP_PORT_ASL   BIT(7)
 
#define SSP_PORT_CFO1   BIT(6)
 
#define SSP_PORT_SEQRAM_SIZE   32
 

Functions

int ti_ssp_set_mode (struct device *dev, int mode)
 
 EXPORT_SYMBOL (ti_ssp_set_mode)
 
int ti_ssp_set_iosel (struct device *dev, u32 iosel)
 
 EXPORT_SYMBOL (ti_ssp_set_iosel)
 
int ti_ssp_load (struct device *dev, int offs, u32 *prog, int len)
 
 EXPORT_SYMBOL (ti_ssp_load)
 
int ti_ssp_raw_read (struct device *dev)
 
 EXPORT_SYMBOL (ti_ssp_raw_read)
 
int ti_ssp_raw_write (struct device *dev, u32 val)
 
 EXPORT_SYMBOL (ti_ssp_raw_write)
 
int ti_ssp_run (struct device *dev, u32 pc, u32 input, u32 *output)
 
 EXPORT_SYMBOL (ti_ssp_run)
 
 module_platform_driver (ti_ssp_driver)
 
 MODULE_DESCRIPTION ("Sequencer Serial Port (SSP) Driver")
 
 MODULE_AUTHOR ("Cyril Chemparathy")
 
 MODULE_LICENSE ("GPL")
 
 MODULE_ALIAS ("platform:ti-ssp")
 

Macro Definition Documentation

#define PORT_ADDR   0x04

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

#define PORT_CFG_1   0x0c

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

#define PORT_CFG_2   0x00

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

#define PORT_DATA   0x08

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

#define PORT_STATE   0x10

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

#define REG_INTR_EN   0x14

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

#define REG_INTR_ST   0x10

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

#define REG_IOSEL_1   0x04

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

#define REG_IOSEL_2   0x08

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

#define REG_PREDIV   0x0c

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

#define REG_REV   0x00

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

#define REG_TEST_CTRL   0x18

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

#define SSP_BUSY   BIT(10)

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

#define SSP_PORT_ASL   BIT(7)

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

#define SSP_PORT_CFO1   BIT(6)

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

#define SSP_PORT_CLKRATE_MASK   0x0f

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

#define SSP_PORT_CONFIG_MASK   (SSP_EARLY_DIN | SSP_DELAY_DOUT)

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

#define SSP_PORT_SEQRAM_SIZE   32

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

#define SSP_SEQRAM_RD_EN   BIT(5)

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

#define SSP_SEQRAM_WR_EN   BIT(4)

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

#define SSP_START   BIT(15)

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

Function Documentation

EXPORT_SYMBOL ( ti_ssp_set_mode  )
EXPORT_SYMBOL ( ti_ssp_set_iosel  )
EXPORT_SYMBOL ( ti_ssp_load  )
EXPORT_SYMBOL ( ti_ssp_raw_read  )
EXPORT_SYMBOL ( ti_ssp_raw_write  )
EXPORT_SYMBOL ( ti_ssp_run  )
MODULE_ALIAS ( "platform:ti-ssp )
MODULE_AUTHOR ( "Cyril Chemparathy"  )
MODULE_DESCRIPTION ( "Sequencer Serial Port (SSP) Driver"  )
MODULE_LICENSE ( "GPL"  )
module_platform_driver ( ti_ssp_driver  )
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.