drivers: ethernet: Add LiteEth driver
Add LiteX Ethernet driver with bindings for this device. Signed-off-by: Mariusz Glebocki <mglebocki@antmicro.com> Signed-off-by: Mateusz Holenko <mholenko@antmicro.com>
This commit is contained in:
parent
6cf26b8fe6
commit
35edfedf68
7 changed files with 348 additions and 0 deletions
|
@ -17,6 +17,9 @@
|
|||
|
||||
#define TIMER0_IRQ DT_LITEX_TIMER0_E0002800_IRQ_0
|
||||
#define UART0_IRQ DT_LITEX_UART0_E0001800_IRQ_0
|
||||
|
||||
#define ETH0_IRQ DT_INST_0_LITEX_ETH0_IRQ_0
|
||||
|
||||
static inline void vexriscv_litex_irq_setmask(u32_t mask)
|
||||
{
|
||||
__asm__ volatile ("csrw %0, %1" :: "i"(IRQ_MASK), "r"(mask));
|
||||
|
@ -71,6 +74,13 @@ static void vexriscv_litex_irq_handler(void *device)
|
|||
ite->isr(ite->arg);
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_ETH_LITEETH
|
||||
if (irqs & (1 << ETH0_IRQ)) {
|
||||
ite = (struct _isr_table_entry *)&_sw_isr_table[ETH0_IRQ];
|
||||
ite->isr(ite->arg);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
void z_arch_irq_enable(unsigned int irq)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue