aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorMarkus Brunner <super.firetwister@gmail.com>2007-07-26 04:31:28 -0400
committerPaul Mundt <lethal@linux-sh.org>2007-07-26 04:31:28 -0400
commit699bc6614f4d5a68b8840d4d859e9ca205530a77 (patch)
treefa317784fa0910233be682e374de3170bb1ff997 /drivers
parentd89ddd1c847637d91625c8cb6b0d064e1717057c (diff)
rtc: rtc-sh: Correct sh_rtc_set_time() for some SH-3 parts.
Some SH-3 parts (SH7720 and SH7705 at least) need to have the start bit explicitly cleared, as the reset is not enough. This is safe across all parts, so simply clear the start bit in the sh_rtc_set_time() path. Signed-off-by: Markus Brunner <super.firetwister@gmail.com> Signed-off by: Mark Jonas <toertel@gmail.com> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/rtc/rtc-sh.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/rtc/rtc-sh.c b/drivers/rtc/rtc-sh.c
index e0f91dfce0f5..93ee05eeaeba 100644
--- a/drivers/rtc/rtc-sh.c
+++ b/drivers/rtc/rtc-sh.c
@@ -365,6 +365,7 @@ static int sh_rtc_set_time(struct device *dev, struct rtc_time *tm)
365 /* Reset pre-scaler & stop RTC */ 365 /* Reset pre-scaler & stop RTC */
366 tmp = readb(rtc->regbase + RCR2); 366 tmp = readb(rtc->regbase + RCR2);
367 tmp |= RCR2_RESET; 367 tmp |= RCR2_RESET;
368 tmp &= ~RCR2_START;
368 writeb(tmp, rtc->regbase + RCR2); 369 writeb(tmp, rtc->regbase + RCR2);
369 370
370 writeb(BIN2BCD(tm->tm_sec), rtc->regbase + RSECCNT); 371 writeb(BIN2BCD(tm->tm_sec), rtc->regbase + RSECCNT);