mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 19:21:31 -04:00
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 <[email protected]> Signed-off by: Mark Jonas <[email protected]> Signed-off-by: Paul Mundt <[email protected]>
This commit is contained in:
parent
d89ddd1c84
commit
699bc6614f
1 changed files with 1 additions and 0 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Reference in a new issue