fixed class 10 microSD card
authorPali Rohár <pali.rohar@gmail.com>
Wed, 13 Jul 2011 08:30:16 +0000 (10:30 +0200)
committerPali Rohár <pali.rohar@gmail.com>
Thu, 11 Aug 2011 08:25:10 +0000 (10:25 +0200)
kernel-power-2.6.28/debian/changelog
kernel-power-2.6.28/debian/patches/class10sd_dto14_fix.diff [new file with mode: 0644]
kernel-power-2.6.28/debian/patches/series

index 762ecd6..c3d1d95 100644 (file)
@@ -13,6 +13,7 @@ kernel-power (1:2.6.28-10power48) fremantle; urgency=low
   * enabled usbnet dm9601 kernel module
   * enabled nilfs2 kernel module
   * enabled xts kernel module
+  * fixed class 10 microSD card
 
  -- Pali Rohár <pali.rohar@gmail.com>  Sat, 09 Jul 2011 16:03:55 +0200
 
diff --git a/kernel-power-2.6.28/debian/patches/class10sd_dto14_fix.diff b/kernel-power-2.6.28/debian/patches/class10sd_dto14_fix.diff
new file mode 100644 (file)
index 0000000..45b8f25
--- /dev/null
@@ -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);
index 6f53deb..7a4ad69 100644 (file)
@@ -40,3 +40,4 @@ dspbridge.diff
 phys_to_page.diff
 ext4-data-corruption.diff
 patch_swap_notify_core_support_2.6.28.diff
+class10sd_dto14_fix.diff