qemu with hax to log dma reads & writes jcs.org/2018/11/12/vfio

Add the ability to select a different PHY for each i.MX6UL FEC interface

Add properties to the i.MX6UL processor to be able to select a
particular PHY on the MDIO bus for each FEC device.

Signed-off-by: Jean-Christophe Dubois <jcd@tribudubois.net>
Message-id: ea1d604198b6b73ea6521676e45bacfc597aba53.1593296112.git.jcd@tribudubois.net
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>

authored by

Jean-Christophe Dubois and committed by
Peter Maydell
456914af 461c51ad

+12
+10
hw/arm/fsl-imx6ul.c
··· 428 428 }; 429 429 430 430 object_property_set_uint(OBJECT(&s->eth[i]), 431 + s->phy_num[i], 432 + "phy-num", &error_abort); 433 + object_property_set_uint(OBJECT(&s->eth[i]), 431 434 FSL_IMX6UL_ETH_NUM_TX_RINGS, 432 435 "tx-ring-num", &error_abort); 433 436 qdev_set_nic_properties(DEVICE(&s->eth[i]), &nd_table[i]); ··· 607 610 FSL_IMX6UL_OCRAM_ALIAS_ADDR, &s->ocram_alias); 608 611 } 609 612 613 + static Property fsl_imx6ul_properties[] = { 614 + DEFINE_PROP_UINT32("fec1-phy-num", FslIMX6ULState, phy_num[0], 0), 615 + DEFINE_PROP_UINT32("fec2-phy-num", FslIMX6ULState, phy_num[1], 1), 616 + DEFINE_PROP_END_OF_LIST(), 617 + }; 618 + 610 619 static void fsl_imx6ul_class_init(ObjectClass *oc, void *data) 611 620 { 612 621 DeviceClass *dc = DEVICE_CLASS(oc); 613 622 623 + device_class_set_props(dc, fsl_imx6ul_properties); 614 624 dc->realize = fsl_imx6ul_realize; 615 625 dc->desc = "i.MX6UL SOC"; 616 626 /* Reason: Uses serial_hds and nd_table in realize() directly */
+2
include/hw/arm/fsl-imx6ul.h
··· 87 87 MemoryRegion caam; 88 88 MemoryRegion ocram; 89 89 MemoryRegion ocram_alias; 90 + 91 + uint32_t phy_num[FSL_IMX6UL_NUM_ETHS]; 90 92 } FslIMX6ULState; 91 93 92 94 enum FslIMX6ULMemoryMap {