diff --git a/software/include/base/irq.h b/software/include/base/irq.h index 37cf73fd0..33bd05beb 100644 --- a/software/include/base/irq.h +++ b/software/include/base/irq.h @@ -49,9 +49,4 @@ static inline unsigned int irq_pending(void) return pending; } -static inline void irq_ack(unsigned int mask) -{ - __asm__ __volatile__("wcsr IP, %0" : : "r" (mask)); -} - #endif /* __IRQ_H */ diff --git a/software/libbase/system.c b/software/libbase/system.c index 0edcb8180..b253c2142 100644 --- a/software/libbase/system.c +++ b/software/libbase/system.c @@ -44,7 +44,7 @@ __attribute__((noreturn)) void reboot(void) { uart_sync(); irq_setmask(0); - irq_enable(0); + irq_setie(0); CSR_SYSTEM_ID = 1; /* Writing to CSR_SYSTEM_ID causes a system reset */ while(1); } @@ -61,7 +61,7 @@ __attribute__((noreturn)) void reconf(void) { uart_sync(); irq_setmask(0); - irq_enable(0); + irq_setie(0); icap_write(0, 0xffff); /* dummy word */ icap_write(0, 0xffff); /* dummy word */ icap_write(0, 0xffff); /* dummy word */ diff --git a/software/libbase/uart.c b/software/libbase/uart.c index 8490bcdf8..248e5f527 100644 --- a/software/libbase/uart.c +++ b/software/libbase/uart.c @@ -62,7 +62,6 @@ void uart_isr(void) } CSR_UART_EV_PENDING = stat; - irq_ack(IRQ_UART); } /* Do not use in interrupt handlers! */ @@ -108,8 +107,6 @@ void uart_init(void) tx_consume = 0; tx_cts = 1; - irq_ack(IRQ_UART); - /* ack any events */ CSR_UART_EV_PENDING = CSR_UART_EV_PENDING;