From d115b01e1e85cb76537306d8785f260bacd6943a Mon Sep 17 00:00:00 2001 From: Luke Kenneth Casson Leighton Date: Wed, 22 Jul 2020 20:49:59 +0100 Subject: [PATCH] add dummy irq set/get --- src/soc/litex/irq.h | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/src/soc/litex/irq.h b/src/soc/litex/irq.h index 7374cf50..35beaed2 100644 --- a/src/soc/litex/irq.h +++ b/src/soc/litex/irq.h @@ -1,4 +1,33 @@ #ifndef __IRQ_H #define __IRQ_H +static inline unsigned int irq_getie(void) +{ + return 0; +} + +static inline void irq_setie(unsigned int ie) +{ + /*if(ie) csrs(); else csrc();*/ +} + +static inline unsigned int irq_getmask(void) +{ + unsigned int mask = 0; + //asm volatile ("csrr %0, %1" : "=r"(mask) : "i"(CSR_IRQ_MASK)); + return mask; +} + +static inline void irq_setmask(unsigned int mask) +{ + //asm volatile ("csrw %0, %1" :: "i"(CSR_IRQ_MASK), "r"(mask)); +} + +static inline unsigned int irq_pending(void) +{ + unsigned int pending = 0; + //asm volatile ("csrr %0, %1" : "=r"(pending) : "i"(CSR_IRQ_PENDING)); + return pending; +} + #endif /* __IRQ_H */ -- 2.30.2