clocksource: exynos4: Fix wrong bit operation in exynos4_mct_write()
authorJonghwa Lee <jonghwa3.lee@samsung.com>
Tue, 4 Feb 2014 09:54:23 +0000 (18:54 +0900)
committerMarek Szyprowski <m.szyprowski@samsung.com>
Thu, 15 May 2014 05:27:19 +0000 (07:27 +0200)
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>
drivers/clocksource/exynos_mct.c

index 9c2f9ab..119917d 100644 (file)
@@ -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;