Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions
mmc_spi.c File Reference
#include <linux/sched.h>
#include <linux/delay.h>
#include <linux/slab.h>
#include <linux/module.h>
#include <linux/bio.h>
#include <linux/dma-mapping.h>
#include <linux/crc7.h>
#include <linux/crc-itu-t.h>
#include <linux/scatterlist.h>
#include <linux/mmc/host.h>
#include <linux/mmc/mmc.h>
#include <linux/spi/spi.h>
#include <linux/spi/mmc_spi.h>
#include <asm/unaligned.h>

Go to the source code of this file.

Data Structures

struct  scratch
 
struct  mmc_spi_host
 

Macros

#define SPI_MMC_RESPONSE_CODE(x)   ((x) & 0x1f)
 
#define SPI_RESPONSE_ACCEPTED   ((2 << 1)|1)
 
#define SPI_RESPONSE_CRC_ERR   ((5 << 1)|1)
 
#define SPI_RESPONSE_WRITE_ERR   ((6 << 1)|1)
 
#define SPI_TOKEN_SINGLE   0xfe /* single block r/w, multiblock read */
 
#define SPI_TOKEN_MULTI_WRITE   0xfc /* multiblock write */
 
#define SPI_TOKEN_STOP_TRAN   0xfd /* terminate multiblock write */
 
#define MMC_SPI_BLOCKSIZE   512
 
#define r1b_timeout   (HZ * 3)
 
#define MMC_SPI_BLOCKSATONCE   128
 

Functions

 module_spi_driver (mmc_spi_driver)
 
 MODULE_AUTHOR ("Mike Lavender, David Brownell, ""Hans-Peter Nilsson, Jan Nikitenko")
 
 MODULE_DESCRIPTION ("SPI SD/MMC host driver")
 
 MODULE_LICENSE ("GPL")
 
 MODULE_ALIAS ("spi:mmc_spi")
 

Macro Definition Documentation

#define MMC_SPI_BLOCKSATONCE   128

Definition at line 109 of file mmc_spi.c.

#define MMC_SPI_BLOCKSIZE   512

Definition at line 91 of file mmc_spi.c.

#define r1b_timeout   (HZ * 3)

Definition at line 100 of file mmc_spi.c.

#define SPI_MMC_RESPONSE_CODE (   x)    ((x) & 0x1f)

Definition at line 79 of file mmc_spi.c.

#define SPI_RESPONSE_ACCEPTED   ((2 << 1)|1)

Definition at line 80 of file mmc_spi.c.

#define SPI_RESPONSE_CRC_ERR   ((5 << 1)|1)

Definition at line 81 of file mmc_spi.c.

#define SPI_RESPONSE_WRITE_ERR   ((6 << 1)|1)

Definition at line 82 of file mmc_spi.c.

#define SPI_TOKEN_MULTI_WRITE   0xfc /* multiblock write */

Definition at line 88 of file mmc_spi.c.

#define SPI_TOKEN_SINGLE   0xfe /* single block r/w, multiblock read */

Definition at line 87 of file mmc_spi.c.

#define SPI_TOKEN_STOP_TRAN   0xfd /* terminate multiblock write */

Definition at line 89 of file mmc_spi.c.

Function Documentation

MODULE_ALIAS ( "spi:mmc_spi"  )
MODULE_AUTHOR ( "Mike  Lavender,
David  Brownell,
""Hans-Peter  Nilsson,
Jan Nikitenko"   
)
MODULE_DESCRIPTION ( "SPI SD/MMC host driver )
MODULE_LICENSE ( "GPL"  )
module_spi_driver ( mmc_spi_driver  )