From: Florent Kermarrec Date: Fri, 12 Apr 2019 15:08:29 +0000 (+0200) Subject: software/libnet: remove use of ethmac_mem.h X-Git-Tag: 24jan2021_ls180~1338 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=1569e2e0cf70a5febe3d1c7875ebb9ceddcd2a4c;p=litex.git software/libnet: remove use of ethmac_mem.h --- diff --git a/litex/soc/software/include/hw/ethmac_mem.h b/litex/soc/software/include/hw/ethmac_mem.h deleted file mode 100644 index 03c7b96d..00000000 --- a/litex/soc/software/include/hw/ethmac_mem.h +++ /dev/null @@ -1,11 +0,0 @@ -#ifndef __HW_ETHMAC_MEM_H -#define __HW_ETHMAC_MEM_H - -#include - -#define ETHMAC_RX0_BASE ETHMAC_BASE -#define ETHMAC_RX1_BASE (ETHMAC_BASE+0x0800) -#define ETHMAC_TX0_BASE (ETHMAC_BASE+0x1000) -#define ETHMAC_TX1_BASE (ETHMAC_BASE+0x1800) - -#endif diff --git a/litex/soc/software/libnet/microudp.c b/litex/soc/software/libnet/microudp.c index 1850a274..90b73a7e 100644 --- a/litex/soc/software/libnet/microudp.c +++ b/litex/soc/software/libnet/microudp.c @@ -1,4 +1,6 @@ #include +#include + #ifdef CSR_ETHMAC_BASE #include @@ -6,7 +8,6 @@ #include #include #include -#include #include @@ -415,10 +416,10 @@ void microudp_start(const unsigned char *macaddr, unsigned int ip) ethmac_sram_reader_ev_pending_write(ETHMAC_EV_SRAM_READER); ethmac_sram_writer_ev_pending_write(ETHMAC_EV_SRAM_WRITER); - rxbuffer0 = (ethernet_buffer *)ETHMAC_RX0_BASE; - rxbuffer1 = (ethernet_buffer *)ETHMAC_RX1_BASE; - txbuffer0 = (ethernet_buffer *)ETHMAC_TX0_BASE; - txbuffer1 = (ethernet_buffer *)ETHMAC_TX1_BASE; + rxbuffer0 = (ethernet_buffer *)(ETHMAC_BASE + 0*ETHMAC_SLOT_SIZE); + rxbuffer1 = (ethernet_buffer *)(ETHMAC_BASE + 1*ETHMAC_SLOT_SIZE); + txbuffer0 = (ethernet_buffer *)(ETHMAC_BASE + 2*ETHMAC_SLOT_SIZE); + txbuffer1 = (ethernet_buffer *)(ETHMAC_BASE + 3*ETHMAC_SLOT_SIZE); rxslot = 0; txslot = 0;