From: Markus Brunner Date: Thu, 26 Jul 2007 08:31:28 +0000 (+0900) Subject: rtc: rtc-sh: Correct sh_rtc_set_time() for some SH-3 parts. X-Git-Tag: v2.6.23-rc2~146^2~3 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=699bc6614f4d5a68b8840d4d859e9ca205530a77;p=linux-2.6 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 Signed-off by: Mark Jonas Signed-off-by: Paul Mundt --- diff --git a/drivers/rtc/rtc-sh.c b/drivers/rtc/rtc-sh.c index e0f91dfce0..93ee05eeae 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) /* Reset pre-scaler & stop RTC */ tmp = readb(rtc->regbase + RCR2); tmp |= RCR2_RESET; + tmp &= ~RCR2_START; writeb(tmp, rtc->regbase + RCR2); writeb(BIN2BCD(tm->tm_sec), rtc->regbase + RSECCNT);