git://scm.lunaixsky.com
/
lunaix-os.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
feat: nearly complete POSIX.1-2008 compliant terminal interface implementation
[lunaix-os.git]
/
lunaix-os
/
hal
/
rtc
/
mc146818a.c
diff --git
a/lunaix-os/hal/rtc/mc146818a.c
b/lunaix-os/hal/rtc/mc146818a.c
index e918ffdba83024aa0a578b608d62b3c0fea2b0fc..5083444e29bdf7523e96b4637aa35df23e7b963c 100644
(file)
--- a/
lunaix-os/hal/rtc/mc146818a.c
+++ b/
lunaix-os/hal/rtc/mc146818a.c
@@
-212,12
+212,14
@@
rtc_init(struct device_def* devdef)
rtc->get_counts = rtc_getcnt;
rtc->chfreq = rtc_chfreq;
rtc->get_counts = rtc_getcnt;
rtc->chfreq = rtc_chfreq;
+ hwrtc_register(&devdef->class, rtc);
+
return 0;
}
static struct device_def devrtc_mc146818 = {
return 0;
}
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
};
.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