summaryrefslogtreecommitdiff
path: root/patches.tizen/1238-clocksource-exynos4-Fix-wrong-bit-operation-in-exyno.patch
blob: 87b6fd3ac7d125e0a9e48d409df61800cc2c8a7e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
From 9ef5271400101d5d82c1638ebbe6c9e321f931dc Mon Sep 17 00:00:00 2001
From: Jonghwa Lee <jonghwa3.lee@samsung.com>
Date: Tue, 4 Feb 2014 18:54:23 +0900
Subject: [PATCH 1238/1302] 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>
Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
---
 drivers/clocksource/exynos_mct.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/clocksource/exynos_mct.c b/drivers/clocksource/exynos_mct.c
index 9c2f9ab..119917d 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;
-- 
1.8.3.2