Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions
omap.c File Reference
#include <linux/module.h>
#include <linux/moduleparam.h>
#include <linux/init.h>
#include <linux/ioport.h>
#include <linux/platform_device.h>
#include <linux/interrupt.h>
#include <linux/dmaengine.h>
#include <linux/dma-mapping.h>
#include <linux/delay.h>
#include <linux/spinlock.h>
#include <linux/timer.h>
#include <linux/omap-dma.h>
#include <linux/mmc/host.h>
#include <linux/mmc/card.h>
#include <linux/clk.h>
#include <linux/scatterlist.h>
#include <linux/slab.h>
#include <plat/mmc.h>
#include <plat/dma.h>

Go to the source code of this file.

Data Structures

struct  mmc_omap_slot
 
struct  mmc_omap_host
 

Macros

#define OMAP_MMC_REG_CMD   0x00
 
#define OMAP_MMC_REG_ARGL   0x01
 
#define OMAP_MMC_REG_ARGH   0x02
 
#define OMAP_MMC_REG_CON   0x03
 
#define OMAP_MMC_REG_STAT   0x04
 
#define OMAP_MMC_REG_IE   0x05
 
#define OMAP_MMC_REG_CTO   0x06
 
#define OMAP_MMC_REG_DTO   0x07
 
#define OMAP_MMC_REG_DATA   0x08
 
#define OMAP_MMC_REG_BLEN   0x09
 
#define OMAP_MMC_REG_NBLK   0x0a
 
#define OMAP_MMC_REG_BUF   0x0b
 
#define OMAP_MMC_REG_SDIO   0x0d
 
#define OMAP_MMC_REG_REV   0x0f
 
#define OMAP_MMC_REG_RSP0   0x10
 
#define OMAP_MMC_REG_RSP1   0x11
 
#define OMAP_MMC_REG_RSP2   0x12
 
#define OMAP_MMC_REG_RSP3   0x13
 
#define OMAP_MMC_REG_RSP4   0x14
 
#define OMAP_MMC_REG_RSP5   0x15
 
#define OMAP_MMC_REG_RSP6   0x16
 
#define OMAP_MMC_REG_RSP7   0x17
 
#define OMAP_MMC_REG_IOSR   0x18
 
#define OMAP_MMC_REG_SYSC   0x19
 
#define OMAP_MMC_REG_SYSS   0x1a
 
#define OMAP_MMC_STAT_CARD_ERR   (1 << 14)
 
#define OMAP_MMC_STAT_CARD_IRQ   (1 << 13)
 
#define OMAP_MMC_STAT_OCR_BUSY   (1 << 12)
 
#define OMAP_MMC_STAT_A_EMPTY   (1 << 11)
 
#define OMAP_MMC_STAT_A_FULL   (1 << 10)
 
#define OMAP_MMC_STAT_CMD_CRC   (1 << 8)
 
#define OMAP_MMC_STAT_CMD_TOUT   (1 << 7)
 
#define OMAP_MMC_STAT_DATA_CRC   (1 << 6)
 
#define OMAP_MMC_STAT_DATA_TOUT   (1 << 5)
 
#define OMAP_MMC_STAT_END_BUSY   (1 << 4)
 
#define OMAP_MMC_STAT_END_OF_DATA   (1 << 3)
 
#define OMAP_MMC_STAT_CARD_BUSY   (1 << 2)
 
#define OMAP_MMC_STAT_END_OF_CMD   (1 << 0)
 
#define OMAP_MMC_REG(host, reg)   (OMAP_MMC_REG_##reg << (host)->reg_shift)
 
#define OMAP_MMC_READ(host, reg)   __raw_readw((host)->virt_base + OMAP_MMC_REG(host, reg))
 
#define OMAP_MMC_WRITE(host, reg, val)   __raw_writew((val), (host)->virt_base + OMAP_MMC_REG(host, reg))
 
#define OMAP_MMC_CMDTYPE_BC   0
 
#define OMAP_MMC_CMDTYPE_BCR   1
 
#define OMAP_MMC_CMDTYPE_AC   2
 
#define OMAP_MMC_CMDTYPE_ADTC   3
 
#define DRIVER_NAME   "mmci-omap"
 
#define OMAP_MMC_COVER_POLL_DELAY   500
 
#define mmc_omap_suspend   NULL
 
#define mmc_omap_resume   NULL
 

Functions

void omap_mmc_notify_cover_event (struct device *dev, int num, int is_closed)
 
 module_platform_driver (mmc_omap_driver)
 
 MODULE_DESCRIPTION ("OMAP Multimedia Card driver")
 
 MODULE_LICENSE ("GPL")
 
 MODULE_ALIAS ("platform:"DRIVER_NAME)
 
 MODULE_AUTHOR ("Juha Yrjölä")
 

Macro Definition Documentation

#define DRIVER_NAME   "mmci-omap"

Definition at line 88 of file omap.c.

#define mmc_omap_resume   NULL

Definition at line 1564 of file omap.c.

#define mmc_omap_suspend   NULL

Definition at line 1563 of file omap.c.

#define OMAP_MMC_CMDTYPE_AC   2

Definition at line 84 of file omap.c.

#define OMAP_MMC_CMDTYPE_ADTC   3

Definition at line 85 of file omap.c.

