aboutsummaryrefslogtreecommitdiff
path: root/src/cpu
diff options
context:
space:
mode:
authorChristian Cunningham <cc@localhost>2022-03-22 19:11:58 -0700
committerChristian Cunningham <cc@localhost>2022-03-22 19:11:58 -0700
commit4e1880672f38ceb600c7dc7d3179dbb9f11f792d (patch)
treefcdf214519d3a4c1d00a71053915a235f8d682ad /src/cpu
parent8c1d4830ae5f8c9ec6cb1fe3df41be3300a820bd (diff)
Working on time
Diffstat (limited to 'src/cpu')
-rw-r--r--src/cpu/irq.c15
1 files changed, 2 insertions, 13 deletions
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;
}