diff options
| -rw-r--r-- | drivers/mmc/core/sdio.c | 4 | ||||
| -rw-r--r-- | drivers/mmc/core/sdio_cis.c | 2 | ||||
| -rw-r--r-- | include/linux/mmc/sdio.h | 2 |
3 files changed, 5 insertions, 3 deletions
diff --git a/drivers/mmc/core/sdio.c b/drivers/mmc/core/sdio.c index 48c465a8e34..58cf36e4467 100644 --- a/drivers/mmc/core/sdio.c +++ b/drivers/mmc/core/sdio.c | |||
| @@ -30,7 +30,7 @@ static int sdio_read_fbr(struct sdio_func *func) | |||
| 30 | unsigned char data; | 30 | unsigned char data; |
| 31 | 31 | ||
| 32 | ret = mmc_io_rw_direct(func->card, 0, 0, | 32 | ret = mmc_io_rw_direct(func->card, 0, 0, |
| 33 | func->num * 0x100 + SDIO_FBR_STD_IF, 0, &data); | 33 | SDIO_FBR_BASE(func->num) + SDIO_FBR_STD_IF, 0, &data); |
| 34 | if (ret) | 34 | if (ret) |
| 35 | goto out; | 35 | goto out; |
| 36 | 36 | ||
| @@ -38,7 +38,7 @@ static int sdio_read_fbr(struct sdio_func *func) | |||
| 38 | 38 | ||
| 39 | if (data == 0x0f) { | 39 | if (data == 0x0f) { |
| 40 | ret = mmc_io_rw_direct(func->card, 0, 0, | 40 | ret = mmc_io_rw_direct(func->card, 0, 0, |
| 41 | func->num * 0x100 + SDIO_FBR_STD_IF_EXT, 0, &data); | 41 | SDIO_FBR_BASE(func->num) + SDIO_FBR_STD_IF_EXT, 0, &data); |
| 42 | if (ret) | 42 | if (ret) |
| 43 | goto out; | 43 | goto out; |
| 44 | } | 44 | } |
diff --git a/drivers/mmc/core/sdio_cis.c b/drivers/mmc/core/sdio_cis.c index ec806a1229b..d050c40cf04 100644 --- a/drivers/mmc/core/sdio_cis.c +++ b/drivers/mmc/core/sdio_cis.c | |||
| @@ -145,7 +145,7 @@ static int sdio_read_cis(struct mmc_card *card, struct sdio_func *func) | |||
| 145 | fn = 0; | 145 | fn = 0; |
| 146 | 146 | ||
| 147 | ret = mmc_io_rw_direct(card, 0, 0, | 147 | ret = mmc_io_rw_direct(card, 0, 0, |
| 148 | fn * 0x100 + SDIO_FBR_CIS + i, 0, &x); | 148 | SDIO_FBR_BASE(fn) + SDIO_FBR_CIS + i, 0, &x); |
| 149 | if (ret) | 149 | if (ret) |
| 150 | return ret; | 150 | return ret; |
| 151 | ptr |= x << (i * 8); | 151 | ptr |= x << (i * 8); |
diff --git a/include/linux/mmc/sdio.h b/include/linux/mmc/sdio.h index 9b1ec76cac3..47ba464f517 100644 --- a/include/linux/mmc/sdio.h +++ b/include/linux/mmc/sdio.h | |||
| @@ -132,6 +132,8 @@ | |||
| 132 | * Function Basic Registers (FBR) | 132 | * Function Basic Registers (FBR) |
| 133 | */ | 133 | */ |
| 134 | 134 | ||
| 135 | #define SDIO_FBR_BASE(f) ((f) * 0x100) /* base of function f's FBRs */ | ||
| 136 | |||
| 135 | #define SDIO_FBR_STD_IF 0x00 | 137 | #define SDIO_FBR_STD_IF 0x00 |
| 136 | 138 | ||
| 137 | #define SDIO_FBR_SUPPORTS_CSA 0x40 /* supports Code Storage Area */ | 139 | #define SDIO_FBR_SUPPORTS_CSA 0x40 /* supports Code Storage Area */ |
