summaryrefslogtreecommitdiffstats
path: root/hw/arm/orangepi.c
diff options
context:
space:
mode:
authorNiek Linnenbank2020-03-11 23:18:45 +0100
committerPeter Maydell2020-03-12 17:27:33 +0100
commit29d08975d1cc2ec668d9eb430c507a4fee515ea5 (patch)
treed0328fd17f7acd8abbdea593a9a0083a3b690924 /hw/arm/orangepi.c
parenthw/arm/allwinner: add SD/MMC host controller (diff)
downloadqemu-29d08975d1cc2ec668d9eb430c507a4fee515ea5.tar.gz
qemu-29d08975d1cc2ec668d9eb430c507a4fee515ea5.tar.xz
qemu-29d08975d1cc2ec668d9eb430c507a4fee515ea5.zip
hw/arm/allwinner-h3: add EMAC ethernet device
The Allwinner Sun8i System on Chip family includes an Ethernet MAC (EMAC) which provides 10M/100M/1000M Ethernet connectivity. This commit adds support for the Allwinner EMAC from the Sun8i family (H2+, H3, A33, etc), including emulation for the following functionality: * DMA transfers * MII interface * Transmit CRC calculation Signed-off-by: Niek Linnenbank <nieklinnenbank@gmail.com> Reviewed-by: Alex Bennée <alex.bennee@linaro.org> Message-id: 20200311221854.30370-10-nieklinnenbank@gmail.com Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'hw/arm/orangepi.c')
-rw-r--r--hw/arm/orangepi.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/hw/arm/orangepi.c b/hw/arm/orangepi.c
index e7ac7b1d14..d65bbf8a2f 100644
--- a/hw/arm/orangepi.c
+++ b/hw/arm/orangepi.c
@@ -77,6 +77,9 @@ static void orangepi_init(MachineState *machine)
warn_report("Security Identifier value does not include H3 prefix");
}
+ /* Setup EMAC properties */
+ object_property_set_int(OBJECT(&h3->emac), 1, "phy-addr", &error_abort);
+
/* Mark H3 object realized */
object_property_set_bool(OBJECT(h3), true, "realized", &error_abort);