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
Support to multi-threading and pthread interface (POSIX.1-2008) (#23)
[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 c36412a8d293aa2a2f55ab08db05db66a4cfee73..cb1ae33577fef7d853577fabf8d899fae8384e6b 100644
(file)
--- a/
lunaix-os/hal/rtc/mc146818a.c
+++ b/
lunaix-os/hal/rtc/mc146818a.c
@@
-13,12
+13,12
@@
#include <lunaix/isrm.h>
#include <lunaix/mm/valloc.h>
#include <lunaix/status.h>
#include <lunaix/isrm.h>
#include <lunaix/mm/valloc.h>
#include <lunaix/status.h>
+#include <lunaix/pcontext.h>
#include <hal/rtc/mc146818a.h>
#include <klibc/string.h>
#include <hal/rtc/mc146818a.h>
#include <klibc/string.h>
-#include <sys/interrupts.h>
#include <sys/port_io.h>
#define RTC_INDEX_PORT 0x70
#include <sys/port_io.h>
#define RTC_INDEX_PORT 0x70
@@
-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 = {
.name = "MC146818 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
};
.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