+++ /dev/null
-#ifndef __HW_ETHMAC_MEM_H
-#define __HW_ETHMAC_MEM_H
-
-#include <generated/mem.h>
-
-#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
#include <generated/csr.h>
+#include <generated/mem.h>
+
#ifdef CSR_ETHMAC_BASE
#include <stdio.h>
#include <system.h>
#include <crc.h>
#include <hw/flags.h>
-#include <hw/ethmac_mem.h>
#include <net/microudp.h>
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;