mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/herbert/cryptodev-2.6.git
synced 2026-05-02 18:17:50 -04:00
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>
This commit is contained in:
@@ -15,6 +15,7 @@
|
||||
/* SDIO commands type argument response */
|
||||
#define SD_IO_SEND_OP_COND 5 /* bcr [23:0] OCR R4 */
|
||||
#define SD_IO_RW_DIRECT 52 /* ac [31:0] See below R5 */
|
||||
#define SD_IO_RW_EXTENDED 53 /* adtc [31:0] See below R5 */
|
||||
|
||||
/*
|
||||
* SD_IO_RW_DIRECT argument format:
|
||||
@@ -26,6 +27,17 @@
|
||||
* [7:0] Data
|
||||
*/
|
||||
|
||||
/*
|
||||
* SD_IO_RW_EXTENDED argument format:
|
||||
*
|
||||
* [31] R/W flag
|
||||
* [30:28] Function number
|
||||
* [27] Block mode
|
||||
* [26] Increment address
|
||||
* [25:9] Register address
|
||||
* [8:0] Byte/block count
|
||||
*/
|
||||
|
||||
/*
|
||||
SDIO status in R5
|
||||
Type
|
||||
|
||||
@@ -48,6 +48,8 @@ struct sdio_func {
|
||||
unsigned int state; /* function state */
|
||||
#define SDIO_STATE_PRESENT (1<<0) /* present in sysfs */
|
||||
|
||||
u8 tmpbuf[4]; /* DMA:able scratch buffer */
|
||||
|
||||
struct sdio_func_tuple *tuples;
|
||||
};
|
||||
|
||||
@@ -114,9 +116,27 @@ extern int sdio_release_irq(struct sdio_func *func);
|
||||
|
||||
extern unsigned char sdio_readb(struct sdio_func *func,
|
||||
unsigned int addr, int *err_ret);
|
||||
extern unsigned short sdio_readw(struct sdio_func *func,
|
||||
unsigned int addr, int *err_ret);
|
||||
extern unsigned long sdio_readl(struct sdio_func *func,
|
||||
unsigned int addr, int *err_ret);
|
||||
|
||||
extern int sdio_memcpy_fromio(struct sdio_func *func, void *dst,
|
||||
unsigned int addr, int count);
|
||||
extern int sdio_readsb(struct sdio_func *func, void *dst,
|
||||
unsigned int addr, int count);
|
||||
|
||||
extern void sdio_writeb(struct sdio_func *func, unsigned char b,
|
||||
unsigned int addr, int *err_ret);
|
||||
extern void sdio_writew(struct sdio_func *func, unsigned short b,
|
||||
unsigned int addr, int *err_ret);
|
||||
extern void sdio_writel(struct sdio_func *func, unsigned long b,
|
||||
unsigned int addr, int *err_ret);
|
||||
|
||||
extern int sdio_memcpy_toio(struct sdio_func *func, unsigned int addr,
|
||||
void *src, int count);
|
||||
extern int sdio_writesb(struct sdio_func *func, unsigned int addr,
|
||||
void *src, int count);
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
Reference in New Issue
Block a user