Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions
tmio.h File Reference
#include <linux/device.h>
#include <linux/fb.h>
#include <linux/io.h>
#include <linux/jiffies.h>
#include <linux/platform_device.h>
#include <linux/pm_runtime.h>
#include <linux/mmc/host.h>

Go to the source code of this file.

Data Structures

struct  tmio_mmc_dma
 
struct  tmio_mmc_data
 
struct  tmio_nand_data
 
struct  tmio_fb_data
 

Macros

#define tmio_ioread8(addr)   readb(addr)
 
#define tmio_ioread16(addr)   readw(addr)
 
#define tmio_ioread16_rep(r, b, l)   readsw(r, b, l)
 
#define tmio_ioread32(addr)   (((u32) readw((addr))) | (((u32) readw((addr) + 2)) << 16))
 
#define tmio_iowrite8(val, addr)   writeb((val), (addr))
 
#define tmio_iowrite16(val, addr)   writew((val), (addr))
 
#define tmio_iowrite16_rep(r, b, l)   writesw(r, b, l)
 
#define tmio_iowrite32(val, addr)
 
#define CNF_CMD   0x04
 
#define CNF_CTL_BASE   0x10
 
#define CNF_INT_PIN   0x3d
 
#define CNF_STOP_CLK_CTL   0x40
 
#define CNF_GCLK_CTL   0x41
 
#define CNF_SD_CLK_MODE   0x42
 
#define CNF_PIN_STATUS   0x44
 
#define CNF_PWR_CTL_1   0x48
 
#define CNF_PWR_CTL_2   0x49
 
#define CNF_PWR_CTL_3   0x4a
 
#define CNF_CARD_DETECT_MODE   0x4c
 
#define CNF_SD_SLOT   0x50
 
#define CNF_EXT_GCLK_CTL_1   0xf0
 
#define CNF_EXT_GCLK_CTL_2   0xf1
 
#define CNF_EXT_GCLK_CTL_3   0xf9
 
#define CNF_SD_LED_EN_1   0xfa
 
#define CNF_SD_LED_EN_2   0xfe
 
#define SDCREN   0x2 /* Enable access to MMC CTL regs. (flag in COMMAND_REG)*/
 
#define sd_config_write8(base, shift, reg, val)   tmio_iowrite8((val), (base) + ((reg) << (shift)))
 
#define sd_config_write16(base, shift, reg, val)   tmio_iowrite16((val), (base) + ((reg) << (shift)))
 
#define sd_config_write32(base, shift, reg, val)
 
#define TMIO_MMC_WRPROTECT_DISABLE   (1 << 0)
 
#define TMIO_MMC_BLKSZ_2BYTES   (1 << 1)
 
#define TMIO_MMC_SDIO_IRQ   (1 << 2)
 
#define TMIO_MMC_HAS_COLD_CD   (1 << 3)
 
#define TMIO_MMC_HAS_IDLE_WAIT   (1 << 4)
 
#define TMIO_MMC_USE_GPIO_CD   (1 << 5)
 
#define FBIO_TMIO_ACC_WRITE   0x7C639300
 
#define FBIO_TMIO_ACC_SYNC   0x7C639301
 

Functions

int tmio_core_mmc_enable (void __iomem *cnf, int shift, unsigned long base)
 
int tmio_core_mmc_resume (void __iomem *cnf, int shift, unsigned long base)
 
void tmio_core_mmc_pwr (void __iomem *cnf, int shift, int state)
 
void tmio_core_mmc_clk_div (void __iomem *cnf, int shift, int state)
 

Macro Definition Documentation

#define CNF_CARD_DETECT_MODE   0x4c

Definition at line 36 of file tmio.h.

#define CNF_CMD   0x04

Definition at line 26 of file tmio.h.

#define CNF_CTL_BASE   0x10

Definition at line 27 of file tmio.h.

#define CNF_EXT_GCLK_CTL_1   0xf0

Definition at line 38 of file tmio.h.

#define CNF_EXT_GCLK_CTL_2   0xf1

Definition at line 39 of file tmio.h.

#define CNF_EXT_GCLK_CTL_3   0xf9

Definition at line 40 of file tmio.h.

#define CNF_GCLK_CTL   0x41

Definition at line 30 of file tmio.h.

#define CNF_INT_PIN   0x3d

Definition at line 28 of file tmio.h.

#define CNF_PIN_STATUS   0x44

