Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Enumerations | Functions
tifm_sd.c File Reference
#include <linux/tifm.h>
#include <linux/mmc/host.h>
#include <linux/highmem.h>
#include <linux/scatterlist.h>
#include <linux/module.h>
#include <asm/io.h>

Go to the source code of this file.

Data Structures

struct  tifm_sd
 

Macros

#define DRIVER_NAME   "tifm_sd"
 
#define DRIVER_VERSION   "0.8"
 
#define TIFM_MMCSD_RESET   0x0002
 
#define TIFM_MMCSD_CLKMASK   0x03ff
 
#define TIFM_MMCSD_POWER   0x0800
 
#define TIFM_MMCSD_4BBUS   0x8000
 
#define TIFM_MMCSD_RXDE   0x8000 /* rx dma enable */
 
#define TIFM_MMCSD_TXDE   0x0080 /* tx dma enable */
 
#define TIFM_MMCSD_BUFINT   0x0c00 /* set bits: AE, AF */
 
#define TIFM_MMCSD_DPE   0x0020 /* data timeout counted in kilocycles */
 
#define TIFM_MMCSD_INAB   0x0080 /* abort / initialize command */
 
#define TIFM_MMCSD_READ   0x8000
 
#define TIFM_MMCSD_ERRMASK   0x01e0 /* set bits: CCRC, CTO, DCRC, DTO */
 
#define TIFM_MMCSD_EOC   0x0001 /* end of command phase */
 
#define TIFM_MMCSD_CD   0x0002 /* card detect */
 
#define TIFM_MMCSD_CB   0x0004 /* card enter busy state */
 
#define TIFM_MMCSD_BRS   0x0008 /* block received/sent */
 
#define TIFM_MMCSD_EOFB   0x0010 /* card exit busy state */
 
#define TIFM_MMCSD_DTO   0x0020 /* data time-out */
 
#define TIFM_MMCSD_DCRC   0x0040 /* data crc error */
 
#define TIFM_MMCSD_CTO   0x0080 /* command time-out */
 
#define TIFM_MMCSD_CCRC   0x0100 /* command crc error */
 
#define TIFM_MMCSD_AF   0x0400 /* fifo almost full */
 
#define TIFM_MMCSD_AE   0x0800 /* fifo almost empty */
 
#define TIFM_MMCSD_OCRB   0x1000 /* OCR busy */
 
#define TIFM_MMCSD_CIRQ   0x2000 /* card irq (cmd40/sdio) */
 
#define TIFM_MMCSD_CERR   0x4000 /* card status error */
 
#define TIFM_MMCSD_ODTO   0x0040 /* open drain / extended timeout */
 
#define TIFM_MMCSD_CARD_RO   0x0200 /* card is read-only */
 
#define TIFM_MMCSD_FIFO_SIZE   0x0020
 
#define TIFM_MMCSD_RSP_R0   0x0000
 
#define TIFM_MMCSD_RSP_R1   0x0100
 
#define TIFM_MMCSD_RSP_R2   0x0200
 
#define TIFM_MMCSD_RSP_R3   0x0300
 
#define TIFM_MMCSD_RSP_R4   0x0400
 
#define TIFM_MMCSD_RSP_R5   0x0500
 
#define TIFM_MMCSD_RSP_R6   0x0600
 
#define TIFM_MMCSD_RSP_BUSY   0x0800
 
#define TIFM_MMCSD_CMD_BC   0x0000
 
#define TIFM_MMCSD_CMD_BCR   0x1000
 
#define TIFM_MMCSD_CMD_AC   0x2000
 
#define TIFM_MMCSD_CMD_ADTC   0x3000
 
#define TIFM_MMCSD_MAX_BLOCK_SIZE   0x0800UL
 
#define tifm_sd_suspend   NULL
 
#define tifm_sd_resume   NULL
 

Enumerations

enum  {
  CMD_READY = 0x0001, FIFO_READY = 0x0002, BRS_READY = 0x0004, SCMD_ACTIVE = 0x0008,
  SCMD_READY = 0x0010, CARD_BUSY = 0x0020, DATA_CARRY = 0x0040
}
 

Functions

 module_param (no_dma, bool, 0644)
 
 module_param (fixed_timeout, bool, 0644)
 
 MODULE_AUTHOR ("Alex Dubov")
 
 MODULE_DESCRIPTION ("TI FlashMedia SD driver")
 
 MODULE_LICENSE ("GPL")
 
 MODULE_DEVICE_TABLE (tifm, tifm_sd_id_tbl)
 
 MODULE_VERSION (DRIVER_VERSION)
 
 module_init (tifm_sd_init)
 
 module_exit (tifm_sd_exit)
 

Macro Definition Documentation

#define DRIVER_NAME   "tifm_sd"

Definition at line 22 of file tifm_sd.c.

#define DRIVER_VERSION   "0.8"

Definition at line 23 of file tifm_sd.c.

#define TIFM_MMCSD_4BBUS   0x8000

Definition at line 34 of file tifm_sd.c.

#define TIFM_MMCSD_AE   0x0800 /* fifo almost empty */

Definition at line 53 of file tifm_sd.c.

#define TIFM_MMCSD_AF   0x0400 /* fifo almost full */

Definition at line 52 of file tifm_sd.c.

#define TIFM_MMCSD_BRS   0x0008 /* block received/sent */

Definition at line 46 of file tifm_sd.c.

#define TIFM_MMCSD_BUFINT   0x0c00 /* set bits: AE, AF */

Definition at line 37 of file tifm_sd.c.

