X-Git-Url: https://scm.lunaixsky.com/lunaix-os.git/blobdiff_plain/8fce4520de1f257819b16f9253fa28dcdae743f4..b60166b327a9108b07e3069fa6568a451529ffd9:/lunaix-os/hal/rtc/mc146818a.c diff --git a/lunaix-os/hal/rtc/mc146818a.c b/lunaix-os/hal/rtc/mc146818a.c index c36412a..cb1ae33 100644 --- a/lunaix-os/hal/rtc/mc146818a.c +++ b/lunaix-os/hal/rtc/mc146818a.c @@ -13,12 +13,12 @@ #include #include #include +#include #include #include -#include #include #define RTC_INDEX_PORT 0x70 @@ -212,12 +212,14 @@ rtc_init(struct device_def* devdef) rtc->get_counts = rtc_getcnt; rtc->chfreq = rtc_chfreq; + hwrtc_register(&devdef->class, rtc); + return 0; } static struct device_def devrtc_mc146818 = { .name = "MC146818 RTC", - .class = DEVCLASS(DEVIF_SOC, DEVFN_TIME, DEV_RTC, 1), + .class = DEVCLASS(DEVIF_SOC, DEVFN_TIME, DEV_RTC), .init = rtc_init }; -EXPORT_DEVICE(mc146818, &devrtc_mc146818, load_earlystage); \ No newline at end of file +EXPORT_DEVICE(mc146818, &devrtc_mc146818, load_timedev); \ No newline at end of file