diff options
author | Benzi Zbit <benzi.zbit@intel.com> | 2008-07-09 19:41:43 -0400 |
---|---|---|
committer | Pierre Ossman <drzeus@drzeus.cx> | 2008-07-15 09:47:03 -0400 |
commit | 62a7573ee9f31d4fdb330b3e68ebf6efaba1d57c (patch) | |
tree | 33a3823791937d3e9d26eb08c4e15c39d377c21f /drivers/mmc | |
parent | c71f65129a1fb67bc6b9b8d03b493675b5c9302b (diff) |
sdio: fix the use of hard coded timeout value.
This adds reading and using of enable_timeout from the CIS
Signed-off-by: Benzi Zbit <benzi.zbit@intel.com>
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
Diffstat (limited to 'drivers/mmc')
-rw-r--r-- | drivers/mmc/core/sdio_cis.c | 6 | ||||
-rwxr-xr-x | drivers/mmc/core/sdio_io.c | 6 |
2 files changed, 7 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, ®); | 82 | ret = mmc_io_rw_direct(func->card, 0, 0, SDIO_CCCR_IORx, 0, ®); |