#define TIFM_MMCSD_CARD_RO   0x0200 /* card is read-only */

Definition at line 59 of file tifm_sd.c.

#define TIFM_MMCSD_CB   0x0004 /* card enter busy state */

Definition at line 45 of file tifm_sd.c.

#define TIFM_MMCSD_CCRC   0x0100 /* command crc error */

Definition at line 51 of file tifm_sd.c.

#define TIFM_MMCSD_CD   0x0002 /* card detect */

Definition at line 44 of file tifm_sd.c.

#define TIFM_MMCSD_CERR   0x4000 /* card status error */

Definition at line 56 of file tifm_sd.c.

#define TIFM_MMCSD_CIRQ   0x2000 /* card irq (cmd40/sdio) */

Definition at line 55 of file tifm_sd.c.

#define TIFM_MMCSD_CLKMASK   0x03ff

Definition at line 32 of file tifm_sd.c.

#define TIFM_MMCSD_CMD_AC   0x2000

Definition at line 75 of file tifm_sd.c.

#define TIFM_MMCSD_CMD_ADTC   0x3000

Definition at line 76 of file tifm_sd.c.

#define TIFM_MMCSD_CMD_BC   0x0000

Definition at line 73 of file tifm_sd.c.

#define TIFM_MMCSD_CMD_BCR   0x1000

Definition at line 74 of file tifm_sd.c.

#define TIFM_MMCSD_CTO   0x0080 /* command time-out */

Definition at line 50 of file tifm_sd.c.

#define TIFM_MMCSD_DCRC   0x0040 /* data crc error */

Definition at line 49 of file tifm_sd.c.

#define TIFM_MMCSD_DPE   0x0020 /* data timeout counted in kilocycles */

Definition at line 38 of file tifm_sd.c.

#define TIFM_MMCSD_DTO   0x0020 /* data time-out */

Definition at line 48 of file tifm_sd.c.

#define TIFM_MMCSD_EOC   0x0001 /* end of command phase */

Definition at line 43 of file tifm_sd.c.

#define TIFM_MMCSD_EOFB   0x0010 /* card exit busy state */

Definition at line 47 of file tifm_sd.c.

#define TIFM_MMCSD_ERRMASK   0x01e0 /* set bits: CCRC, CTO, DCRC, DTO */

Definition at line 42 of file tifm_sd.c.

#define TIFM_MMCSD_FIFO_SIZE   0x0020

Definition at line 61 of file tifm_sd.c.

#define TIFM_MMCSD_INAB   0x0080 /* abort / initialize command */

Definition at line 39 of file tifm_sd.c.

#define TIFM_MMCSD_MAX_BLOCK_SIZE   0x0800UL

Definition at line 78 of file tifm_sd.c.

#define TIFM_MMCSD_OCRB   0x1000 /* OCR busy */

Definition at line 54 of file tifm_sd.c.

#define TIFM_MMCSD_ODTO   0x0040 /* open drain / extended timeout */

Definition at line 58 of file tifm_sd.c.

#define TIFM_MMCSD_POWER   0x0800

Definition at line 33 of file tifm_sd.c.

#define TIFM_MMCSD_READ   0x8000

Definition at line 40 of file tifm_sd.c.

#define TIFM_MMCSD_RESET   0x0002

Definition at line 31 of file tifm_sd.c.

#define TIFM_MMCSD_RSP_BUSY   0x0800

Definition at line 71 of file tifm_sd.c.

#define TIFM_MMCSD_RSP_R0   0x0000

Definition at line 63 of file tifm_sd.c.

#define TIFM_MMCSD_RSP_R1   0x0100

Definition at line 64 of file tifm_sd.c.

#define TIFM_MMCSD_RSP_R2   0x0200

Definition at line 65 of file tifm_sd.c.

#define TIFM_MMCSD_RSP_R3   0x0300

Definition at line 66 of file tifm_sd.c.

#define TIFM_MMCSD_RSP_R4   0x0400

Definition at line 67 of file tifm_sd.c.

#define TIFM_MMCSD_RSP_R5   0x0500

Definition at line 68 of file tifm_sd.c.

#define TIFM_MMCSD_RSP_R6   0x0600

Definition at line 69 of file tifm_sd.c.

#define TIFM_MMCSD_RXDE   0x8000 /* rx dma enable */

Definition at line 35 of file tifm_sd.c.

#define TIFM_MMCSD_TXDE   0x0080 /* tx dma enable */

Definition at line 36 of file tifm_sd.c.

#define tifm_sd_resume   NULL

Definition at line 1056 of file tifm_sd.c.

#define tifm_sd_suspend   NULL

Definition at line 1055 of file tifm_sd.c.

Enumeration Type Documentation

anonymous enum
Enumerator:
CMD_READY 
FIFO_READY 
BRS_READY 
SCMD_ACTIVE 
SCMD_READY 
CARD_BUSY 
DATA_CARRY 

Definition at line 80 of file tifm_sd.c.

Function Documentation

MODULE_AUTHOR ( "Alex Dubov"  )
MODULE_DESCRIPTION ( "TI FlashMedia SD driver )
MODULE_DEVICE_TABLE ( tifm  ,
tifm_sd_id_tbl   
)
module_exit ( tifm_sd_exit  )
module_init ( tifm_sd_init  )
MODULE_LICENSE ( "GPL"  )
module_param ( no_dma  ,
bool  ,
0644   
)
module_param ( fixed_timeout  ,
bool  ,
0644   
)
MODULE_VERSION ( DRIVER_VERSION  )