// Make sure the rtc timer is disabled by default
rtc_disable_timer();
- struct hwrtc* rtc = hwrtc_alloc_new("mc146818");
+ struct hwrtc* rtc = hwrtc_alloc_new(devdef, "mc146818");
struct mc146818* state = valloc(sizeof(struct mc146818));
state->rtc_context = rtc;
}
static struct device_def devrtc_mc146818 = {
- .name = "rtc_mc146818",
- .class = DEVCLASS(DEVIF_SOC, DEVFN_TIME, DEV_RTC, 1),
+ .name = "MC146818 RTC",
+ .class = DEVCLASS(DEVIF_SOC, DEVFN_TIME, DEV_RTC),
.init = rtc_init
};
EXPORT_DEVICE(mc146818, &devrtc_mc146818, load_earlystage);
\ No newline at end of file