From 4e1880672f38ceb600c7dc7d3179dbb9f11f792d Mon Sep 17 00:00:00 2001 From: Christian Cunningham Date: Tue, 22 Mar 2022 19:11:58 -0700 Subject: Working on time --- src/cpu/irq.c | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) (limited to 'src/cpu/irq.c') diff --git a/src/cpu/irq.c b/src/cpu/irq.c index e3353e8..3bd28e6 100644 --- a/src/cpu/irq.c +++ b/src/cpu/irq.c @@ -80,20 +80,9 @@ unsigned long c_irq_handler(void) unsigned long c_fiq_handler(void) { unsigned long source = load32(CORE0_FIQ_SOURCE); - if (source & (1 << 8)) { - // Check if System Time Compare 0 Triggered the Interrupt - if (*(volatile unsigned long*)SYS_TIMER_CS & SYS_TIMER_SC_M0) { - volatile unsigned long* timer_cs = (volatile unsigned long*)SYS_TIMER_CS; - volatile unsigned long* timer_chi = (volatile unsigned long*)SYS_TIMER_CHI; - volatile unsigned long* nexttime = (volatile unsigned long*)SYS_TIMER_C0; - add_thread_without_duplicate(test_entry, 0, 2); - *nexttime = *timer_chi + 4000000; - *timer_cs = SYS_TIMER_SC_M0; - return 1; - } - } // Check if CNTV triggered the interrupt - else if (source & (1 << 3)) { + if (source & (1 << 3)) { + write_cntv_tval(cntfrq); } return 0; } -- cgit v1.2.1