Skip to content

Commit

Permalink
rtc: rtc-sh: Correct sh_rtc_set_time() for some SH-3 parts.
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Markus Brunner authored and Paul Mundt committed Jul 26, 2007
1 parent d89ddd1 commit 699bc66
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/rtc/rtc-sh.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 699bc66

Please sign in to comment.