Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions
spi-sh.c File Reference
#include <linux/module.h>
#include <linux/kernel.h>
#include <linux/sched.h>
#include <linux/errno.h>
#include <linux/timer.h>
#include <linux/delay.h>
#include <linux/list.h>
#include <linux/workqueue.h>
#include <linux/interrupt.h>
#include <linux/platform_device.h>
#include <linux/io.h>
#include <linux/spi/spi.h>

Go to the source code of this file.

Data Structures

struct  spi_sh_data
 

Macros

#define SPI_SH_TBR   0x00
 
#define SPI_SH_RBR   0x00
 
#define SPI_SH_CR1   0x08
 
#define SPI_SH_CR2   0x10
 
#define SPI_SH_CR3   0x18
 
#define SPI_SH_CR4   0x20
 
#define SPI_SH_CR5   0x28
 
#define SPI_SH_TBE   0x80
 
#define SPI_SH_TBF   0x40
 
#define SPI_SH_RBE   0x20
 
#define SPI_SH_RBF   0x10
 
#define SPI_SH_PFONRD   0x08
 
#define SPI_SH_SSDB   0x04
 
#define SPI_SH_SSD   0x02
 
#define SPI_SH_SSA   0x01
 
#define SPI_SH_RSTF   0x80
 
#define SPI_SH_LOOPBK   0x40
 
#define SPI_SH_CPOL   0x20
 
#define SPI_SH_CPHA   0x10
 
#define SPI_SH_L1M0   0x08
 
#define SPI_SH_MAX_BYTE   0xFF
 
#define SPI_SH_TBEI   0x80
 
#define SPI_SH_TBFI   0x40
 
#define SPI_SH_RBEI   0x20
 
#define SPI_SH_RBFI   0x10
 
#define SPI_SH_WPABRT   0x04
 
#define SPI_SH_SSS   0x01
 
#define SPI_SH_P1L0   0x80
 
#define SPI_SH_PP1L0   0x40
 
#define SPI_SH_MUXI   0x20
 
#define SPI_SH_MUXIRQ   0x10
 
#define SPI_SH_FIFO_SIZE   32
 
#define SPI_SH_SEND_TIMEOUT   (3 * HZ)
 
#define SPI_SH_RECEIVE_TIMEOUT   (HZ >> 3)
 

Functions

 module_platform_driver (spi_sh_driver)
 
 MODULE_DESCRIPTION ("SH SPI bus driver")
 
 MODULE_LICENSE ("GPL")
 
 MODULE_AUTHOR ("Yoshihiro Shimoda")
 
 MODULE_ALIAS ("platform:sh_spi")
 

Macro Definition Documentation

#define SPI_SH_CPHA   0x10

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

#define SPI_SH_CPOL   0x20

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

#define SPI_SH_CR1   0x08

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

#define SPI_SH_CR2   0x10

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

#define SPI_SH_CR3   0x18

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

#define SPI_SH_CR4   0x20

Definition at line 42 of file spi-sh.c.

#define SPI_SH_CR5   0x28

Definition at line 43 of file spi-sh.c.

#define SPI_SH_FIFO_SIZE   32

Definition at line 79 of file spi-sh.c.

#define SPI_SH_L1M0   0x08

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

#define SPI_SH_LOOPBK   0x40

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

#define SPI_SH_MAX_BYTE   0xFF

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

#define SPI_SH_MUXI   0x20

Definition at line 76 of file spi-sh.c.

#define SPI_SH_MUXIRQ   0x10

Definition at line 77 of file spi-sh.c.

#define SPI_SH_P1L0   0x80

Definition at line 74 of file spi-sh.c.

#define SPI_SH_PFONRD   0x08

Definition at line 50 of file spi-sh.c.

#define SPI_SH_PP1L0   0x40

Definition at line 75 of file spi-sh.c.

#define SPI_SH_RBE   0x20

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

#define SPI_SH_RBEI   0x20

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

#define SPI_SH_RBF   0x10

Definition at line 49 of file spi-sh.c.

#define SPI_SH_RBFI   0x10

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

#define SPI_SH_RBR   0x00

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

#define SPI_SH_RECEIVE_TIMEOUT   (HZ >> 3)

Definition at line 81 of file spi-sh.c.

#define SPI_SH_RSTF   0x80

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

#define SPI_SH_SEND_TIMEOUT   (3 * HZ)

Definition at line 80 of file spi-sh.c.

#define SPI_SH_SSA   0x01

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

#define SPI_SH_SSD   0x02

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

#define SPI_SH_SSDB   0x04

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

#define SPI_SH_SSS   0x01

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

#define SPI_SH_TBE   0x80

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

#define SPI_SH_TBEI   0x80

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

#define SPI_SH_TBF   0x40

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

#define SPI_SH_TBFI   0x40

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

#define SPI_SH_TBR   0x00

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

#define SPI_SH_WPABRT   0x04

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

Function Documentation

MODULE_ALIAS ( "platform:sh_spi"  )
MODULE_AUTHOR ( "Yoshihiro Shimoda"  )
MODULE_DESCRIPTION ( "SH SPI bus driver )
MODULE_LICENSE ( "GPL"  )
module_platform_driver ( spi_sh_driver  )