aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/platforms/maple/time.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/powerpc/platforms/maple/time.c')
-rw-r--r--arch/powerpc/platforms/maple/time.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/arch/powerpc/platforms/maple/time.c b/arch/powerpc/platforms/maple/time.c
index 53bca132fb48..eac569dee27c 100644
--- a/arch/powerpc/platforms/maple/time.c
+++ b/arch/powerpc/platforms/maple/time.c
@@ -68,12 +68,12 @@ void maple_get_rtc_time(struct rtc_time *tm)
68 68
69 if (!(maple_clock_read(RTC_CONTROL) & RTC_DM_BINARY) 69 if (!(maple_clock_read(RTC_CONTROL) & RTC_DM_BINARY)
70 || RTC_ALWAYS_BCD) { 70 || RTC_ALWAYS_BCD) {
71 BCD_TO_BIN(tm->tm_sec); 71 tm->tm_sec = bcd2bin(tm->tm_sec);
72 BCD_TO_BIN(tm->tm_min); 72 tm->tm_min = bcd2bin(tm->tm_min);
73 BCD_TO_BIN(tm->tm_hour); 73 tm->tm_hour = bcd2bin(tm->tm_hour);
74 BCD_TO_BIN(tm->tm_mday); 74 tm->tm_mday = bcd2bin(tm->tm_mday);
75 BCD_TO_BIN(tm->tm_mon); 75 tm->tm_mon = bcd2bin(tm->tm_mon);
76 BCD_TO_BIN(tm->tm_year); 76 tm->tm_year = bcd2bin(tm->tm_year);
77 } 77 }
78 if ((tm->tm_year + 1900) < 1970) 78 if ((tm->tm_year + 1900) < 1970)
79 tm->tm_year += 100; 79 tm->tm_year += 100;
@@ -104,12 +104,12 @@ int maple_set_rtc_time(struct rtc_time *tm)
104 year = tm->tm_year; 104 year = tm->tm_year;
105 105
106 if (!(save_control & RTC_DM_BINARY) || RTC_ALWAYS_BCD) { 106 if (!(save_control & RTC_DM_BINARY) || RTC_ALWAYS_BCD) {
107 BIN_TO_BCD(sec); 107 sec = bin2bcd(sec);
108 BIN_TO_BCD(min); 108 min = bin2bcd(min);
109 BIN_TO_BCD(hour); 109 hour = bin2bcd(hour);
110 BIN_TO_BCD(mon); 110 mon = bin2bcd(mon);
111 BIN_TO_BCD(mday); 111 mday = bin2bcd(mday);
112 BIN_TO_BCD(year); 112 year = bin2bcd(year);
113 } 113 }
114 maple_clock_write(sec, RTC_SECONDS); 114 maple_clock_write(sec, RTC_SECONDS);
115 maple_clock_write(min, RTC_MINUTES); 115 maple_clock_write(min, RTC_MINUTES);