mirror of
https://github.com/enjoy-digital/litex.git
synced 2025-01-04 09:52:26 -05:00
software/irq: cleanup and make explicit that irqs are not supported with Microwatt and SERV, fix compilation warning.
This commit is contained in:
parent
fb9e369a19
commit
1d1a4ecd28
2 changed files with 19 additions and 19 deletions
|
@ -8,7 +8,7 @@
|
||||||
#include <uart.h>
|
#include <uart.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|
||||||
|
|
||||||
#if defined(__blackparrot__) /*TODO: Update this function for BP*/ //
|
#if defined(__blackparrot__) /*TODO: Update this function for BP*/ //
|
||||||
|
|
||||||
void isr(void);
|
void isr(void);
|
||||||
|
@ -21,7 +21,7 @@ void isr(void)
|
||||||
onetime++;
|
onetime++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#elif defined(__rocket__)
|
#elif defined(__rocket__)
|
||||||
void plic_init(void);
|
void plic_init(void);
|
||||||
void plic_init(void)
|
void plic_init(void)
|
||||||
{
|
{
|
||||||
|
@ -65,7 +65,7 @@ void isr(void)
|
||||||
void isr(void);
|
void isr(void);
|
||||||
void isr(void)
|
void isr(void)
|
||||||
{
|
{
|
||||||
unsigned int irqs;
|
__attribute__((unused)) unsigned int irqs;
|
||||||
|
|
||||||
irqs = irq_pending() & irq_getmask();
|
irqs = irq_pending() & irq_getmask();
|
||||||
|
|
||||||
|
|
|
@ -72,11 +72,11 @@ static inline unsigned int irq_getie(void)
|
||||||
#elif defined (__rocket__)
|
#elif defined (__rocket__)
|
||||||
return (csrr(mstatus) & CSR_MSTATUS_MIE) != 0;
|
return (csrr(mstatus) & CSR_MSTATUS_MIE) != 0;
|
||||||
#elif defined (__microwatt__)
|
#elif defined (__microwatt__)
|
||||||
return 0; // FIXME
|
return 0; /* No interrupt support on Microwatt */
|
||||||
#elif defined (__blackparrot__)
|
#elif defined (__blackparrot__)
|
||||||
return (csrr(mstatus) & CSR_MSTATUS_MIE) != 0;//TODO
|
return (csrr(mstatus) & CSR_MSTATUS_MIE) != 0; /* FIXME */
|
||||||
#elif defined (__serv__)
|
#elif defined (__serv__)
|
||||||
return 0; /* FIXME */
|
return 0; /* No interrupt support on SERV */
|
||||||
#else
|
#else
|
||||||
#error Unsupported architecture
|
#error Unsupported architecture
|
||||||
#endif
|
#endif
|
||||||
|
@ -103,11 +103,11 @@ static inline void irq_setie(unsigned int ie)
|
||||||
#elif defined (__rocket__)
|
#elif defined (__rocket__)
|
||||||
if(ie) csrs(mstatus,CSR_MSTATUS_MIE); else csrc(mstatus,CSR_MSTATUS_MIE);
|
if(ie) csrs(mstatus,CSR_MSTATUS_MIE); else csrc(mstatus,CSR_MSTATUS_MIE);
|
||||||
#elif defined (__microwatt__)
|
#elif defined (__microwatt__)
|
||||||
// FIXME
|
/* No interrupt support on Microwatt */
|
||||||
#elif defined (__blackparrot__)
|
#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__)
|
#elif defined (__serv__)
|
||||||
/* FIXME */
|
/* No interrupt support on SERV */
|
||||||
#else
|
#else
|
||||||
#error Unsupported architecture
|
#error Unsupported architecture
|
||||||
#endif
|
#endif
|
||||||
|
@ -136,11 +136,11 @@ static inline unsigned int irq_getmask(void)
|
||||||
#elif defined (__rocket__)
|
#elif defined (__rocket__)
|
||||||
return *((unsigned int *)PLIC_ENABLED) >> 1;
|
return *((unsigned int *)PLIC_ENABLED) >> 1;
|
||||||
#elif defined (__microwatt__)
|
#elif defined (__microwatt__)
|
||||||
return 0; // FIXME
|
return 0; /* No interrupt support on Microwatt */
|
||||||
#elif defined (__blackparrot__)
|
#elif defined (__blackparrot__)
|
||||||
//TODO:BP
|
|
||||||
#elif defined (__serv__)
|
|
||||||
return 0; /* FIXME */
|
return 0; /* FIXME */
|
||||||
|
#elif defined (__serv__)
|
||||||
|
return 0; /* No interrupt support on SERV */
|
||||||
#else
|
#else
|
||||||
#error Unsupported architecture
|
#error Unsupported architecture
|
||||||
#endif
|
#endif
|
||||||
|
@ -163,11 +163,11 @@ static inline void irq_setmask(unsigned int mask)
|
||||||
#elif defined (__rocket__)
|
#elif defined (__rocket__)
|
||||||
*((unsigned int *)PLIC_ENABLED) = mask << 1;
|
*((unsigned int *)PLIC_ENABLED) = mask << 1;
|
||||||
#elif defined (__microwatt__)
|
#elif defined (__microwatt__)
|
||||||
// FIXME
|
/* No interrupt support on Microwatt */
|
||||||
#elif defined (__blackparrot__)
|
#elif defined (__blackparrot__)
|
||||||
//TODO:BP
|
|
||||||
#elif defined (__serv__)
|
|
||||||
/* FIXME */
|
/* FIXME */
|
||||||
|
#elif defined (__serv__)
|
||||||
|
/* No interrupt support on SERV */
|
||||||
#else
|
#else
|
||||||
#error Unsupported architecture
|
#error Unsupported architecture
|
||||||
#endif
|
#endif
|
||||||
|
@ -194,11 +194,11 @@ static inline unsigned int irq_pending(void)
|
||||||
#elif defined (__rocket__)
|
#elif defined (__rocket__)
|
||||||
return *((unsigned int *)PLIC_PENDING) >> 1;
|
return *((unsigned int *)PLIC_PENDING) >> 1;
|
||||||
#elif defined (__microwatt__)
|
#elif defined (__microwatt__)
|
||||||
return 0; // FIXME
|
return 0; /* No interrupt support on Microwatt */
|
||||||
#elif defined (__blackparrot__)
|
#elif defined (__blackparrot__)
|
||||||
return csr_readl(PLIC_PENDING) >> 1;//TODO:BP
|
return csr_readl(PLIC_PENDING) >> 1; /* FIXME */
|
||||||
#elif defined (__serv__)
|
#elif defined (__serv__)
|
||||||
return 0;/* FIXME */
|
return 0; /* No interrupt support on SERV */
|
||||||
#else
|
#else
|
||||||
#error Unsupported architecture
|
#error Unsupported architecture
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in a new issue