]> git.baikalelectronics.ru Git - kernel.git/commit
mmc: omap_hsmmc: fix a few bugs when setting the clock divisor
authorAndy Shevchenko <ext-andriy.shevchenko@nokia.com>
Fri, 6 May 2011 09:14:06 +0000 (12:14 +0300)
committerChris Ball <cjb@laptop.org>
Thu, 21 Jul 2011 14:35:03 +0000 (10:35 -0400)
commit1a9cc2052ebf77c56b6b97a47fba5d12388ba9d0
tree0a7321ab6a3a55187284cb7d72fcc1342acebb96
parentf911c597df68c8d5701f30826bd2bb2255c4e016
mmc: omap_hsmmc: fix a few bugs when setting the clock divisor

There are two pieces of code which are similar, but not the same.
Each of them contains a bug.

The SYSCTL register should be read before writing to it in
omap_hsmmc_context_restore() to retain the state of the reserved bits.

Before setting the clock divisor and DTO bits the value from the SYSCTL
register should be masked properly. We were lucky to have no problems
with DTO bits. So, make sure we have clear DTO bits properly in
omap_hsmmc_set_ios().

Additionally get rid of msleep(1). The actual time is rarely higher
than 30us on OMAP 3630.

The resulting pieces of code are refactored into the
omap_hsmmc_set_clock() function.

Signed-off-by: Andy Shevchenko <ext-andriy.shevchenko@nokia.com>
Signed-off-by: Adrian Hunter <adrian.hunter@nokia.com>
Signed-off-by: Chris Ball <cjb@laptop.org>
drivers/mmc/host/omap_hsmmc.c