aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/mmc/core/sdio_cis.c6
-rwxr-xr-xdrivers/mmc/core/sdio_io.c6
-rwxr-xr-xinclude/linux/mmc/sdio_func.h2
3 files changed, 9 insertions, 5 deletions
diff --git a/drivers/mmc/core/sdio_cis.c b/drivers/mmc/core/sdio_cis.c
index d5e51b1c7b3f..956bd7677502 100644
--- a/drivers/mmc/core/sdio_cis.c
+++ b/drivers/mmc/core/sdio_cis.c
@@ -129,6 +129,12 @@ static int cistpl_funce_func(struct sdio_func *func,
129 /* TPLFE_MAX_BLK_SIZE */ 129 /* TPLFE_MAX_BLK_SIZE */
130 func->max_blksize = buf[12] | (buf[13] << 8); 130 func->max_blksize = buf[12] | (buf[13] << 8);
131 131
132 /* TPLFE_ENABLE_TIMEOUT_VAL, present in ver 1.1 and above */
133 if (vsn > SDIO_SDIO_REV_1_00)
134 func->enable_timeout = (buf[28] | (buf[29] << 8)) * 10;
135 else
136 func->enable_timeout = jiffies_to_msecs(HZ);
137
132 return 0; 138 return 0;
133} 139}
134 140
diff --git a/drivers/mmc/core/sdio_io.c b/drivers/mmc/core/sdio_io.c
index 3ccf6919877c..0888df64581f 100755
--- a/drivers/mmc/core/sdio_io.c
+++ b/drivers/mmc/core/sdio_io.c
@@ -76,11 +76,7 @@ int sdio_enable_func(struct sdio_func *func)
76 if (ret) 76 if (ret)
77 goto err; 77 goto err;
78 78
79 /* 79 timeout = jiffies + msecs_to_jiffies(func->enable_timeout);
80 * FIXME: This should timeout based on information in the CIS,
81 * but we don't have card to parse that yet.
82 */
83 timeout = jiffies + HZ;
84 80
85 while (1) { 81 while (1) {
86 ret = mmc_io_rw_direct(func->card, 0, 0, SDIO_CCCR_IORx, 0, &reg); 82 ret = mmc_io_rw_direct(func->card, 0, 0, SDIO_CCCR_IORx, 0, &reg);
diff --git a/include/linux/mmc/sdio_func.h b/include/linux/mmc/sdio_func.h
index 28fb0a33acf8..07bee4a0d457 100755
--- a/include/linux/mmc/sdio_func.h
+++ b/include/linux/mmc/sdio_func.h
@@ -46,6 +46,8 @@ struct sdio_func {
46 unsigned max_blksize; /* maximum block size */ 46 unsigned max_blksize; /* maximum block size */
47 unsigned cur_blksize; /* current block size */ 47 unsigned cur_blksize; /* current block size */
48 48
49 unsigned enable_timeout; /* max enable timeout in msec */
50
49 unsigned int state; /* function state */ 51 unsigned int state; /* function state */
50#define SDIO_STATE_PRESENT (1<<0) /* present in sysfs */ 52#define SDIO_STATE_PRESENT (1<<0) /* present in sysfs */
51 53