The patch titled
     mmc: bfin_sdh: set timeout based on actual card data
has been removed from the -mm tree.  Its filename was
     mmc-bfin_sdh-set-timeout-based-on-actual-card-data.patch

This patch was dropped because it was merged into mainline or a subsystem tree

The current -mm tree may be found at http://userweb.kernel.org/~akpm/mmotm/

------------------------------------------------------
Subject: mmc: bfin_sdh: set timeout based on actual card data
From: Cliff Cai <[email protected]>

The hardcoded value doesn't really work for all cards.

Signed-off-by: Cliff Cai <[email protected]>
Signed-off-by: Mike Frysinger <[email protected]>
Cc: <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
---

 drivers/mmc/host/bfin_sdh.c |    8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff -puN 
drivers/mmc/host/bfin_sdh.c~mmc-bfin_sdh-set-timeout-based-on-actual-card-data 
drivers/mmc/host/bfin_sdh.c
--- 
a/drivers/mmc/host/bfin_sdh.c~mmc-bfin_sdh-set-timeout-based-on-actual-card-data
+++ a/drivers/mmc/host/bfin_sdh.c
@@ -115,6 +115,7 @@ static int sdh_setup_data(struct sdh_hos
        unsigned int length;
        unsigned int data_ctl;
        unsigned int dma_cfg;
+       unsigned int cycle_ns, timeout;
 
        dev_dbg(mmc_dev(host->mmc), "%s enter flags: 0x%x\n", __func__, 
data->flags);
        host->data = data;
@@ -135,8 +136,11 @@ static int sdh_setup_data(struct sdh_hos
        data_ctl |= ((ffs(data->blksz) - 1) << 4);
 
        bfin_write_SDH_DATA_CTL(data_ctl);
-
-       bfin_write_SDH_DATA_TIMER(0xFFFF);
+       /* the time of a host clock period in ns */
+       cycle_ns = 1000000000 / (get_sclk() / (2 * (host->clk_div + 1)));
+       timeout = data->timeout_ns / cycle_ns;
+       timeout += data->timeout_clks;
+       bfin_write_SDH_DATA_TIMER(timeout);
        SSYNC();
 
        if (data->flags & MMC_DATA_READ) {
_

Patches currently in -mm which might be from [email protected] are


--
To unsubscribe from this list: send the line "unsubscribe linux-mmc" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to