From 494c383fa8b1071a80e59407f6b1f8ea87308094 Mon Sep 17 00:00:00 2001 From: Sebastien Bourdeauducq Date: Tue, 7 Feb 2012 00:07:25 +0100 Subject: [PATCH] software: remove unnecessary IRQ acks --- software/include/base/irq.h | 5 ----- software/libbase/system.c | 4 ++-- software/libbase/uart.c | 3 --- 3 files changed, 2 insertions(+), 10 deletions(-) diff --git a/software/include/base/irq.h b/software/include/base/irq.h index 37cf73fd..33bd05be 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 0edcb818..b253c214 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 8490bcdf..248e5f52 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; -- 2.30.2