0003-fix-mvsdio-eMMC-timing.patch 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. From 5b76d7e549a6f65f881ef832cb39ae6a4ad34119 Mon Sep 17 00:00:00 2001
  2. From: Kevin Mihelich <kevin@archlinuxarm.org>
  3. Date: Fri, 5 Sep 2014 15:43:56 -0600
  4. Subject: [PATCH 3/7] fix mvsdio eMMC timing
  5. These changes from Globalscale change the MMC timing to allow the eMMC versions
  6. of the Mirabox and SMILE Plug to work.
  7. Signed-off-by: Kevin Mihelich <kevin@archlinuxarm.org>
  8. ---
  9. drivers/mmc/host/mvsdio.c | 4 +++-
  10. 1 file changed, 3 insertions(+), 1 deletion(-)
  11. diff --git a/drivers/mmc/host/mvsdio.c b/drivers/mmc/host/mvsdio.c
  12. index 629efbe639c4..c507c064736c 100644
  13. --- a/drivers/mmc/host/mvsdio.c
  14. +++ b/drivers/mmc/host/mvsdio.c
  15. @@ -90,7 +90,7 @@ static int mvsd_setup_data(struct mvsd_host *host, struct mmc_data *data)
  16. tmout_index = fls(tmout - 1) - 12;
  17. if (tmout_index < 0)
  18. tmout_index = 0;
  19. - if (tmout_index > MVSD_HOST_CTRL_TMOUT_MAX)
  20. +// if (tmout_index > MVSD_HOST_CTRL_TMOUT_MAX) //by steven, try to setup the timeout to maximum value
  21. tmout_index = MVSD_HOST_CTRL_TMOUT_MAX;
  22. dev_dbg(host->dev, "data %s at 0x%08x: blocks=%d blksz=%d tmout=%u (%d)\n",
  23. @@ -613,6 +613,8 @@ static void mvsd_set_ios(struct mmc_host *mmc, struct mmc_ios *ios)
  24. u32 m = DIV_ROUND_UP(host->base_clock, ios->clock) - 1;
  25. if (m > MVSD_BASE_DIV_MAX)
  26. m = MVSD_BASE_DIV_MAX;
  27. + if(ios->clock==50000000 ) //by steven
  28. + m=1;
  29. mvsd_write(MVSD_CLK_DIV, m);
  30. host->clock = ios->clock;
  31. host->ns_per_clk = 1000000000 / (host->base_clock / (m+1));
  32. --
  33. 2.37.0