diff options
author | MyungJoo Ham <myungjoo.ham@samsung.com> | 2011-08-25 18:59:22 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-08-25 21:50:43 -0400 |
commit | 4e8896cde182b4eab6f2d0af9b6eef87720fae0d (patch) | |
tree | 868568e19734b88b810eb9f80c4bd42d5c406e8e /drivers/rtc/rtc-s3c.c | |
parent | 1424e21f66f4c51c31ba6ac188df46b43f51556b (diff) |
drivers/rtc/rtc-s3c.c: correct debug messages
RTC-S3C used to print out debug messages incorrectly. This patch
corrects incorrect outputs. (undecoded bcd numbers, incorrectly decoded
register values)
This patch affects the pr-debug messages only.
Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Acked-by: Kukjin Kim <kgene.kim@samsung.com>
Cc: Alessandro Zummo <a.zummo@towertech.it>
Cc: Changhwan Youn <chaos.youn@samsung.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/rtc/rtc-s3c.c')
-rw-r--r-- | drivers/rtc/rtc-s3c.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/rtc/rtc-s3c.c b/drivers/rtc/rtc-s3c.c index 9329dbb9ebab..067207afc086 100644 --- a/drivers/rtc/rtc-s3c.c +++ b/drivers/rtc/rtc-s3c.c | |||
@@ -152,10 +152,6 @@ static int s3c_rtc_gettime(struct device *dev, struct rtc_time *rtc_tm) | |||
152 | goto retry_get_time; | 152 | goto retry_get_time; |
153 | } | 153 | } |
154 | 154 | ||
155 | pr_debug("read time %04d.%02d.%02d %02d:%02d:%02d\n", | ||
156 | 1900 + rtc_tm->tm_year, rtc_tm->tm_mon, rtc_tm->tm_mday, | ||
157 | rtc_tm->tm_hour, rtc_tm->tm_min, rtc_tm->tm_sec); | ||
158 | |||
159 | rtc_tm->tm_sec = bcd2bin(rtc_tm->tm_sec); | 155 | rtc_tm->tm_sec = bcd2bin(rtc_tm->tm_sec); |
160 | rtc_tm->tm_min = bcd2bin(rtc_tm->tm_min); | 156 | rtc_tm->tm_min = bcd2bin(rtc_tm->tm_min); |
161 | rtc_tm->tm_hour = bcd2bin(rtc_tm->tm_hour); | 157 | rtc_tm->tm_hour = bcd2bin(rtc_tm->tm_hour); |
@@ -164,6 +160,11 @@ static int s3c_rtc_gettime(struct device *dev, struct rtc_time *rtc_tm) | |||
164 | rtc_tm->tm_year = bcd2bin(rtc_tm->tm_year); | 160 | rtc_tm->tm_year = bcd2bin(rtc_tm->tm_year); |
165 | 161 | ||
166 | rtc_tm->tm_year += 100; | 162 | rtc_tm->tm_year += 100; |
163 | |||
164 | pr_debug("read time %04d.%02d.%02d %02d:%02d:%02d\n", | ||
165 | 1900 + rtc_tm->tm_year, rtc_tm->tm_mon, rtc_tm->tm_mday, | ||
166 | rtc_tm->tm_hour, rtc_tm->tm_min, rtc_tm->tm_sec); | ||
167 | |||
167 | rtc_tm->tm_mon -= 1; | 168 | rtc_tm->tm_mon -= 1; |
168 | 169 | ||
169 | clk_disable(rtc_clk); | 170 | clk_disable(rtc_clk); |
@@ -269,10 +270,9 @@ static int s3c_rtc_setalarm(struct device *dev, struct rtc_wkalrm *alrm) | |||
269 | clk_enable(rtc_clk); | 270 | clk_enable(rtc_clk); |
270 | pr_debug("s3c_rtc_setalarm: %d, %04d.%02d.%02d %02d:%02d:%02d\n", | 271 | pr_debug("s3c_rtc_setalarm: %d, %04d.%02d.%02d %02d:%02d:%02d\n", |
271 | alrm->enabled, | 272 | alrm->enabled, |
272 | 1900 + tm->tm_year, tm->tm_mon, tm->tm_mday, | 273 | 1900 + tm->tm_year, tm->tm_mon + 1, tm->tm_mday, |
273 | tm->tm_hour, tm->tm_min, tm->tm_sec); | 274 | tm->tm_hour, tm->tm_min, tm->tm_sec); |
274 | 275 | ||
275 | |||
276 | alrm_en = readb(base + S3C2410_RTCALM) & S3C2410_RTCALM_ALMEN; | 276 | alrm_en = readb(base + S3C2410_RTCALM) & S3C2410_RTCALM_ALMEN; |
277 | writeb(0x00, base + S3C2410_RTCALM); | 277 | writeb(0x00, base + S3C2410_RTCALM); |
278 | 278 | ||