aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorAdrian Bunk <bunk@kernel.org>2008-08-08 12:34:35 -0400
committerRussell King <rmk+kernel@arm.linux.org.uk>2008-08-27 15:07:59 -0400
commitf1bcf7e3e734ea8713e08fbc3409f8bf26ec418f (patch)
tree56d2fa9c61d4904dba92a9a2507bd2583a50a120 /arch
parentae82cbfc8beaa69007aa09966d3983ac938c3577 (diff)
[ARM] use bcd2bin/bin2bcd
This patch changes arm to use the new bcd2bin/bin2bcd functions instead of the obsolete BCD_TO_BIN/BIN_TO_BCD macros. Signed-off-by: Adrian Bunk <bunk@kernel.org> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/mach-footbridge/time.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/arch/arm/mach-footbridge/time.c b/arch/arm/mach-footbridge/time.c
index fd9a7c11d62d..004819ea85c8 100644
--- a/arch/arm/mach-footbridge/time.c
+++ b/arch/arm/mach-footbridge/time.c
@@ -49,12 +49,12 @@ static unsigned long __init get_isa_cmos_time(void)
49 } while (sec != CMOS_READ(RTC_SECONDS)); 49 } while (sec != CMOS_READ(RTC_SECONDS));
50 50
51 if (!(CMOS_READ(RTC_CONTROL) & RTC_DM_BINARY) || RTC_ALWAYS_BCD) { 51 if (!(CMOS_READ(RTC_CONTROL) & RTC_DM_BINARY) || RTC_ALWAYS_BCD) {
52 BCD_TO_BIN(sec); 52 sec = bcd2bin(sec);
53 BCD_TO_BIN(min); 53 min = bcd2bin(min);
54 BCD_TO_BIN(hour); 54 hour = bcd2bin(hour);
55 BCD_TO_BIN(day); 55 day = bcd2bin(day);
56 BCD_TO_BIN(mon); 56 mon = bcd2bin(mon);
57 BCD_TO_BIN(year); 57 year = bcd2bin(year);
58 } 58 }
59 if ((year += 1900) < 1970) 59 if ((year += 1900) < 1970)
60 year += 100; 60 year += 100;
@@ -76,7 +76,7 @@ static int set_isa_cmos_time(void)
76 76
77 cmos_minutes = CMOS_READ(RTC_MINUTES); 77 cmos_minutes = CMOS_READ(RTC_MINUTES);
78 if (!(save_control & RTC_DM_BINARY) || RTC_ALWAYS_BCD) 78 if (!(save_control & RTC_DM_BINARY) || RTC_ALWAYS_BCD)
79 BCD_TO_BIN(cmos_minutes); 79 cmos_minutes = bcd2bin(cmos_minutes);
80 80
81 /* 81 /*
82 * since we're only adjusting minutes and seconds, 82 * since we're only adjusting minutes and seconds,
@@ -92,8 +92,8 @@ static int set_isa_cmos_time(void)
92 92
93 if (abs(real_minutes - cmos_minutes) < 30) { 93 if (abs(real_minutes - cmos_minutes) < 30) {
94 if (!(save_control & RTC_DM_BINARY) || RTC_ALWAYS_BCD) { 94 if (!(save_control & RTC_DM_BINARY) || RTC_ALWAYS_BCD) {
95 BIN_TO_BCD(real_seconds); 95 real_seconds = bin2bcd(real_seconds);
96 BIN_TO_BCD(real_minutes); 96 real_minutes = bin2bcd(real_minutes);
97 } 97 }
98 CMOS_WRITE(real_seconds,RTC_SECONDS); 98 CMOS_WRITE(real_seconds,RTC_SECONDS);
99 CMOS_WRITE(real_minutes,RTC_MINUTES); 99 CMOS_WRITE(real_minutes,RTC_MINUTES);