Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 283086
b: refs/heads/master
c: 7287be1
h: refs/heads/master
v: v3
  • Loading branch information
Yauhen Kharuzhy authored and Linus Torvalds committed Jan 11, 2012
1 parent 7c026d3 commit 835b5ba
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: b43c1ea4d622b6951377de92edfb219d893e23ef
refs/heads/master: 7287be1d0ac8c82999b67c2a33517c6ec9cfdbe7
11 changes: 11 additions & 0 deletions trunk/drivers/rtc/rtc-mxc.c
Original file line number Diff line number Diff line change
Expand Up @@ -290,6 +290,17 @@ static int mxc_rtc_read_time(struct device *dev, struct rtc_time *tm)
*/
static int mxc_rtc_set_mmss(struct device *dev, unsigned long time)
{
/*
* TTC_DAYR register is 9-bit in MX1 SoC, save time and day of year only
*/
if (cpu_is_mx1()) {
struct rtc_time tm;

rtc_time_to_tm(time, &tm);
tm.tm_year = 70;
rtc_tm_to_time(&tm, &time);
}

/* Avoid roll-over from reading the different registers */
do {
set_alarm_or_time(dev, MXC_RTC_TIME, time);
Expand Down

0 comments on commit 835b5ba

Please sign in to comment.