Skip to contentSkip to conversation

target-xtensa: add Avnet lx60/lx110/lx200 board and OpenCores Ethernet MAC

PATCH Applied Max Filippov 2 participants 4 messages Oct 15, 2011 – Oct 16, 2011 Kbuild

lore
Share & tools
lore
#0 lore raw

v2 cover target-xtensa: add Avnet lx60/lx110/lx200 board and OpenCores Ethernet MAC

Please apply it after 'target-xtensa: add overlay parsing header' series.

Max Filippov (2):
hw: add OpenCores 10/100 Mbps Ethernet controller
target-xtensa: add Avnet LX60/LX110/LX200 boards

 Makefile.objs                        |    1 +
 Makefile.target                      |    1 +
 default-configs/xtensa-softmmu.mak   |    3 +
 default-configs/xtensaeb-softmmu.mak |    3 +
 hw/opencores_eth.c                   |  728 ++++++++++++++++++++++++++++++++++
 hw/xtensa_lx60.c                     |  233 +++++++++++
 trace-events                         |   14 +
 7 files changed, 983 insertions(+), 0 deletions(-)
 create mode 100644 hw/opencores_eth.c
 create mode 100644 hw/xtensa_lx60.c
Signature · 1 line
1.7.6.4
#1 lore raw

PATCH v2 1/2 hw: add OpenCores 10/100 Mbps Ethernet controller

This is OpenCores Ethernet MAC + subset of National Semiconductors DP83838C PHY.
OpenCores Ethernet MAC project: http://opencores.org/project,ethmac

---
 Makefile.objs      |    1 +
 hw/opencores_eth.c |  728 ++++++++++++++++++++++++++++++++++++++++++++++++++++
 trace-events       |   14 +
 3 files changed, 743 insertions(+), 0 deletions(-)
 create mode 100644 hw/opencores_eth.c
Makefile.objs +1 -0
index 6424efd..b839c8e 100644
@@ -258,6 +258,7 @@ hw-obj-$(CONFIG_RTL8139_PCI) += rtl8139.o
 hw-obj-$(CONFIG_SMC91C111) += smc91c111.o
 hw-obj-$(CONFIG_LAN9118) += lan9118.o
 hw-obj-$(CONFIG_NE2000_ISA) += ne2000-isa.o
+hw-obj-$(CONFIG_OPENCORES_ETH) += opencores_eth.o
 
 # IDE
 hw-obj-$(CONFIG_IDE_CORE) += ide/core.o ide/atapi.o
hw/opencores_eth.c new file +728 -0

728 lines not on this page · raw message

trace-events +14 -0
index 63d8c8e..a06c6c5 100644
@@ -538,3 +538,17 @@ esp_mem_writeb_cmd_ensel(uint32_t val) "Enable selection (%2.2x)"
 # monitor.c
 handle_qmp_command(void *mon, const char *cmd_name) "mon %p cmd_name \"%s\""
 monitor_protocol_emitter(void *mon) "mon %p"
+
+# hw/opencores_eth.c
+open_eth_mii_write(unsigned idx, uint16_t v) "MII[%02x] <- %04x"
+open_eth_mii_read(unsigned idx, uint16_t v) "MII[%02x] -> %04x"
+open_eth_update_irq(uint32_t v) "IRQ <- %x"
+open_eth_receive(unsigned len) "RX: len: %u"
+open_eth_receive_mcast(unsigned idx, uint32_t h0, uint32_t h1) "MCAST: idx = %u, hash: %08x:%08x"
+open_eth_receive_reject(void) "RX: rejected"
+open_eth_receive_desc(uint32_t addr, uint32_t len_flags) "RX: %08x, len_flags: %08x"
+open_eth_start_xmit(uint32_t addr, unsigned len, unsigned tx_len) "TX: %08x, len: %u, tx_len: %u"
+open_eth_reg_read(uint32_t addr, uint32_t v) "MAC[%02x] -> %08x"
+open_eth_reg_write(uint32_t addr, uint32_t v) "MAC[%02x] <- %08x"
+open_eth_desc_read(uint32_t addr, uint32_t v) "DESC[%04x] -> %08x"
+open_eth_desc_write(uint32_t addr, uint32_t v) "DESC[%04x] <- %08x"
Signature · 1 line
1.7.6.4
#2 lore raw

PATCH v2 2/2 target-xtensa: add Avnet LX60/LX110/LX200 boards

In reply to Max Filippov

These boards carry similar hardware: SDRAM (48M for LX110, 64M for LX60, 96M for LX200), 16 Mbyte FLASH, FPGA, 10/100 Mbps Ethernet PHY and 16550 UART. FPGA may be loaded with almost any Tensilica processor. It is also used to implement Ethernet MAC, e.g. OpenCores 10/100 Mbps Ethernet MAC and LED/DIP switches access.

---
v1 -> v2 changes: adopt serial_mm_init converted to new memory API

---
 Makefile.target                      |    1 +
 default-configs/xtensa-softmmu.mak   |    3 +
 default-configs/xtensaeb-softmmu.mak |    3 +
 hw/xtensa_lx60.c                     |  233 ++++++++++++++++++++++++++++++++++
 4 files changed, 240 insertions(+), 0 deletions(-)
 create mode 100644 hw/xtensa_lx60.c
Makefile.target +1 -0
index 752221c..3d94228 100644
@@ -371,6 +371,7 @@ obj-alpha-y += alpha_pci.o alpha_dp264.o alpha_typhoon.o
 
 obj-xtensa-y += xtensa_pic.o
 obj-xtensa-y += xtensa_sim.o
+obj-xtensa-y += xtensa_lx60.o
 obj-xtensa-y += xtensa-semi.o
 obj-xtensa-y += core-dc232b.o
 obj-xtensa-y += core-fsf.o
default-configs/xtensa-softmmu.mak +3 -0
index e5faa09..7f0df34 100644
@@ -1 +1,4 @@
 # Default configuration for Xtensa
+
+CONFIG_SERIAL=y
+CONFIG_OPENCORES_ETH=y
default-configs/xtensaeb-softmmu.mak +3 -0
index e5faa09..7f0df34 100644
@@ -1 +1,4 @@
 # Default configuration for Xtensa
+
+CONFIG_SERIAL=y
+CONFIG_OPENCORES_ETH=y
hw/xtensa_lx60.c new file +233 -0

233 lines not on this page · raw message

Signature · 1 line
1.7.6.4
Applied
#3 lore raw
In reply to Max Filippov

Thanks, applied both.

Quoted 22 lines · Max Filippov

Please apply it after 'target-xtensa: add overlay parsing header' series.

Max Filippov (2):
 hw: add OpenCores 10/100 Mbps Ethernet controller
 target-xtensa: add Avnet LX60/LX110/LX200 boards

 Makefile.objs                        |    1 +
 Makefile.target                      |    1 + default-configs/xtensa-softmmu.mak   |    3 + default-configs/xtensaeb-softmmu.mak |    3 +
 hw/opencores_eth.c                   |  728 ++++++++++++++++++++++++++++++++++ hw/xtensa_lx60.c                     |  233 +++++++++++ trace-events                         |   14 +

 7 files changed, 983 insertions(+), 0 deletions(-)

 create mode 100644 hw/opencores_eth.c
 create mode 100644 hw/xtensa_lx60.c

--
1.7.6.4