X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;ds=sidebyside;f=drivers%2Frtc%2Fds1302.c;h=87ddd019168b701eb128bf17ff54dd6282f88829;hb=273d72044c383cc49ae7a8a70b2fc32c18b00a41;hp=3a856c840ac78afaf37caa14ae3c8c04b203fabb;hpb=4b7a6dd89633d60dc4b58476d5ce48247f82a3ca;p=oweals%2Fu-boot.git diff --git a/drivers/rtc/ds1302.c b/drivers/rtc/ds1302.c index 3a856c840a..87ddd01916 100644 --- a/drivers/rtc/ds1302.c +++ b/drivers/rtc/ds1302.c @@ -9,7 +9,7 @@ #include #include -#if defined(CONFIG_RTC_DS1302) && defined(CONFIG_CMD_DATE) +#if defined(CONFIG_CMD_DATE) /* GPP Pins */ #define DATA 0x200 @@ -66,7 +66,7 @@ struct ds1302_st unsigned char month:4; unsigned char zero4:5; - unsigned char day:3; /* day of week */ + unsigned char day:3; /* day of week */ unsigned char year10:4; unsigned char year:4; @@ -191,7 +191,7 @@ write_ser_drv(unsigned char addr, unsigned char *buf, int count) void rtc_init(void) { - struct ds1302_st bbclk; + struct ds1302_st bbclk; unsigned char b; int mod; @@ -287,8 +287,7 @@ rtc_get(struct rtc_time *tmp) return rel; } -void -rtc_set(struct rtc_time *tmp) +int rtc_set(struct rtc_time *tmp) { struct ds1302_st bbclk; unsigned char b=0; @@ -326,6 +325,8 @@ rtc_set(struct rtc_time *tmp) write_ser_drv(0x8e,&b,1); /* disable write protect */ write_ser_drv(0xbe,(unsigned char *)&bbclk, 8); /* write burst */ + + return 0; } #endif