From: Florent Kermarrec Date: Mon, 27 Apr 2020 11:46:12 +0000 (+0200) Subject: software/irq: cleanup and make explicit that irqs are not supported with Microwatt... X-Git-Tag: 24jan2021_ls180~431^2 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=1d1a4ecd28aeb3196e7ae2adeb97e25204613a3a;p=litex.git software/irq: cleanup and make explicit that irqs are not supported with Microwatt and SERV, fix compilation warning. --- diff --git a/litex/soc/software/bios/isr.c b/litex/soc/software/bios/isr.c index 971bd37b..f33cdac4 100644 --- a/litex/soc/software/bios/isr.c +++ b/litex/soc/software/bios/isr.c @@ -8,7 +8,7 @@ #include #include - + #if defined(__blackparrot__) /*TODO: Update this function for BP*/ // void isr(void); @@ -21,7 +21,7 @@ void isr(void) onetime++; } } -#elif defined(__rocket__) +#elif defined(__rocket__) void plic_init(void); void plic_init(void) { @@ -65,7 +65,7 @@ void isr(void) void isr(void); void isr(void) { - unsigned int irqs; + __attribute__((unused)) unsigned int irqs; irqs = irq_pending() & irq_getmask(); diff --git a/litex/soc/software/include/base/irq.h b/litex/soc/software/include/base/irq.h index 00dad8a2..6a2f7394 100644 --- a/litex/soc/software/include/base/irq.h +++ b/litex/soc/software/include/base/irq.h @@ -72,11 +72,11 @@ static inline unsigned int irq_getie(void) #elif defined (__rocket__) return (csrr(mstatus) & CSR_MSTATUS_MIE) != 0; #elif defined (__microwatt__) - return 0; // FIXME -#elif defined (__blackparrot__) - return (csrr(mstatus) & CSR_MSTATUS_MIE) != 0;//TODO + return 0; /* No interrupt support on Microwatt */ +#elif defined (__blackparrot__) + return (csrr(mstatus) & CSR_MSTATUS_MIE) != 0; /* FIXME */ #elif defined (__serv__) - return 0; /* FIXME */ + return 0; /* No interrupt support on SERV */ #else #error Unsupported architecture #endif @@ -103,11 +103,11 @@ static inline void irq_setie(unsigned int ie) #elif defined (__rocket__) if(ie) csrs(mstatus,CSR_MSTATUS_MIE); else csrc(mstatus,CSR_MSTATUS_MIE); #elif defined (__microwatt__) - // FIXME + /* No interrupt support on Microwatt */ #elif defined (__blackparrot__) - if(ie) csrs(mstatus,CSR_MSTATUS_MIE); else csrc(mstatus,CSR_MSTATUS_MIE);//TODO:BP + if(ie) csrs(mstatus,CSR_MSTATUS_MIE); else csrc(mstatus,CSR_MSTATUS_MIE); /* FIXME */ #elif defined (__serv__) - /* FIXME */ + /* No interrupt support on SERV */ #else #error Unsupported architecture #endif @@ -136,11 +136,11 @@ static inline unsigned int irq_getmask(void) #elif defined (__rocket__) return *((unsigned int *)PLIC_ENABLED) >> 1; #elif defined (__microwatt__) - return 0; // FIXME + return 0; /* No interrupt support on Microwatt */ #elif defined (__blackparrot__) - //TODO:BP -#elif defined (__serv__) return 0; /* FIXME */ +#elif defined (__serv__) + return 0; /* No interrupt support on SERV */ #else #error Unsupported architecture #endif @@ -163,11 +163,11 @@ static inline void irq_setmask(unsigned int mask) #elif defined (__rocket__) *((unsigned int *)PLIC_ENABLED) = mask << 1; #elif defined (__microwatt__) - // FIXME + /* No interrupt support on Microwatt */ #elif defined (__blackparrot__) - //TODO:BP -#elif defined (__serv__) /* FIXME */ +#elif defined (__serv__) + /* No interrupt support on SERV */ #else #error Unsupported architecture #endif @@ -194,11 +194,11 @@ static inline unsigned int irq_pending(void) #elif defined (__rocket__) return *((unsigned int *)PLIC_PENDING) >> 1; #elif defined (__microwatt__) - return 0; // FIXME + return 0; /* No interrupt support on Microwatt */ #elif defined (__blackparrot__) - return csr_readl(PLIC_PENDING) >> 1;//TODO:BP + return csr_readl(PLIC_PENDING) >> 1; /* FIXME */ #elif defined (__serv__) - return 0;/* FIXME */ + return 0; /* No interrupt support on SERV */ #else #error Unsupported architecture #endif