feat: kprintf now goes into dedicated pseudo-dev rather than flooding the framebuffer
[lunaix-os.git] / lunaix-os / hal / timer / apic_timer.c
index 15b3e827ef2f14ad064f7432ac49224527ebde22..db3e700d004960281d8b000a6240e1e5f9b2ef2a 100644 (file)
@@ -132,7 +132,7 @@ apic_timer_init(struct hwtimer* timer, u32_t hertz, timer_tick_cb timer_cb)
 
     assert_msg(base_freq, "Fail to initialize timer (NOFREQ)");
 
 
     assert_msg(base_freq, "Fail to initialize timer (NOFREQ)");
 
-    kprintf(KINFO "hw: %u Hz; os: %u Hz\n", base_freq, frequency);
+    kprintf(KINFO "hw: %u Hz; os: %u Hz", base_freq, frequency);
 
     // cleanup
     isrm_ivfree(iv_timer);
 
     // cleanup
     isrm_ivfree(iv_timer);
@@ -150,10 +150,13 @@ apic_timer_init(struct hwtimer* timer, u32_t hertz, timer_tick_cb timer_cb)
 struct hwtimer*
 apic_hwtimer_context()
 {
 struct hwtimer*
 apic_hwtimer_context()
 {
-    static struct hwtimer apic_hwt = { .name = "apic_timer",
-                                       .init = apic_timer_init,
-                                       .supported = apic_timer_check,
-                                       .systicks = apic_get_systicks };
+    static struct hwtimer apic_hwt = {
+        .name = "apic_timer",
+        .class = DEVCLASSV(DEVIF_SOC, DEVFN_TIME, DEV_TIMER, DEV_TIMER_APIC),
+        .init = apic_timer_init,
+        .supported = apic_timer_check,
+        .systicks = apic_get_systicks
+    };
 
     return &apic_hwt;
 }
 
     return &apic_hwt;
 }