#include <dm.h>
#include <rtc.h>
-#if defined(__I386__) || defined(CONFIG_MALTA)
+#if defined(CONFIG_X86) || defined(CONFIG_MALTA)
#include <asm/io.h>
#define in8(p) inb(p)
#define out8(p, v) outb(v, p)
#ifdef RTC_DEBUG
printf("Get RTC year: %02x mon/cent: %02x mday: %02x wday: %02x hr: %02x min: %02x sec: %02x\n",
year, mon, mday, wday, hour, min, sec);
- printf("Alarms: month: %02x hour: %02x min: %02x sec: %02x\n",
+ printf("Alarms: mday: %02x hour: %02x min: %02x sec: %02x\n",
mc146818_read8(RTC_CONFIG_D) & 0x3f,
mc146818_read8(RTC_HOURS_ALARM),
mc146818_read8(RTC_MINUTES_ALARM),
/* Clear any pending interrupts */
mc146818_read8(RTC_CONFIG_C);
}
-#endif
+#endif /* CONFIG_CMD_DATE */
#ifdef CONFIG_DM_RTC
return 0;
}
-static int rtc_mc146818_bind(struct udevice *dev)
+static int rtc_mc146818_probe(struct udevice *dev)
{
mc146818_init();
.name = "rtc_mc146818",
.id = UCLASS_RTC,
.of_match = rtc_mc146818_ids,
- .bind = rtc_mc146818_bind,
+ .probe = rtc_mc146818_probe,
.ops = &rtc_mc146818_ops,
};