Skip to content

hw/arm: add ethernet support to Allwinner A10

Beniamino Galvani qemu-devel 5 versions – Applied

Status from this message: Applied to target-arm.next; thanks for your patience in getting this through

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v5 Latest4 patches 3 repliesApplied
  2. v43 patches 10 repliesSuperseded
  3. v32 patches 6 repliesSuperseded
Earlier versions · 2
VersionPostedPatchesRepliesStatus
v22 patches13 repliesSuperseded
v12 patches23 repliesSuperseded

Changelog from the cover letter

v5: Address comments from Peter Crosthwaite and Peter Maydell:
* Move reinitialization of fifo head to a new patch
* Remove fifo8_has_space() and add fifo8_num_free(),fifo8_num_used()
* Improve documentation of new fifo8 functions
* Add restriction on fifo8_pop_buf() 'max' argument as originally suggested by Peter C.: it must not be greater than the number of bytes in the fifo
* Change license of EMAC model to GPLv2
* Check if tx length register is greater than data in fifo

Patches in v5 Applied

#Subject and filesSizeRepliesApplied
1/4util/fifo8: implement push/pop of multiple bytesinclude/qemu/fifo8.h util/fifo8.c+107 -01 reply
2/4util/fifo8: clear fifo head upon resetutil/fifo8.c+1 -01 reply
3/4hw/net: add support for Allwinner EMAC Fast Ethernet controllerdefault-configs/arm-softmmu.mak hw/net/Makefile.objs hw/net/allwinner_emac.c +1 more+751 -00 replies
4/4hw/arm/allwinner-a10: initialize EMAChw/arm/allwinner-a10.c hw/arm/cubieboard.c include/hw/arm/allwinner-a10.h+28 -20 replies

Reviews trailers per patch

All 4 patches have a Reviewed-by or Acked-by.

PatchPeter CrosthwaitePeter Maydell
1/4R-b
2/4R-b
3/4R-b R-b
4/4R-b R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v5 thread

Cover letter [Qemu-devel] [PATCH v5 0/4] hw/arm: add ethernet support to Allwinner A10

This patch series adds support for the EMAC Fast Ethernet controller found on Allwinner SoCs to the Allwinner A10.

Changelog:
v5: Address comments from Peter Crosthwaite and Peter Maydell:
* Move reinitialization of fifo head to a new patch
* Remove fifo8_has_space() and add fifo8_num_free(),fifo8_num_used()
* Improve documentation of new fifo8 functions
* Add restriction on fifo8_pop_buf() 'max' argument as originally suggested by Peter C.: it must not be greater than the number of bytes in the fifo
* Change license of EMAC model to GPLv2
* Check if tx length register is greater than data in fifo

v4: Address comments from Peter Crosthwaite and Andreas Färber:
* Add functions for multiple bytes push/pop to Fifo8
* Get rid of custom fifo implementation and use generic one for both tx and rx
* Rename aw_emac_mdio_read -> RTL8201CP_mdio_read
* Allow reception of new packets from net layer only when there is space for a full size frame
* Change TYPE_AW_EMAC from "allwinner_emac" to "allwinner-emac"
* Property "phyaddr" -> "phy-addr"
* Remove trailing newlines from error_report() messages

v3: Address comments from Peter Crosthwaite and Stefan Hajnoczi:
* Use a single, big rx fifo instead of per-packet fifo
* Remove link_ok field from PHY state
* Call set_link() on post_load
* Add missing PHY registers
* Implement reset() method
* Rename AwEmacMii -> RTL8201CPState
* Rename mii_{read,write} -> aw_emac_mdio_{read,write}

v2: Address Peter Crosthwaite's comments:
* Make phy address customizable through a property
* Call qemu_flush_queued_packets() when rx becomes possible
* Always create EMAC instance in SoC
* Use uint8 arrays for fifos
* Minor cleanups

Beniamino Galvani (4):
util/fifo8: implement push/pop of multiple bytes util/fifo8: clear fifo head upon reset
hw/net: add support for Allwinner EMAC Fast Ethernet controller hw/arm/allwinner-a10: initialize EMAC

 default-configs/arm-softmmu.mak |    1 +
 hw/arm/allwinner-a10.c          |   16 ++
 hw/arm/cubieboard.c             |   11 +-
 hw/net/Makefile.objs            |    1 +
 hw/net/allwinner_emac.c         |  539 +++++++++++++++++++++++++++++++++++++++
 include/hw/arm/allwinner-a10.h  |    3 +
 include/hw/net/allwinner_emac.h |  210 +++++++++++++++
 include/qemu/fifo8.h            |   61 +++++
 util/fifo8.c                    |   47 ++++
 9 files changed, 887 insertions(+), 2 deletions(-)
 create mode 100644 hw/net/allwinner_emac.c
 create mode 100644 include/hw/net/allwinner_emac.h
Signature · 1 line
1.7.10.4