diff options
author | Pierre Ossman <drzeus@drzeus.cx> | 2007-07-06 07:35:01 -0400 |
---|---|---|
committer | Pierre Ossman <drzeus@drzeus.cx> | 2007-09-23 15:09:34 -0400 |
commit | 112c9db91ee6bf19eca7cbb6854be3127381c229 (patch) | |
tree | e2d45c7d18a4a218cc0716d7aef79aa04b73a498 /include | |
parent | 5ed334a1f8caaae98806d572f78c5802975ea20f (diff) |
sdio: support IO_RW_EXTENDED
Support the multi-byte transfer operation, including handlers for
common operations like writel()/readl().
Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/mmc/sdio.h | 12 | ||||
-rw-r--r-- | include/linux/mmc/sdio_func.h | 20 |
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 | ||
115 | extern unsigned char sdio_readb(struct sdio_func *func, | 117 | extern unsigned char sdio_readb(struct sdio_func *func, |
116 | unsigned int addr, int *err_ret); | 118 | unsigned int addr, int *err_ret); |
119 | extern unsigned short sdio_readw(struct sdio_func *func, | ||
120 | unsigned int addr, int *err_ret); | ||
121 | extern unsigned long sdio_readl(struct sdio_func *func, | ||
122 | unsigned int addr, int *err_ret); | ||
123 | |||
124 | extern int sdio_memcpy_fromio(struct sdio_func *func, void *dst, | ||
125 | unsigned int addr, int count); | ||
126 | extern int sdio_readsb(struct sdio_func *func, void *dst, | ||
127 | unsigned int addr, int count); | ||
117 | 128 | ||
118 | extern void sdio_writeb(struct sdio_func *func, unsigned char b, | 129 | extern void sdio_writeb(struct sdio_func *func, unsigned char b, |
119 | unsigned int addr, int *err_ret); | 130 | unsigned int addr, int *err_ret); |
131 | extern void sdio_writew(struct sdio_func *func, unsigned short b, | ||
132 | unsigned int addr, int *err_ret); | ||
133 | extern void sdio_writel(struct sdio_func *func, unsigned long b, | ||
134 | unsigned int addr, int *err_ret); | ||
135 | |||
136 | extern int sdio_memcpy_toio(struct sdio_func *func, unsigned int addr, | ||
137 | void *src, int count); | ||
138 | extern int sdio_writesb(struct sdio_func *func, unsigned int addr, | ||
139 | void *src, int count); | ||
120 | 140 | ||
121 | #endif | 141 | #endif |
122 | 142 | ||