Skip to content

Instantly share code, notes, and snippets.

@disconn3ct
Created January 21, 2012 11:17
Show Gist options
  • Save disconn3ct/1652392 to your computer and use it in GitHub Desktop.
Save disconn3ct/1652392 to your computer and use it in GitHub Desktop.
Patch to fix mmc errors on nook color
diff --git a/drivers/mmc/host/omap_hsmmc.c b/drivers/mmc/host/omap_hsmmc.c
index 674b54c..f0f6e41 100644
--- a/drivers/mmc/host/omap_hsmmc.c
+++ b/drivers/mmc/host/omap_hsmmc.c
@@ -1154,6 +1154,20 @@ static void set_data_timeout(struct omap_hsmmc_host *host,
unsigned int timeout_ns,
unsigned int timeout_clks)
{
+ uint32_t reg;
+
+ reg = OMAP_HSMMC_READ(host->base, SYSCTL);
+
+ reg&= ~DTO_MASK;
+ reg |= DTO<< DTO_SHIFT;
+ OMAP_HSMMC_WRITE(host->base, SYSCTL, reg);
+}
+
+#if 0
+static void set_data_timeout(struct omap_hsmmc_host *host,
+ unsigned int timeout_ns,
+ unsigned int timeout_clks)
+{
unsigned int timeout, cycle_ns;
uint32_t reg, clkd, dto = 0;
@@ -1188,6 +1202,7 @@ static void set_data_timeout(struct omap_hsmmc_host *host,
reg |= dto << DTO_SHIFT;
OMAP_HSMMC_WRITE(host->base, SYSCTL, reg);
}
+#endif // 0
/*
* Configure block length for MMC/SD cards and initiate the transfer.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment