Root/target/linux/xburst/patches-3.3/600-sdio-wireless-ks7010-support.patch

1From 3aad7806fb868cd3d024954b08b8913e215ef705 Mon Sep 17 00:00:00 2001
2From: Xiangfu Liu <xiangfu@sharism.cc>
3Date: Tue, 6 Mar 2012 09:32:15 +0800
4Subject: [PATCH 22/28] sdio-wifi-ks7010-support
5
6---
7 drivers/mmc/core/core.c | 4 ++--
8 drivers/mmc/core/sdio_cis.c | 7 ++++---
9 2 files changed, 6 insertions(+), 5 deletions(-)
10
11diff --git a/drivers/mmc/core/core.c b/drivers/mmc/core/core.c
12index 950b97d..9bbc3db 100644
13--- a/drivers/mmc/core/core.c
14+++ b/drivers/mmc/core/core.c
15@@ -1303,7 +1303,7 @@ static void mmc_power_up(struct mmc_host *host)
16      * This delay should be sufficient to allow the power supply
17      * to reach the minimum voltage.
18      */
19- mmc_delay(10);
20+ mmc_delay(200);
21 
22     host->ios.clock = host->f_init;
23 
24@@ -1314,7 +1314,7 @@ static void mmc_power_up(struct mmc_host *host)
25      * This delay must be at least 74 clock sizes, or 1 ms, or the
26      * time required to reach a stable voltage.
27      */
28- mmc_delay(10);
29+ mmc_delay(200);
30 
31     mmc_host_clk_release(host);
32 }
33diff --git a/drivers/mmc/core/sdio_cis.c b/drivers/mmc/core/sdio_cis.c
34index f1c7ed8..7881c4b 100644
35--- a/drivers/mmc/core/sdio_cis.c
36+++ b/drivers/mmc/core/sdio_cis.c
37@@ -156,7 +156,8 @@ static int cistpl_funce_common(struct mmc_card *card, struct sdio_func *func,
38     /* TPLFE_MAX_TRAN_SPEED */
39     card->cis.max_dtr = speed_val[(buf[3] >> 3) & 15] *
40                 speed_unit[buf[3] & 7];
41-
42+ if(card->cis.max_dtr > 25000000 && card->cccr.sdio_vsn < SDIO_SDIO_REV_2_00)
43+ card->cis.max_dtr = 25000000;
44     return 0;
45 }
46 
47@@ -177,14 +178,14 @@ static int cistpl_funce_func(struct mmc_card *card, struct sdio_func *func,
48     vsn = func->card->cccr.sdio_vsn;
49     min_size = (vsn == SDIO_SDIO_REV_1_00) ? 28 : 42;
50 
51- if (size < min_size)
52+ if (buf[0] != 1)
53         return -EINVAL;
54 
55     /* TPLFE_MAX_BLK_SIZE */
56     func->max_blksize = buf[12] | (buf[13] << 8);
57 
58     /* TPLFE_ENABLE_TIMEOUT_VAL, present in ver 1.1 and above */
59- if (vsn > SDIO_SDIO_REV_1_00)
60+ if (vsn > SDIO_SDIO_REV_1_00 && size >= min_size)
61         func->enable_timeout = (buf[28] | (buf[29] << 8)) * 10;
62     else
63         func->enable_timeout = jiffies_to_msecs(HZ);
64--
651.7.5.4
66
67

Archive Download this file



interactive