summaryrefslogtreecommitdiff
path: root/drivers/clocksource/exynos_mct.c
diff options
context:
space:
mode:
authorJonghwa Lee <jonghwa3.lee@samsung.com>2014-02-04 18:54:23 +0900
committerChanho Park <chanho61.park@samsung.com>2014-08-08 15:19:10 +0900
commit6494abc218cd518653748136e5a425444db8e3ed (patch)
tree8597ec850521db2c9b5069f1c4719911be88d3c5 /drivers/clocksource/exynos_mct.c
parent7bc2e818eb7d7ad883b32b0fff13f07f46854112 (diff)
downloadlinux-3.10-6494abc218cd518653748136e5a425444db8e3ed.tar.gz
linux-3.10-6494abc218cd518653748136e5a425444db8e3ed.tar.bz2
linux-3.10-6494abc218cd518653748136e5a425444db8e3ed.zip
clocksource: exynos4: Fix wrong bit operation in exynos4_mct_write()
There is a faulty bit operation during checking offset in exyno4_mct_write(). This patch fixes it correctly. Change-Id: Ifbe30007bc378d8ab0585a70c0c343dbbc350415 Signed-off-by: Jonghwa Lee <jonghwa3.lee@samsung.com>
Diffstat (limited to 'drivers/clocksource/exynos_mct.c')
-rw-r--r--drivers/clocksource/exynos_mct.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/clocksource/exynos_mct.c b/drivers/clocksource/exynos_mct.c
index b5de04ec051..079a4868498 100644
--- a/drivers/clocksource/exynos_mct.c
+++ b/drivers/clocksource/exynos_mct.c
@@ -95,8 +95,8 @@ static void exynos4_mct_write(unsigned int value, unsigned long offset)
__raw_writel(value, reg_base + offset);
if (likely(offset >= EXYNOS4_MCT_L_BASE(0))) {
- stat_addr = (offset & ~EXYNOS4_MCT_L_MASK) + MCT_L_WSTAT_OFFSET;
- switch (offset & EXYNOS4_MCT_L_MASK) {
+ stat_addr = (offset & EXYNOS4_MCT_L_MASK) + MCT_L_WSTAT_OFFSET;
+ switch (offset & ~EXYNOS4_MCT_L_MASK) {
case MCT_L_TCON_OFFSET:
mask = 1 << 3; /* L_TCON write status */
break;