aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/mmc/sdio.h12
-rw-r--r--include/linux/mmc/sdio_func.h20
2 files changed, 32 insertions, 0 deletions
diff --git a/include/linux/mmc/sdio.h b/include/linux/mmc/sdio.h
index 56239f4aab04..9b1ec76cac37 100644
--- a/include/linux/mmc/sdio.h
+++ b/include/linux/mmc/sdio.h
@@ -15,6 +15,7 @@
15/* SDIO commands type argument response */ 15/* SDIO commands type argument response */
16#define SD_IO_SEND_OP_COND 5 /* bcr [23:0] OCR R4 */ 16#define SD_IO_SEND_OP_COND 5 /* bcr [23:0] OCR R4 */
17#define SD_IO_RW_DIRECT 52 /* ac [31:0] See below R5 */ 17#define SD_IO_RW_DIRECT 52 /* ac [31:0] See below R5 */
18#define SD_IO_RW_EXTENDED 53 /* adtc [31:0] See below R5 */
18 19
19/* 20/*
20 * SD_IO_RW_DIRECT argument format: 21 * SD_IO_RW_DIRECT argument format:
@@ -27,6 +28,17 @@
27 */ 28 */
28 29
29/* 30/*
31 * SD_IO_RW_EXTENDED argument format:
32 *
33 * [31] R/W flag
34 * [30:28] Function number
35 * [27] Block mode
36 * [26] Increment address
37 * [25:9] Register address
38 * [8:0] Byte/block count
39 */
40
41/*
30 SDIO status in R5 42 SDIO status in R5
31 Type 43 Type
32 e : error bit 44 e : error bit
diff --git a/include/linux/mmc/sdio_func.h b/include/linux/mmc/sdio_func.h
index a8d268c9c276..af813fffc4ac 100644
--- a/include/linux/mmc/sdio_func.h
+++ b/include/linux/mmc/sdio_func.h
@@ -48,6 +48,8 @@ struct sdio_func {
48 unsigned int state; /* function state */ 48 unsigned int state; /* function state */
49#define SDIO_STATE_PRESENT (1<<0) /* present in sysfs */ 49#define SDIO_STATE_PRESENT (1<<0) /* present in sysfs */
50 50
51 u8 tmpbuf[4]; /* DMA:able scratch buffer */
52
51 struct sdio_func_tuple *tuples; 53 struct sdio_func_tuple *tuples;
52}; 54};
53 55
@@ -114,9 +116,27 @@ extern int sdio_release_irq(struct sdio_func *func);
114 116
115extern unsigned char sdio_readb(struct sdio_func *func, 117extern unsigned char sdio_readb(struct sdio_func *func,
116 unsigned int addr, int *err_ret); 118 unsigned int addr, int *err_ret);
119extern unsigned short sdio_readw(struct sdio_func *func,
120 unsigned int addr, int *err_ret);
121extern unsigned long sdio_readl(struct sdio_func *func,
122 unsigned int addr, int *err_ret);
123
124extern int sdio_memcpy_fromio(struct sdio_func *func, void *dst,
125 unsigned int addr, int count);
126extern int sdio_readsb(struct sdio_func *func, void *dst,
127 unsigned int addr, int count);
117 128
118extern void sdio_writeb(struct sdio_func *func, unsigned char b, 129extern void sdio_writeb(struct sdio_func *func, unsigned char b,
119 unsigned int addr, int *err_ret); 130 unsigned int addr, int *err_ret);
131extern void sdio_writew(struct sdio_func *func, unsigned short b,
132 unsigned int addr, int *err_ret);
133extern void sdio_writel(struct sdio_func *func, unsigned long b,
134 unsigned int addr, int *err_ret);
135
136extern int sdio_memcpy_toio(struct sdio_func *func, unsigned int addr,
137 void *src, int count);
138extern int sdio_writesb(struct sdio_func *func, unsigned int addr,
139 void *src, int count);
120 140
121#endif 141#endif
122 142