Definition at line 32 of file tmio.h.

#define CNF_PWR_CTL_1   0x48

Definition at line 33 of file tmio.h.

#define CNF_PWR_CTL_2   0x49

Definition at line 34 of file tmio.h.

#define CNF_PWR_CTL_3   0x4a

Definition at line 35 of file tmio.h.

#define CNF_SD_CLK_MODE   0x42

Definition at line 31 of file tmio.h.

#define CNF_SD_LED_EN_1   0xfa

Definition at line 41 of file tmio.h.

#define CNF_SD_LED_EN_2   0xfe

Definition at line 42 of file tmio.h.

#define CNF_SD_SLOT   0x50

Definition at line 37 of file tmio.h.

#define CNF_STOP_CLK_CTL   0x40

Definition at line 29 of file tmio.h.

#define FBIO_TMIO_ACC_SYNC   0x7C639301

Definition at line 141 of file tmio.h.

#define FBIO_TMIO_ACC_WRITE   0x7C639300

Definition at line 140 of file tmio.h.

#define sd_config_write16 (   base,
  shift,
  reg,
  val 
)    tmio_iowrite16((val), (base) + ((reg) << (shift)))

Definition at line 48 of file tmio.h.

#define sd_config_write32 (   base,
  shift,
  reg,
  val 
)
Value:
do { \
tmio_iowrite16((val), (base) + ((reg) << (shift))); \
tmio_iowrite16((val) >> 16, (base) + ((reg + 2) << (shift))); \
} while (0)

Definition at line 50 of file tmio.h.

#define sd_config_write8 (   base,
  shift,
  reg,
  val 
)    tmio_iowrite8((val), (base) + ((reg) << (shift)))

Definition at line 46 of file tmio.h.

#define SDCREN   0x2 /* Enable access to MMC CTL regs. (flag in COMMAND_REG)*/

Definition at line 44 of file tmio.h.

#define tmio_ioread16 (   addr)    readw(addr)

Definition at line 12 of file tmio.h.

#define tmio_ioread16_rep (   r,
  b,
  l 
)    readsw(r, b, l)

Definition at line 13 of file tmio.h.

#define tmio_ioread32 (   addr)    (((u32) readw((addr))) | (((u32) readw((addr) + 2)) << 16))

Definition at line 14 of file tmio.h.

#define tmio_ioread8 (   addr)    readb(addr)

Definition at line 11 of file tmio.h.

#define tmio_iowrite16 (   val,
  addr 
)    writew((val), (addr))

Definition at line 18 of file tmio.h.

#define tmio_iowrite16_rep (   r,
  b,
  l 
)    writesw(r, b, l)

Definition at line 19 of file tmio.h.

#define tmio_iowrite32 (   val,
  addr 
)
Value:
do { \
writew((val), (addr)); \
writew((val) >> 16, (addr) + 2); \
} while (0)

Definition at line 20 of file tmio.h.

#define tmio_iowrite8 (   val,
  addr 
)    writeb((val), (addr))

Definition at line 17 of file tmio.h.

#define TMIO_MMC_BLKSZ_2BYTES   (1 << 1)

Definition at line 62 of file tmio.h.

#define TMIO_MMC_HAS_COLD_CD   (1 << 3)

Definition at line 72 of file tmio.h.

#define TMIO_MMC_HAS_IDLE_WAIT   (1 << 4)

Definition at line 77 of file tmio.h.

#define TMIO_MMC_SDIO_IRQ   (1 << 2)

Definition at line 66 of file tmio.h.

#define TMIO_MMC_USE_GPIO_CD   (1 << 5)

Definition at line 83 of file tmio.h.

#define TMIO_MMC_WRPROTECT_DISABLE   (1 << 0)

Definition at line 57 of file tmio.h.

Function Documentation

void tmio_core_mmc_clk_div ( void __iomem cnf,
int  shift,
int  state 
)

Definition at line 48 of file tmio_core.c.

int tmio_core_mmc_enable ( void __iomem cnf,
int  shift,
unsigned long  base 
)

Definition at line 12 of file tmio_core.c.

void tmio_core_mmc_pwr ( void __iomem cnf,
int  shift,
int  state 
)

Definition at line 42 of file tmio_core.c.

int tmio_core_mmc_resume ( void __iomem cnf,
int  shift,
unsigned long  base 
)

Definition at line 31 of file tmio_core.c.