Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions
spi-txx9.c File Reference
#include <linux/init.h>
#include <linux/delay.h>
#include <linux/errno.h>
#include <linux/interrupt.h>
#include <linux/platform_device.h>
#include <linux/sched.h>
#include <linux/spinlock.h>
#include <linux/workqueue.h>
#include <linux/spi/spi.h>
#include <linux/err.h>
#include <linux/clk.h>
#include <linux/io.h>
#include <linux/module.h>
#include <asm/gpio.h>

Go to the source code of this file.

Data Structures

struct  txx9spi
 

Macros

#define SPI_FIFO_SIZE   4
 
#define SPI_MAX_DIVIDER   0xff /* Max. value for SPCR1.SER */
 
#define SPI_MIN_DIVIDER   1 /* Min. value for SPCR1.SER */
 
#define TXx9_SPMCR   0x00
 
#define TXx9_SPCR0   0x04
 
#define TXx9_SPCR1   0x08
 
#define TXx9_SPFS   0x0c
 
#define TXx9_SPSR   0x14
 
#define TXx9_SPDR   0x18
 
#define TXx9_SPMCR_OPMODE   0xc0
 
#define TXx9_SPMCR_CONFIG   0x40
 
#define TXx9_SPMCR_ACTIVE   0x80
 
#define TXx9_SPMCR_SPSTP   0x02
 
#define TXx9_SPMCR_BCLR   0x01
 
#define TXx9_SPCR0_TXIFL_MASK   0xc000
 
#define TXx9_SPCR0_RXIFL_MASK   0x3000
 
#define TXx9_SPCR0_SIDIE   0x0800
 
#define TXx9_SPCR0_SOEIE   0x0400
 
#define TXx9_SPCR0_RBSIE   0x0200
 
#define TXx9_SPCR0_TBSIE   0x0100
 
#define TXx9_SPCR0_IFSPSE   0x0010
 
#define TXx9_SPCR0_SBOS   0x0004
 
#define TXx9_SPCR0_SPHA   0x0002
 
#define TXx9_SPCR0_SPOL   0x0001
 
#define TXx9_SPSR_TBSI   0x8000
 
#define TXx9_SPSR_RBSI   0x4000
 
#define TXx9_SPSR_TBS_MASK   0x3800
 
#define TXx9_SPSR_RBS_MASK   0x0700
 
#define TXx9_SPSR_SPOE   0x0080
 
#define TXx9_SPSR_IFSD   0x0008
 
#define TXx9_SPSR_SIDLE   0x0004
 
#define TXx9_SPSR_STRDY   0x0002
 
#define TXx9_SPSR_SRRDY   0x0001
 

Functions

 MODULE_ALIAS ("platform:spi_txx9")
 
 subsys_initcall (txx9spi_init)
 
 module_exit (txx9spi_exit)
 
 MODULE_DESCRIPTION ("TXx9 SPI Driver")
 
 MODULE_LICENSE ("GPL")
 

Macro Definition Documentation

#define SPI_FIFO_SIZE   4

Definition at line 32 of file spi-txx9.c.

#define SPI_MAX_DIVIDER   0xff /* Max. value for SPCR1.SER */

Definition at line 33 of file spi-txx9.c.

#define SPI_MIN_DIVIDER   1 /* Min. value for SPCR1.SER */

Definition at line 34 of file spi-txx9.c.

#define TXx9_SPCR0   0x04

Definition at line 37 of file spi-txx9.c.

#define TXx9_SPCR0_IFSPSE   0x0010

Definition at line 57 of file spi-txx9.c.

#define TXx9_SPCR0_RBSIE   0x0200

Definition at line 55 of file spi-txx9.c.

#define TXx9_SPCR0_RXIFL_MASK   0x3000

Definition at line 52 of file spi-txx9.c.

#define TXx9_SPCR0_SBOS   0x0004

Definition at line 58 of file spi-txx9.c.

#define TXx9_SPCR0_SIDIE   0x0800

Definition at line 53 of file spi-txx9.c.

#define TXx9_SPCR0_SOEIE   0x0400

Definition at line 54 of file spi-txx9.c.

#define TXx9_SPCR0_SPHA   0x0002

Definition at line 59 of file spi-txx9.c.

#define TXx9_SPCR0_SPOL   0x0001

Definition at line 60 of file spi-txx9.c.

#define TXx9_SPCR0_TBSIE   0x0100

Definition at line 56 of file spi-txx9.c.

#define TXx9_SPCR0_TXIFL_MASK   0xc000

Definition at line 51 of file spi-txx9.c.

#define TXx9_SPCR1   0x08

Definition at line 38 of file spi-txx9.c.

#define TXx9_SPDR   0x18

Definition at line 41 of file spi-txx9.c.

#define TXx9_SPFS   0x0c

Definition at line 39 of file spi-txx9.c.

#define TXx9_SPMCR   0x00

Definition at line 36 of file spi-txx9.c.

#define TXx9_SPMCR_ACTIVE   0x80

Definition at line 46 of file spi-txx9.c.

#define TXx9_SPMCR_BCLR   0x01

Definition at line 48 of file spi-txx9.c.

#define TXx9_SPMCR_CONFIG   0x40

Definition at line 45 of file spi-txx9.c.

#define TXx9_SPMCR_OPMODE   0xc0

Definition at line 44 of file spi-txx9.c.

#define TXx9_SPMCR_SPSTP   0x02

Definition at line 47 of file spi-txx9.c.

#define TXx9_SPSR   0x14

Definition at line 40 of file spi-txx9.c.

#define TXx9_SPSR_IFSD   0x0008

Definition at line 68 of file spi-txx9.c.

#define TXx9_SPSR_RBS_MASK   0x0700

Definition at line 66 of file spi-txx9.c.

#define TXx9_SPSR_RBSI   0x4000

Definition at line 64 of file spi-txx9.c.

#define TXx9_SPSR_SIDLE   0x0004

Definition at line 69 of file spi-txx9.c.

#define TXx9_SPSR_SPOE   0x0080

Definition at line 67 of file spi-txx9.c.

#define TXx9_SPSR_SRRDY   0x0001

Definition at line 71 of file spi-txx9.c.

#define TXx9_SPSR_STRDY   0x0002

Definition at line 70 of file spi-txx9.c.

#define TXx9_SPSR_TBS_MASK   0x3800

Definition at line 65 of file spi-txx9.c.

#define TXx9_SPSR_TBSI   0x8000

Definition at line 63 of file spi-txx9.c.

Function Documentation

MODULE_ALIAS ( "platform:spi_txx9"  )
MODULE_DESCRIPTION ( "TXx9 SPI Driver"  )
module_exit ( txx9spi_exit  )
MODULE_LICENSE ( "GPL"  )
subsys_initcall ( txx9spi_init  )