#include <command.h>
#include <rtc.h>
-#if defined(CONFIG_RTC_DS1302) && defined(CONFIG_CMD_DATE)
+#if defined(CONFIG_CMD_DATE)
/* GPP Pins */
#define DATA 0x200
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;
void
rtc_init(void)
{
- struct ds1302_st bbclk;
+ struct ds1302_st bbclk;
unsigned char b;
int mod;
return rel;
}
-void
-rtc_set(struct rtc_time *tmp)
+int rtc_set(struct rtc_time *tmp)
{
struct ds1302_st bbclk;
unsigned char b=0;
write_ser_drv(0x8e,&b,1); /* disable write protect */
write_ser_drv(0xbe,(unsigned char *)&bbclk, 8); /* write burst */
+
+ return 0;
}
#endif