From: Peter Hunt Date: Wed, 25 May 2011 21:17:07 +0000 (+0000) Subject: Fix for class 10 SD cards (set DTO to 14) X-Git-Url: https://vcs.maemo.org/git/?p=kernel-bfs;a=commitdiff_plain;h=05afd6382dcee28e3090d0374d41beeee394b20e Fix for class 10 SD cards (set DTO to 14) --- diff --git a/kernel-bfs-2.6.28/debian/patches/class10sd_dto14_fix.diff b/kernel-bfs-2.6.28/debian/patches/class10sd_dto14_fix.diff new file mode 100644 index 0000000..45b8f25 --- /dev/null +++ b/kernel-bfs-2.6.28/debian/patches/class10sd_dto14_fix.diff @@ -0,0 +1,38 @@ +--- kernel-2.6.28/drivers/mmc/host/omap_hsmmc.c 2011-04-28 23:06:37.000000000 +0200 ++++ kernel-2.6.28.new/drivers/mmc/host/omap_hsmmc.c 2011-05-05 22:18:25.174891197 +0200 +@@ -958,34 +958,9 @@ static void set_data_timeout(struct omap + unsigned int timeout_ns, + unsigned int timeout_clks) + { +- unsigned int timeout, cycle_ns; +- uint32_t reg, clkd, dto = 0; ++ uint32_t reg, dto = 14; + + reg = OMAP_HSMMC_READ(host->base, SYSCTL); +- clkd = (reg & CLKD_MASK) >> CLKD_SHIFT; +- if (clkd == 0) +- clkd = 1; +- +- cycle_ns = 1000000000 / (clk_get_rate(host->fclk) / clkd); +- timeout = timeout_ns / cycle_ns; +- timeout += timeout_clks; +- if (timeout) { +- while ((timeout & 0x80000000) == 0) { +- dto += 1; +- timeout <<= 1; +- } +- dto = 31 - dto; +- timeout <<= 1; +- if (timeout && dto) +- dto += 1; +- if (dto >= 13) +- dto -= 13; +- else +- dto = 0; +- if (dto > 14) +- dto = 14; +- } +- + reg &= ~DTO_MASK; + reg |= dto << DTO_SHIFT; + OMAP_HSMMC_WRITE(host->base, SYSCTL, reg); diff --git a/kernel-bfs-2.6.28/debian/patches/series b/kernel-bfs-2.6.28/debian/patches/series index b1faea9..e651c7b 100644 --- a/kernel-bfs-2.6.28/debian/patches/series +++ b/kernel-bfs-2.6.28/debian/patches/series @@ -62,3 +62,5 @@ patch_swap_notify_core_support_2.6.28.diff reiser4-for-2.6.28.patch reiser4-2.6.28.1-fix.patch ext4.diff +class10sd_dto14_fix.diff +