#define OMAP_MMC_CMDTYPE_BC   0

Definition at line 82 of file omap.c.

#define OMAP_MMC_CMDTYPE_BCR   1

Definition at line 83 of file omap.c.

#define OMAP_MMC_COVER_POLL_DELAY   500

Definition at line 92 of file omap.c.

#define OMAP_MMC_READ (   host,
  reg 
)    __raw_readw((host)->virt_base + OMAP_MMC_REG(host, reg))

Definition at line 76 of file omap.c.

#define OMAP_MMC_REG (   host,
  reg 
)    (OMAP_MMC_REG_##reg << (host)->reg_shift)

Definition at line 75 of file omap.c.

#define OMAP_MMC_REG_ARGH   0x02

Definition at line 37 of file omap.c.

#define OMAP_MMC_REG_ARGL   0x01

Definition at line 36 of file omap.c.

#define OMAP_MMC_REG_BLEN   0x09

Definition at line 44 of file omap.c.

#define OMAP_MMC_REG_BUF   0x0b

Definition at line 46 of file omap.c.

#define OMAP_MMC_REG_CMD   0x00

Definition at line 35 of file omap.c.

#define OMAP_MMC_REG_CON   0x03

Definition at line 38 of file omap.c.

#define OMAP_MMC_REG_CTO   0x06

Definition at line 41 of file omap.c.

#define OMAP_MMC_REG_DATA   0x08

Definition at line 43 of file omap.c.

#define OMAP_MMC_REG_DTO   0x07

Definition at line 42 of file omap.c.

#define OMAP_MMC_REG_IE   0x05

Definition at line 40 of file omap.c.

#define OMAP_MMC_REG_IOSR   0x18

Definition at line 57 of file omap.c.

#define OMAP_MMC_REG_NBLK   0x0a

Definition at line 45 of file omap.c.

#define OMAP_MMC_REG_REV   0x0f

Definition at line 48 of file omap.c.

#define OMAP_MMC_REG_RSP0   0x10

Definition at line 49 of file omap.c.

#define OMAP_MMC_REG_RSP1   0x11

Definition at line 50 of file omap.c.

#define OMAP_MMC_REG_RSP2   0x12

Definition at line 51 of file omap.c.

#define OMAP_MMC_REG_RSP3   0x13

Definition at line 52 of file omap.c.

#define OMAP_MMC_REG_RSP4   0x14

Definition at line 53 of file omap.c.

#define OMAP_MMC_REG_RSP5   0x15

Definition at line 54 of file omap.c.

#define OMAP_MMC_REG_RSP6   0x16

Definition at line 55 of file omap.c.

#define OMAP_MMC_REG_RSP7   0x17

Definition at line 56 of file omap.c.

#define OMAP_MMC_REG_SDIO   0x0d

Definition at line 47 of file omap.c.

#define OMAP_MMC_REG_STAT   0x04

Definition at line 39 of file omap.c.

#define OMAP_MMC_REG_SYSC   0x19

Definition at line 58 of file omap.c.

#define OMAP_MMC_REG_SYSS   0x1a

Definition at line 59 of file omap.c.

#define OMAP_MMC_STAT_A_EMPTY   (1 << 11)

Definition at line 64 of file omap.c.

#define OMAP_MMC_STAT_A_FULL   (1 << 10)

Definition at line 65 of file omap.c.

#define OMAP_MMC_STAT_CARD_BUSY   (1 << 2)

Definition at line 72 of file omap.c.

#define OMAP_MMC_STAT_CARD_ERR   (1 << 14)

Definition at line 61 of file omap.c.

#define OMAP_MMC_STAT_CARD_IRQ   (1 << 13)

Definition at line 62 of file omap.c.

#define OMAP_MMC_STAT_CMD_CRC   (1 << 8)

Definition at line 66 of file omap.c.

#define OMAP_MMC_STAT_CMD_TOUT   (1 << 7)

Definition at line 67 of file omap.c.

#define OMAP_MMC_STAT_DATA_CRC   (1 << 6)

Definition at line 68 of file omap.c.

#define OMAP_MMC_STAT_DATA_TOUT   (1 << 5)

Definition at line 69 of file omap.c.

#define OMAP_MMC_STAT_END_BUSY   (1 << 4)

Definition at line 70 of file omap.c.

#define OMAP_MMC_STAT_END_OF_CMD   (1 << 0)

Definition at line 73 of file omap.c.

#define OMAP_MMC_STAT_END_OF_DATA   (1 << 3)

Definition at line 71 of file omap.c.

#define OMAP_MMC_STAT_OCR_BUSY   (1 << 12)

Definition at line 63 of file omap.c.

#define OMAP_MMC_WRITE (   host,
  reg,
  val 
)    __raw_writew((val), (host)->virt_base + OMAP_MMC_REG(host, reg))

Definition at line 77 of file omap.c.

Function Documentation

MODULE_ALIAS ( "platform:"  DRIVER_NAME)
MODULE_AUTHOR ( "Juha Yrjölä"  )
MODULE_DESCRIPTION ( "OMAP Multimedia Card driver )
MODULE_LICENSE ( "GPL"  )
module_platform_driver ( mmc_omap_driver  )
void omap_mmc_notify_cover_event ( struct device dev,
int  num,
int  is_closed 
)

Definition at line 849 of file omap.c.