summaryrefslogtreecommitdiff
path: root/drivers/mmc/host
diff options
context:
space:
mode:
authorJaehoon Chung <jh80.chung@samsung.com>2015-04-10 20:11:28 +0900
committerSeung-Woo Kim <sw0312.kim@samsung.com>2016-12-14 13:42:49 +0900
commitd73ab6ab55f1cc13c17c1bf0965f13589766ca39 (patch)
tree7a34559afa28eccf0ab605138318e5cc036be910 /drivers/mmc/host
parentaa31eccc2b24f7513bf984fceeecfd5111ad2e10 (diff)
local / mmc: dw_mmc: exynos: fix the bit rotation operation for sampling clock
This used the workaround code instead of ror8(). With ror8, __c = ror8(0x7f, 1) -> __c is 0x3f. (Expected value is 0xbf) Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
Diffstat (limited to 'drivers/mmc/host')
-rw-r--r--drivers/mmc/host/dw_mmc-exynos.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/mmc/host/dw_mmc-exynos.c b/drivers/mmc/host/dw_mmc-exynos.c
index 9106da83b018..db9a08d339b8 100644
--- a/drivers/mmc/host/dw_mmc-exynos.c
+++ b/drivers/mmc/host/dw_mmc-exynos.c
@@ -454,11 +454,11 @@ static inline u8 dw_mci_exynos_move_next_clksmpl(struct dw_mci *host)
static s8 dw_mci_exynos_get_best_clksmpl(u8 candiates)
{
const u8 iter = 8;
- u8 __c;
+ u16 __c;
s8 i, loc = -1;
for (i = 0; i < iter; i++) {
- __c = ror8(candiates, i);
+ __c = (candiates >> i) | (candiates << (iter - i));
if ((__c & 0xc7) == 0xc7) {
loc = i;
goto out;
@@ -466,7 +466,7 @@ static s8 dw_mci_exynos_get_best_clksmpl(u8 candiates)
}
for (i = 0; i < iter; i++) {
- __c = ror8(candiates, i);
+ __c = (candiates >> i) | (candiates << (iter - i));
if ((__c & 0x83) == 0x83) {
loc = i;
goto out;