aboutsummaryrefslogtreecommitdiffstats
path: root/arch/m68k/atari
diff options
context:
space:
mode:
Diffstat (limited to 'arch/m68k/atari')
-rw-r--r--arch/m68k/atari/time.c35
1 files changed, 18 insertions, 17 deletions
diff --git a/arch/m68k/atari/time.c b/arch/m68k/atari/time.c
index e0d3c8bfb408..e2df4a13d2bb 100644
--- a/arch/m68k/atari/time.c
+++ b/arch/m68k/atari/time.c
@@ -191,13 +191,14 @@ int atari_tt_hwclk( int op, struct rtc_time *t )
191 } 191 }
192 192
193 if (!(ctrl & RTC_DM_BINARY)) { 193 if (!(ctrl & RTC_DM_BINARY)) {
194 BIN_TO_BCD(sec); 194 sec = bin2bcd(sec);
195 BIN_TO_BCD(min); 195 min = bin2bcd(min);
196 BIN_TO_BCD(hour); 196 hour = bin2bcd(hour);
197 BIN_TO_BCD(day); 197 day = bin2bcd(day);
198 BIN_TO_BCD(mon); 198 mon = bin2bcd(mon);
199 BIN_TO_BCD(year); 199 year = bin2bcd(year);
200 if (wday >= 0) BIN_TO_BCD(wday); 200 if (wday >= 0)
201 wday = bin2bcd(wday);
201 } 202 }
202 } 203 }
203 204
@@ -252,13 +253,13 @@ int atari_tt_hwclk( int op, struct rtc_time *t )
252 } 253 }
253 254
254 if (!(ctrl & RTC_DM_BINARY)) { 255 if (!(ctrl & RTC_DM_BINARY)) {
255 BCD_TO_BIN(sec); 256 sec = bcd2bin(sec);
256 BCD_TO_BIN(min); 257 min = bcd2bin(min);
257 BCD_TO_BIN(hour); 258 hour = bcd2bin(hour);
258 BCD_TO_BIN(day); 259 day = bcd2bin(day);
259 BCD_TO_BIN(mon); 260 mon = bcd2bin(mon);
260 BCD_TO_BIN(year); 261 year = bcd2bin(year);
261 BCD_TO_BIN(wday); 262 wday = bcd2bin(wday);
262 } 263 }
263 264
264 if (!(ctrl & RTC_24H)) { 265 if (!(ctrl & RTC_24H)) {
@@ -318,7 +319,7 @@ int atari_tt_set_clock_mmss (unsigned long nowtime)
318 319
319 rtc_minutes = RTC_READ (RTC_MINUTES); 320 rtc_minutes = RTC_READ (RTC_MINUTES);
320 if (!(save_control & RTC_DM_BINARY)) 321 if (!(save_control & RTC_DM_BINARY))
321 BCD_TO_BIN (rtc_minutes); 322 rtc_minutes = bcd2bin(rtc_minutes);
322 323
323 /* Since we're only adjusting minutes and seconds, don't interfere 324 /* Since we're only adjusting minutes and seconds, don't interfere
324 with hour overflow. This avoids messing with unknown time zones 325 with hour overflow. This avoids messing with unknown time zones
@@ -329,8 +330,8 @@ int atari_tt_set_clock_mmss (unsigned long nowtime)
329 { 330 {
330 if (!(save_control & RTC_DM_BINARY)) 331 if (!(save_control & RTC_DM_BINARY))
331 { 332 {
332 BIN_TO_BCD (real_seconds); 333 real_seconds = bin2bcd(real_seconds);
333 BIN_TO_BCD (real_minutes); 334 real_minutes = bin2bcd(real_minutes);
334 } 335 }
335 RTC_WRITE (RTC_SECONDS, real_seconds); 336 RTC_WRITE (RTC_SECONDS, real_seconds);
336 RTC_WRITE (RTC_MINUTES, real_minutes); 337 RTC_WRITE (RTC_MINUTES, real_minutes);