diff options
Diffstat (limited to 'arch/cris')
22 files changed, 54 insertions, 52 deletions
diff --git a/arch/cris/Kconfig b/arch/cris/Kconfig index 9389d38f222f..07335e719bf8 100644 --- a/arch/cris/Kconfig +++ b/arch/cris/Kconfig | |||
@@ -62,6 +62,8 @@ config HZ | |||
62 | 62 | ||
63 | source "init/Kconfig" | 63 | source "init/Kconfig" |
64 | 64 | ||
65 | source "kernel/Kconfig.freezer" | ||
66 | |||
65 | menu "General setup" | 67 | menu "General setup" |
66 | 68 | ||
67 | source "fs/Kconfig.binfmt" | 69 | source "fs/Kconfig.binfmt" |
diff --git a/arch/cris/Makefile b/arch/cris/Makefile index 838cd2ae03ae..c6f5f5a2ffdf 100644 --- a/arch/cris/Makefile +++ b/arch/cris/Makefile | |||
@@ -10,6 +10,8 @@ | |||
10 | # License. See the file "COPYING" in the main directory of this archive | 10 | # License. See the file "COPYING" in the main directory of this archive |
11 | # for more details. | 11 | # for more details. |
12 | 12 | ||
13 | KBUILD_DEFCONFIG := etrax-100lx_v2_defconfig | ||
14 | |||
13 | arch-y := v10 | 15 | arch-y := v10 |
14 | arch-$(CONFIG_ETRAX_ARCH_V10) := v10 | 16 | arch-$(CONFIG_ETRAX_ARCH_V10) := v10 |
15 | arch-$(CONFIG_ETRAX_ARCH_V32) := v32 | 17 | arch-$(CONFIG_ETRAX_ARCH_V32) := v32 |
diff --git a/arch/cris/arch-v10/boot/compressed/Makefile b/arch/cris/arch-v10/boot/compressed/Makefile index 08d943ce4be7..6fe0ffaf3be6 100644 --- a/arch/cris/arch-v10/boot/compressed/Makefile +++ b/arch/cris/arch-v10/boot/compressed/Makefile | |||
@@ -4,7 +4,7 @@ | |||
4 | 4 | ||
5 | asflags-y += $(LINUXINCLUDE) | 5 | asflags-y += $(LINUXINCLUDE) |
6 | ccflags-y += -O2 $(LINUXINCLUDE) | 6 | ccflags-y += -O2 $(LINUXINCLUDE) |
7 | ldflags-y += -T $(srctree)/$(obj)/decompress.ld | 7 | ldflags-y += -T $(srctree)/$(src)/decompress.lds |
8 | OBJECTS = $(obj)/head.o $(obj)/misc.o | 8 | OBJECTS = $(obj)/head.o $(obj)/misc.o |
9 | OBJCOPYFLAGS = -O binary --remove-section=.bss | 9 | OBJCOPYFLAGS = -O binary --remove-section=.bss |
10 | 10 | ||
diff --git a/arch/cris/arch-v10/boot/compressed/decompress.ld b/arch/cris/arch-v10/boot/compressed/decompress.lds index e80f4594d543..e80f4594d543 100644 --- a/arch/cris/arch-v10/boot/compressed/decompress.ld +++ b/arch/cris/arch-v10/boot/compressed/decompress.lds | |||
diff --git a/arch/cris/arch-v10/boot/rescue/Makefile b/arch/cris/arch-v10/boot/rescue/Makefile index 07688da92708..82ab59b968e5 100644 --- a/arch/cris/arch-v10/boot/rescue/Makefile +++ b/arch/cris/arch-v10/boot/rescue/Makefile | |||
@@ -4,7 +4,7 @@ | |||
4 | 4 | ||
5 | ccflags-y += -O2 $(LINUXINCLUDE) | 5 | ccflags-y += -O2 $(LINUXINCLUDE) |
6 | asflags-y += $(LINUXINCLUDE) | 6 | asflags-y += $(LINUXINCLUDE) |
7 | ldflags-y += -T $(srctree)/$(obj)/rescue.ld | 7 | ldflags-y += -T $(srctree)/$(src)/rescue.lds |
8 | OBJCOPYFLAGS = -O binary --remove-section=.bss | 8 | OBJCOPYFLAGS = -O binary --remove-section=.bss |
9 | obj-$(CONFIG_ETRAX_AXISFLASHMAP) = head.o | 9 | obj-$(CONFIG_ETRAX_AXISFLASHMAP) = head.o |
10 | OBJECT := $(obj)/head.o | 10 | OBJECT := $(obj)/head.o |
diff --git a/arch/cris/arch-v10/boot/rescue/rescue.ld b/arch/cris/arch-v10/boot/rescue/rescue.lds index 0b52a9490db6..0b52a9490db6 100644 --- a/arch/cris/arch-v10/boot/rescue/rescue.ld +++ b/arch/cris/arch-v10/boot/rescue/rescue.lds | |||
diff --git a/arch/cris/arch-v10/boot/tools/build.c b/arch/cris/arch-v10/boot/tools/build.c index 2f9bbb26d603..c8adef364160 100644 --- a/arch/cris/arch-v10/boot/tools/build.c +++ b/arch/cris/arch-v10/boot/tools/build.c | |||
@@ -30,7 +30,6 @@ | |||
30 | #include <sys/sysmacros.h> | 30 | #include <sys/sysmacros.h> |
31 | #include <unistd.h> /* contains read/write */ | 31 | #include <unistd.h> /* contains read/write */ |
32 | #include <fcntl.h> | 32 | #include <fcntl.h> |
33 | #include <linux/a.out.h> | ||
34 | #include <errno.h> | 33 | #include <errno.h> |
35 | 34 | ||
36 | #define MINIX_HEADER 32 | 35 | #define MINIX_HEADER 32 |
diff --git a/arch/cris/arch-v10/drivers/ds1302.c b/arch/cris/arch-v10/drivers/ds1302.c index c9aa3904be05..3bdfaf43390c 100644 --- a/arch/cris/arch-v10/drivers/ds1302.c +++ b/arch/cris/arch-v10/drivers/ds1302.c | |||
@@ -215,12 +215,12 @@ get_rtc_time(struct rtc_time *rtc_tm) | |||
215 | 215 | ||
216 | local_irq_restore(flags); | 216 | local_irq_restore(flags); |
217 | 217 | ||
218 | BCD_TO_BIN(rtc_tm->tm_sec); | 218 | rtc_tm->tm_sec = bcd2bin(rtc_tm->tm_sec); |
219 | BCD_TO_BIN(rtc_tm->tm_min); | 219 | rtc_tm->tm_min = bcd2bin(rtc_tm->tm_min); |
220 | BCD_TO_BIN(rtc_tm->tm_hour); | 220 | rtc_tm->tm_hour = bcd2bin(rtc_tm->tm_hour); |
221 | BCD_TO_BIN(rtc_tm->tm_mday); | 221 | rtc_tm->tm_mday = bcd2bin(rtc_tm->tm_mday); |
222 | BCD_TO_BIN(rtc_tm->tm_mon); | 222 | rtc_tm->tm_mon = bcd2bin(rtc_tm->tm_mon); |
223 | BCD_TO_BIN(rtc_tm->tm_year); | 223 | rtc_tm->tm_year = bcd2bin(rtc_tm->tm_year); |
224 | 224 | ||
225 | /* | 225 | /* |
226 | * Account for differences between how the RTC uses the values | 226 | * Account for differences between how the RTC uses the values |
@@ -295,12 +295,12 @@ rtc_ioctl(struct inode *inode, struct file *file, unsigned int cmd, | |||
295 | else | 295 | else |
296 | yrs -= 1900; /* RTC (70, 71, ... 99) */ | 296 | yrs -= 1900; /* RTC (70, 71, ... 99) */ |
297 | 297 | ||
298 | BIN_TO_BCD(sec); | 298 | sec = bin2bcd(sec); |
299 | BIN_TO_BCD(min); | 299 | min = bin2bcd(min); |
300 | BIN_TO_BCD(hrs); | 300 | hrs = bin2bcd(hrs); |
301 | BIN_TO_BCD(day); | 301 | day = bin2bcd(day); |
302 | BIN_TO_BCD(mon); | 302 | mon = bin2bcd(mon); |
303 | BIN_TO_BCD(yrs); | 303 | yrs = bin2bcd(yrs); |
304 | 304 | ||
305 | local_irq_save(flags); | 305 | local_irq_save(flags); |
306 | CMOS_WRITE(yrs, RTC_YEAR); | 306 | CMOS_WRITE(yrs, RTC_YEAR); |
diff --git a/arch/cris/arch-v10/drivers/pcf8563.c b/arch/cris/arch-v10/drivers/pcf8563.c index 8769dc914073..1e90c1a9c849 100644 --- a/arch/cris/arch-v10/drivers/pcf8563.c +++ b/arch/cris/arch-v10/drivers/pcf8563.c | |||
@@ -122,7 +122,7 @@ get_rtc_time(struct rtc_time *tm) | |||
122 | "information is no longer guaranteed!\n", PCF8563_NAME); | 122 | "information is no longer guaranteed!\n", PCF8563_NAME); |
123 | } | 123 | } |
124 | 124 | ||
125 | tm->tm_year = BCD_TO_BIN(tm->tm_year) + | 125 | tm->tm_year = bcd2bin(tm->tm_year) + |
126 | ((tm->tm_mon & 0x80) ? 100 : 0); | 126 | ((tm->tm_mon & 0x80) ? 100 : 0); |
127 | tm->tm_sec &= 0x7F; | 127 | tm->tm_sec &= 0x7F; |
128 | tm->tm_min &= 0x7F; | 128 | tm->tm_min &= 0x7F; |
@@ -131,11 +131,11 @@ get_rtc_time(struct rtc_time *tm) | |||
131 | tm->tm_wday &= 0x07; /* Not coded in BCD. */ | 131 | tm->tm_wday &= 0x07; /* Not coded in BCD. */ |
132 | tm->tm_mon &= 0x1F; | 132 | tm->tm_mon &= 0x1F; |
133 | 133 | ||
134 | BCD_TO_BIN(tm->tm_sec); | 134 | tm->tm_sec = bcd2bin(tm->tm_sec); |
135 | BCD_TO_BIN(tm->tm_min); | 135 | tm->tm_min = bcd2bin(tm->tm_min); |
136 | BCD_TO_BIN(tm->tm_hour); | 136 | tm->tm_hour = bcd2bin(tm->tm_hour); |
137 | BCD_TO_BIN(tm->tm_mday); | 137 | tm->tm_mday = bcd2bin(tm->tm_mday); |
138 | BCD_TO_BIN(tm->tm_mon); | 138 | tm->tm_mon = bcd2bin(tm->tm_mon); |
139 | tm->tm_mon--; /* Month is 1..12 in RTC but 0..11 in linux */ | 139 | tm->tm_mon--; /* Month is 1..12 in RTC but 0..11 in linux */ |
140 | } | 140 | } |
141 | 141 | ||
@@ -282,12 +282,12 @@ int pcf8563_ioctl(struct inode *inode, struct file *filp, unsigned int cmd, | |||
282 | century = (tm.tm_year >= 2000) ? 0x80 : 0; | 282 | century = (tm.tm_year >= 2000) ? 0x80 : 0; |
283 | tm.tm_year = tm.tm_year % 100; | 283 | tm.tm_year = tm.tm_year % 100; |
284 | 284 | ||
285 | BIN_TO_BCD(tm.tm_year); | 285 | tm.tm_year = bin2bcd(tm.tm_year); |
286 | BIN_TO_BCD(tm.tm_mon); | 286 | tm.tm_mon = bin2bcd(tm.tm_mon); |
287 | BIN_TO_BCD(tm.tm_mday); | 287 | tm.tm_mday = bin2bcd(tm.tm_mday); |
288 | BIN_TO_BCD(tm.tm_hour); | 288 | tm.tm_hour = bin2bcd(tm.tm_hour); |
289 | BIN_TO_BCD(tm.tm_min); | 289 | tm.tm_min = bin2bcd(tm.tm_min); |
290 | BIN_TO_BCD(tm.tm_sec); | 290 | tm.tm_sec = bin2bcd(tm.tm_sec); |
291 | tm.tm_mon |= century; | 291 | tm.tm_mon |= century; |
292 | 292 | ||
293 | mutex_lock(&rtc_lock); | 293 | mutex_lock(&rtc_lock); |
diff --git a/arch/cris/arch-v32/boot/compressed/Makefile b/arch/cris/arch-v32/boot/compressed/Makefile index d6335f26083b..5a1b31c99eaa 100644 --- a/arch/cris/arch-v32/boot/compressed/Makefile +++ b/arch/cris/arch-v32/boot/compressed/Makefile | |||
@@ -4,7 +4,7 @@ | |||
4 | 4 | ||
5 | asflags-y += -I $(srctree)/include/asm/mach/ -I $(srctree)/include/asm/arch | 5 | asflags-y += -I $(srctree)/include/asm/mach/ -I $(srctree)/include/asm/arch |
6 | ccflags-y += -O2 -I $(srctree)/include/asm/mach/ -I $(srctree)/include/asm/arch | 6 | ccflags-y += -O2 -I $(srctree)/include/asm/mach/ -I $(srctree)/include/asm/arch |
7 | ldflags-y += -T $(srctree)/$(obj)/decompress.ld | 7 | ldflags-y += -T $(srctree)/$(src)/decompress.lds |
8 | OBJECTS = $(obj)/head.o $(obj)/misc.o | 8 | OBJECTS = $(obj)/head.o $(obj)/misc.o |
9 | OBJCOPYFLAGS = -O binary --remove-section=.bss | 9 | OBJCOPYFLAGS = -O binary --remove-section=.bss |
10 | 10 | ||
diff --git a/arch/cris/arch-v32/boot/compressed/decompress.ld b/arch/cris/arch-v32/boot/compressed/decompress.lds index 3c837feca3ac..3c837feca3ac 100644 --- a/arch/cris/arch-v32/boot/compressed/decompress.ld +++ b/arch/cris/arch-v32/boot/compressed/decompress.lds | |||
diff --git a/arch/cris/arch-v32/boot/rescue/Makefile b/arch/cris/arch-v32/boot/rescue/Makefile index 44ae0ad61f90..566aac663a38 100644 --- a/arch/cris/arch-v32/boot/rescue/Makefile +++ b/arch/cris/arch-v32/boot/rescue/Makefile | |||
@@ -7,7 +7,7 @@ ccflags-y += -O2 -I $(srctree)/include/asm/arch/mach/ \ | |||
7 | -I $(srctree)/include/asm/arch | 7 | -I $(srctree)/include/asm/arch |
8 | asflags-y += -I $(srctree)/include/asm/arch/mach/ -I $(srctree)/include/asm/arch | 8 | asflags-y += -I $(srctree)/include/asm/arch/mach/ -I $(srctree)/include/asm/arch |
9 | LD = gcc-cris -mlinux -march=v32 -nostdlib | 9 | LD = gcc-cris -mlinux -march=v32 -nostdlib |
10 | ldflags-y += -T $(srctree)/$(obj)/rescue.ld | 10 | ldflags-y += -T $(srctree)/$(src)/rescue.lds |
11 | LDPOSTFLAGS = -lgcc | 11 | LDPOSTFLAGS = -lgcc |
12 | OBJCOPYFLAGS = -O binary --remove-section=.bss | 12 | OBJCOPYFLAGS = -O binary --remove-section=.bss |
13 | obj-$(CONFIG_ETRAX_AXISFLASHMAP) = head.o | 13 | obj-$(CONFIG_ETRAX_AXISFLASHMAP) = head.o |
diff --git a/arch/cris/arch-v32/boot/rescue/rescue.ld b/arch/cris/arch-v32/boot/rescue/rescue.lds index 8ac646bc1a2b..8ac646bc1a2b 100644 --- a/arch/cris/arch-v32/boot/rescue/rescue.ld +++ b/arch/cris/arch-v32/boot/rescue/rescue.lds | |||
diff --git a/arch/cris/arch-v32/drivers/pcf8563.c b/arch/cris/arch-v32/drivers/pcf8563.c index f263ab571221..f4478506e52c 100644 --- a/arch/cris/arch-v32/drivers/pcf8563.c +++ b/arch/cris/arch-v32/drivers/pcf8563.c | |||
@@ -118,7 +118,7 @@ get_rtc_time(struct rtc_time *tm) | |||
118 | "information is no longer guaranteed!\n", PCF8563_NAME); | 118 | "information is no longer guaranteed!\n", PCF8563_NAME); |
119 | } | 119 | } |
120 | 120 | ||
121 | tm->tm_year = BCD_TO_BIN(tm->tm_year) + | 121 | tm->tm_year = bcd2bin(tm->tm_year) + |
122 | ((tm->tm_mon & 0x80) ? 100 : 0); | 122 | ((tm->tm_mon & 0x80) ? 100 : 0); |
123 | tm->tm_sec &= 0x7F; | 123 | tm->tm_sec &= 0x7F; |
124 | tm->tm_min &= 0x7F; | 124 | tm->tm_min &= 0x7F; |
@@ -127,11 +127,11 @@ get_rtc_time(struct rtc_time *tm) | |||
127 | tm->tm_wday &= 0x07; /* Not coded in BCD. */ | 127 | tm->tm_wday &= 0x07; /* Not coded in BCD. */ |
128 | tm->tm_mon &= 0x1F; | 128 | tm->tm_mon &= 0x1F; |
129 | 129 | ||
130 | BCD_TO_BIN(tm->tm_sec); | 130 | tm->tm_sec = bcd2bin(tm->tm_sec); |
131 | BCD_TO_BIN(tm->tm_min); | 131 | tm->tm_min = bcd2bin(tm->tm_min); |
132 | BCD_TO_BIN(tm->tm_hour); | 132 | tm->tm_hour = bcd2bin(tm->tm_hour); |
133 | BCD_TO_BIN(tm->tm_mday); | 133 | tm->tm_mday = bcd2bin(tm->tm_mday); |
134 | BCD_TO_BIN(tm->tm_mon); | 134 | tm->tm_mon = bcd2bin(tm->tm_mon); |
135 | tm->tm_mon--; /* Month is 1..12 in RTC but 0..11 in linux */ | 135 | tm->tm_mon--; /* Month is 1..12 in RTC but 0..11 in linux */ |
136 | } | 136 | } |
137 | 137 | ||
@@ -279,12 +279,12 @@ int pcf8563_ioctl(struct inode *inode, struct file *filp, unsigned int cmd, | |||
279 | century = (tm.tm_year >= 2000) ? 0x80 : 0; | 279 | century = (tm.tm_year >= 2000) ? 0x80 : 0; |
280 | tm.tm_year = tm.tm_year % 100; | 280 | tm.tm_year = tm.tm_year % 100; |
281 | 281 | ||
282 | BIN_TO_BCD(tm.tm_year); | 282 | tm.tm_year = bin2bcd(tm.tm_year); |
283 | BIN_TO_BCD(tm.tm_mon); | 283 | tm.tm_mon = bin2bcd(tm.tm_mon); |
284 | BIN_TO_BCD(tm.tm_mday); | 284 | tm.tm_mday = bin2bcd(tm.tm_mday); |
285 | BIN_TO_BCD(tm.tm_hour); | 285 | tm.tm_hour = bin2bcd(tm.tm_hour); |
286 | BIN_TO_BCD(tm.tm_min); | 286 | tm.tm_min = bin2bcd(tm.tm_min); |
287 | BIN_TO_BCD(tm.tm_sec); | 287 | tm.tm_sec = bin2bcd(tm.tm_sec); |
288 | tm.tm_mon |= century; | 288 | tm.tm_mon |= century; |
289 | 289 | ||
290 | mutex_lock(&rtc_lock); | 290 | mutex_lock(&rtc_lock); |
diff --git a/arch/cris/arch-v32/kernel/smp.c b/arch/cris/arch-v32/kernel/smp.c index 952a24b2f5a9..52e16c6436f9 100644 --- a/arch/cris/arch-v32/kernel/smp.c +++ b/arch/cris/arch-v32/kernel/smp.c | |||
@@ -178,6 +178,7 @@ void __init smp_callin(void) | |||
178 | unmask_irq(IPI_INTR_VECT); | 178 | unmask_irq(IPI_INTR_VECT); |
179 | unmask_irq(TIMER0_INTR_VECT); | 179 | unmask_irq(TIMER0_INTR_VECT); |
180 | preempt_disable(); | 180 | preempt_disable(); |
181 | notify_cpu_starting(cpu); | ||
181 | local_irq_enable(); | 182 | local_irq_enable(); |
182 | 183 | ||
183 | cpu_set(cpu, cpu_online_map); | 184 | cpu_set(cpu, cpu_online_map); |
diff --git a/arch/cris/arch-v32/mach-a3/cpufreq.c b/arch/cris/arch-v32/mach-a3/cpufreq.c index 8e5a3cab8ad7..ee391ecb5bc9 100644 --- a/arch/cris/arch-v32/mach-a3/cpufreq.c +++ b/arch/cris/arch-v32/mach-a3/cpufreq.c | |||
@@ -85,7 +85,6 @@ static int cris_freq_cpu_init(struct cpufreq_policy *policy) | |||
85 | int result; | 85 | int result; |
86 | 86 | ||
87 | /* cpuinfo and default policy values */ | 87 | /* cpuinfo and default policy values */ |
88 | policy->governor = CPUFREQ_DEFAULT_GOVERNOR; | ||
89 | policy->cpuinfo.transition_latency = 1000000; /* 1ms */ | 88 | policy->cpuinfo.transition_latency = 1000000; /* 1ms */ |
90 | policy->cur = cris_freq_get_cpu_frequency(0); | 89 | policy->cur = cris_freq_get_cpu_frequency(0); |
91 | 90 | ||
diff --git a/arch/cris/arch-v32/mach-fs/cpufreq.c b/arch/cris/arch-v32/mach-fs/cpufreq.c index d57631c0d8d1..58bd71e5bda9 100644 --- a/arch/cris/arch-v32/mach-fs/cpufreq.c +++ b/arch/cris/arch-v32/mach-fs/cpufreq.c | |||
@@ -81,7 +81,6 @@ static int cris_freq_cpu_init(struct cpufreq_policy *policy) | |||
81 | int result; | 81 | int result; |
82 | 82 | ||
83 | /* cpuinfo and default policy values */ | 83 | /* cpuinfo and default policy values */ |
84 | policy->governor = CPUFREQ_DEFAULT_GOVERNOR; | ||
85 | policy->cpuinfo.transition_latency = 1000000; /* 1ms */ | 84 | policy->cpuinfo.transition_latency = 1000000; /* 1ms */ |
86 | policy->cur = cris_freq_get_cpu_frequency(0); | 85 | policy->cur = cris_freq_get_cpu_frequency(0); |
87 | 86 | ||
diff --git a/arch/cris/artpec_3_defconfig b/arch/cris/configs/artpec_3_defconfig index 41fe67409aab..41fe67409aab 100644 --- a/arch/cris/artpec_3_defconfig +++ b/arch/cris/configs/artpec_3_defconfig | |||
diff --git a/arch/cris/arch-v10/defconfig b/arch/cris/configs/etrax-100lx_defconfig index 572f11926399..572f11926399 100644 --- a/arch/cris/arch-v10/defconfig +++ b/arch/cris/configs/etrax-100lx_defconfig | |||
diff --git a/arch/cris/defconfig b/arch/cris/configs/etrax-100lx_v2_defconfig index 59f36a58f842..59f36a58f842 100644 --- a/arch/cris/defconfig +++ b/arch/cris/configs/etrax-100lx_v2_defconfig | |||
diff --git a/arch/cris/etraxfs_defconfig b/arch/cris/configs/etraxfs_defconfig index 73c646a37255..73c646a37255 100644 --- a/arch/cris/etraxfs_defconfig +++ b/arch/cris/configs/etraxfs_defconfig | |||
diff --git a/arch/cris/kernel/time.c b/arch/cris/kernel/time.c index ff4c6aa75def..074fe7dea96b 100644 --- a/arch/cris/kernel/time.c +++ b/arch/cris/kernel/time.c | |||
@@ -127,7 +127,7 @@ int set_rtc_mmss(unsigned long nowtime) | |||
127 | return 0; | 127 | return 0; |
128 | 128 | ||
129 | cmos_minutes = CMOS_READ(RTC_MINUTES); | 129 | cmos_minutes = CMOS_READ(RTC_MINUTES); |
130 | BCD_TO_BIN(cmos_minutes); | 130 | cmos_minutes = bcd2bin(cmos_minutes); |
131 | 131 | ||
132 | /* | 132 | /* |
133 | * since we're only adjusting minutes and seconds, | 133 | * since we're only adjusting minutes and seconds, |
@@ -142,8 +142,8 @@ int set_rtc_mmss(unsigned long nowtime) | |||
142 | real_minutes %= 60; | 142 | real_minutes %= 60; |
143 | 143 | ||
144 | if (abs(real_minutes - cmos_minutes) < 30) { | 144 | if (abs(real_minutes - cmos_minutes) < 30) { |
145 | BIN_TO_BCD(real_seconds); | 145 | real_seconds = bin2bcd(real_seconds); |
146 | BIN_TO_BCD(real_minutes); | 146 | real_minutes = bin2bcd(real_minutes); |
147 | CMOS_WRITE(real_seconds,RTC_SECONDS); | 147 | CMOS_WRITE(real_seconds,RTC_SECONDS); |
148 | CMOS_WRITE(real_minutes,RTC_MINUTES); | 148 | CMOS_WRITE(real_minutes,RTC_MINUTES); |
149 | } else { | 149 | } else { |
@@ -170,12 +170,12 @@ get_cmos_time(void) | |||
170 | mon = CMOS_READ(RTC_MONTH); | 170 | mon = CMOS_READ(RTC_MONTH); |
171 | year = CMOS_READ(RTC_YEAR); | 171 | year = CMOS_READ(RTC_YEAR); |
172 | 172 | ||
173 | BCD_TO_BIN(sec); | 173 | sec = bcd2bin(sec); |
174 | BCD_TO_BIN(min); | 174 | min = bcd2bin(min); |
175 | BCD_TO_BIN(hour); | 175 | hour = bcd2bin(hour); |
176 | BCD_TO_BIN(day); | 176 | day = bcd2bin(day); |
177 | BCD_TO_BIN(mon); | 177 | mon = bcd2bin(mon); |
178 | BCD_TO_BIN(year); | 178 | year = bcd2bin(year); |
179 | 179 | ||
180 | if ((year += 1900) < 1970) | 180 | if ((year += 1900) < 1970) |
181 | year += 100; | 181 | year += 100; |