X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=arch%2Fsh%2Fkernel%2Fcpu%2Frtc.c;fp=arch%2Fsh%2Fkernel%2Fcpu%2Frtc.c;h=f8361f5e788bc81896f3635d268ebf7a40056974;hb=64ba3f394c830ec48a1c31b53dcae312c56f1604;hp=4304cf75cfa2e7ef6076a7864b4a375408a20eb4;hpb=be1e6109ac94a859551f8e1774eb9a8469fe055c;p=linux-2.6.git diff --git a/arch/sh/kernel/cpu/rtc.c b/arch/sh/kernel/cpu/rtc.c index 4304cf75c..f8361f5e7 100644 --- a/arch/sh/kernel/cpu/rtc.c +++ b/arch/sh/kernel/cpu/rtc.c @@ -9,10 +9,18 @@ #include #include #include -#include + #include #include +#ifndef BCD_TO_BIN +#define BCD_TO_BIN(val) ((val)=((val)&15) + ((val)>>4)*10) +#endif + +#ifndef BIN_TO_BCD +#define BIN_TO_BCD(val) ((val)=(((val)/10)<<4) + (val)%10) +#endif + void sh_rtc_gettimeofday(struct timespec *ts) { unsigned int sec128, sec, sec2, min, hr, wk, day, mon, yr, yr100, cf_bit;