27#define SDIO_REG_CCCR_CCCR_REV 0x00
29#define SDIO_CCCR_REV_1_00 0
30#define SDIO_CCCR_REV_1_10 1
31#define SDIO_CCCR_REV_1_20 2
32#define SDIO_CCCR_REV_3_00 3
34#define SDIO_SDIO_REV_1_00 0
35#define SDIO_SDIO_REV_1_10 1
36#define SDIO_SDIO_REV_1_20 2
37#define SDIO_SDIO_REV_2_00 3
39#define SDIO_REG_CCCR_SD_REV 0x01
41#define SDIO_SD_REV_1_01 0
42#define SDIO_SD_REV_1_10 1
43#define SDIO_SD_REV_2_00 2
45#define SDIO_REG_CCCR_IO_EN 0x02
46#define SDIO_REG_CCCR_IO_RDY 0x03
48#define SDIO_REG_CCCR_INT_EN 0x04
49#define SDIO_REG_CCCR_INT_PEND 0x05
51#define SDIO_REG_CCCR_IO_ABORT 0x06
53#define SDIO_REG_CCCR_BUS_IF 0x07
55#define SDIO_BUS_WIDTH_1BIT 0x00
56#define SDIO_BUS_WIDTH_4BIT 0x02
57#define SDIO_BUS_ECSI 0x20
58#define SDIO_BUS_SCSI 0x40
60#define SDIO_BUS_ASYNC_INT 0x20
62#define SDIO_BUS_CD_DISABLE 0x80
64#define SDIO_REG_CCCR_CARD_CAPS 0x08
66#define SDIO_CCCR_CAP_SDC 0x01
67#define SDIO_CCCR_CAP_SMB 0x02
68#define SDIO_CCCR_CAP_SRW 0x04
69#define SDIO_CCCR_CAP_SBS 0x08
70#define SDIO_CCCR_CAP_S4MI 0x10
71#define SDIO_CCCR_CAP_E4MI 0x20
72#define SDIO_CCCR_CAP_LSC 0x40
73#define SDIO_CCCR_CAP_4BLS 0x80
75#define SDIO_REG_CCCR_CIS_PTR 0x09
78#define SDIO_REG_CCCR_BUS_SUSPEND 0x0c
79#define SDIO_REG_CCCR_FUNC_SEL 0x0d
80#define SDIO_REG_CCCR_EXEC_FLAG 0x0e
81#define SDIO_REG_CCCR_READY_FLAG 0x0f
83#define SDIO_REG_CCCR_FN0_BLKSIZE 0x10
85#define SDIO_REG_CCCR_POWER_CTRL 0x12
87#define SDIO_POWER_SMPC 0x01
88#define SDIO_POWER_EMPC 0x02
90#define SDIO_REG_CCCR_SPEED 0x13
92#define SDIO_SPEED_SHS 0x01
93#define SDIO_SPEED_EHS 0x02
99#define SDIO_REG_FBR_BASE(f) ((f) * 0x100)
101#define SDIO_REG_FBR_STD_FUNC_IF 0x00
103#define SDIO_FBR_SUPPORTS_CSA 0x40
104#define SDIO_FBR_ENABLE_CSA 0x80
106#define SDIO_REG_FBR_STD_IF_EXT 0x01
108#define SDIO_REG_FBR_POWER 0x02
110#define SDIO_FBR_POWER_SPS 0x01
111#define SDIO_FBR_POWER_EPS 0x02
113#define SDIO_REG_FBR_CIS 0x09
116#define SDIO_REG_FBR_CSA 0x0C
118#define SDIO_REG_FBR_CSA_DATA 0x0F
120#define SDIO_REG_FBR_BLKSIZE 0x10
123#define CISTPL_NULL 0x00
124#define CISTPL_CHECKSUM 0x10
125#define CISTPL_VERS_1 0x15
126#define CISTPL_ALTSTR 0x16
127#define CISTPL_MANFID 0x20
128#define CISTPL_FUNCID 0x21
129#define CISTPL_FUNCE 0x22
130#define CISTPL_SDIO_STD 0x91
131#define CISTPL_SDIO_EXT 0x92
132#define CISTPL_END 0xff
135#define SDIO_ANY_FUNC_ID 0xff
136#define SDIO_ANY_MAN_ID 0xffff
137#define SDIO_ANY_PROD_ID 0xffff
void sdio_set_drvdata(struct rt_sdio_function *func, void *data)
rt_int32_t sdio_io_writew(struct rt_sdio_function *func, rt_uint16_t data, rt_uint32_t addr)
rt_uint8_t sdio_io_readb(struct rt_sdio_function *func, rt_uint32_t reg, rt_int32_t *err)
rt_int32_t sdio_io_write_multi_incr_b(struct rt_sdio_function *func, rt_uint32_t addr, rt_uint8_t *buf, rt_uint32_t len)
rt_int32_t sdio_disable_func(struct rt_sdio_function *func)
rt_int32_t sdio_detach_irq(struct rt_sdio_function *func)
rt_int32_t sdio_io_rw_extended(struct rt_mmcsd_card *card, rt_int32_t rw, rt_uint32_t fn, rt_uint32_t addr, rt_int32_t op_code, rt_uint8_t *buf, rt_uint32_t blocks, rt_uint32_t blksize)
rt_int32_t sdio_io_send_op_cond(struct rt_mmcsd_host *host, rt_uint32_t ocr, rt_uint32_t *cmd5_resp)
rt_int32_t sdio_io_rw_extended_block(struct rt_sdio_function *func, rt_int32_t rw, rt_uint32_t addr, rt_int32_t op_code, rt_uint8_t *buf, rt_uint32_t len)
rt_int32_t sdio_io_writel(struct rt_sdio_function *func, rt_uint32_t data, rt_uint32_t addr)
rt_int32_t sdio_unregister_driver(struct rt_sdio_driver *driver)
rt_uint32_t sdio_io_readl(struct rt_sdio_function *func, rt_uint32_t addr, rt_int32_t *err)
rt_int32_t sdio_io_read_multi_fifo_b(struct rt_sdio_function *func, rt_uint32_t addr, rt_uint8_t *buf, rt_uint32_t len)
rt_int32_t sdio_io_rw_direct(struct rt_mmcsd_card *card, rt_int32_t rw, rt_uint32_t fn, rt_uint32_t reg_addr, rt_uint8_t *pdata, rt_uint8_t raw)
rt_int32_t sdio_register_driver(struct rt_sdio_driver *driver)
rt_uint16_t sdio_io_readw(struct rt_sdio_function *func, rt_uint32_t addr, rt_int32_t *err)
rt_int32_t sdio_set_block_size(struct rt_sdio_function *func, rt_uint32_t blksize)
rt_int32_t sdio_io_write_multi_fifo_b(struct rt_sdio_function *func, rt_uint32_t addr, rt_uint8_t *buf, rt_uint32_t len)
rt_int32_t sdio_attach_irq(struct rt_sdio_function *func, rt_sdio_irq_handler_t *handler)
rt_int32_t sdio_io_read_multi_incr_b(struct rt_sdio_function *func, rt_uint32_t addr, rt_uint8_t *buf, rt_uint32_t len)
rt_int32_t sdio_io_writeb(struct rt_sdio_function *func, rt_uint32_t reg, rt_uint8_t data)
rt_int32_t init_sdio(struct rt_mmcsd_host *host, rt_uint32_t ocr)
rt_int32_t sdio_enable_func(struct rt_sdio_function *func)
void * sdio_get_drvdata(struct rt_sdio_function *func)
void sdio_irq_wakeup(struct rt_mmcsd_host *host)
void rt_sdio_irq_handler_t(struct rt_sdio_function *)
unsigned short rt_uint16_t
rt_int32_t(* remove)(struct rt_mmcsd_card *card)
struct rt_sdio_device_id * id
rt_int32_t(* probe)(struct rt_mmcsd_card *card)