X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=arch%2Fmips%2Ftx4938%2Fcommon%2Frtc_rx5c348.c;fp=arch%2Fmips%2Ftx4938%2Fcommon%2Frtc_rx5c348.c;h=d249edbb6af46dc4b93f4933f944afe41b3024b2;hb=64ba3f394c830ec48a1c31b53dcae312c56f1604;hp=07f782fc072506397f696882ff9126ae6de5d4c1;hpb=be1e6109ac94a859551f8e1774eb9a8469fe055c;p=linux-2.6.git diff --git a/arch/mips/tx4938/common/rtc_rx5c348.c b/arch/mips/tx4938/common/rtc_rx5c348.c index 07f782fc0..d249edbb6 100644 --- a/arch/mips/tx4938/common/rtc_rx5c348.c +++ b/arch/mips/tx4938/common/rtc_rx5c348.c @@ -14,7 +14,6 @@ #include #include #include -#include #include #include @@ -78,6 +77,17 @@ spi_rtc_io(unsigned char *inbuf, unsigned char *outbuf, unsigned int count) inbufs, incounts, outbufs, outcounts, 0); } +/* + * Conversion between binary and BCD. + */ +#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 + /* RTC-dependent code for time.c */ static int @@ -187,6 +197,6 @@ rtc_rx5c348_init(int chipid) srtc_24h = 1; /* set the function pointers */ - rtc_mips_get_time = rtc_rx5c348_get_time; - rtc_mips_set_time = rtc_rx5c348_set_time; + rtc_get_time = rtc_rx5c348_get_time; + rtc_set_time = rtc_rx5c348_set_time; }