Add ability to choose MDIO phy number to i.MX processors
cover Add ability to choose MDIO phy number to i.MX processors
This patch set adds the ability to select the Ethernet PHY device number for the i.MX25 processor, the i.MX6 processor and the i.MX7 processor.
Note: the i.MX6UL processor was addressed in a previous patch.
Jean-Christophe Dubois (3):
Add the ability to change the FEC PHY MDIO device number on i.MX25
processor
Add the ability to change the FEC PHY MDIO device number on i.MX6
processor
Add the ability to change the FEC PHY MDIO devices numbers on i.MX7
processor
hw/arm/fsl-imx25.c | 7 +++++++ hw/arm/fsl-imx6.c | 7 +++++++ hw/arm/fsl-imx7.c | 9 +++++++++ include/hw/arm/fsl-imx25.h | 1 + include/hw/arm/fsl-imx6.h | 1 + include/hw/arm/fsl-imx7.h | 1 + 6 files changed, 26 insertions(+)
Signature · 1 line
2.25.1
PATCH 1/3 Add the ability to change the FEC PHY MDIO device number on i.MX25 processor
--- hw/arm/fsl-imx25.c | 7 +++++++ include/hw/arm/fsl-imx25.h | 1 + 2 files changed, 8 insertions(+)
hw/arm/fsl-imx25.c +7 -0
@@ -183,6 +183,7 @@ static void fsl_imx25_realize(DeviceState *dev, Error **errp) epit_table[i].irq)); } +object_property_set_uint (OBJECT (&s->fec), s->phy_num,"phy-num" , &err);qdev_set_nic_properties (DEVICE (&s->fec), &nd_table[0 ]);sysbus_realize (SYS_BUS_DEVICE (&s->fec), &err);
@@ -339,10 +340,16 @@ static void fsl_imx25_realize(DeviceState *dev, Error **errp) &s->iram_alias); } +static Property fsl_imx25_properties[] = { +DEFINE_PROP_UINT32 ("fec-phy-num" , FslIMX25State, phy_num,0 ), +DEFINE_PROP_END_OF_LIST (), +}; +static void fsl_imx25_class_init (ObjectClass *oc,void *data) {DeviceClass *dc =DEVICE_CLASS (oc); +device_class_set_props (dc, fsl_imx25_properties); dc->realize = fsl_imx25_realize; dc->desc ="i.MX25 SOC" ;/*
include/hw/arm/fsl-imx25.h +1 -0
@@ -65,6 +65,7 @@ typedef struct FslIMX25State {MemoryRegion rom[2 ];MemoryRegion iram;MemoryRegion iram_alias; +uint32_t phy_num; } FslIMX25State;/**
Signature · 1 line
2.25.1
PATCH 2/3 Add the ability to change the FEC PHY MDIO device number on i.MX6 processor
In reply to Jean-Christophe Dubois--- hw/arm/fsl-imx6.c | 7 +++++++ include/hw/arm/fsl-imx6.h | 1 + 2 files changed, 8 insertions(+)
hw/arm/fsl-imx6.c +7 -0
@@ -402,6 +402,7 @@ static void fsl_imx6_realize(DeviceState *dev, Error **errp) spi_table[i].irq)); } +object_property_set_uint (OBJECT (&s->eth), s->phy_num,"phy-num" , &err);qdev_set_nic_properties (DEVICE (&s->eth), &nd_table[0 ]);sysbus_realize (SYS_BUS_DEVICE (&s->eth), &err);if (err) {
@@ -476,10 +477,16 @@ static void fsl_imx6_realize(DeviceState *dev, Error **errp) &s->ocram_alias); } +static Property fsl_imx6_properties[] = { +DEFINE_PROP_UINT32 ("fec-phy-num" , FslIMX6State, phy_num,0 ), +DEFINE_PROP_END_OF_LIST (), +}; +static void fsl_imx6_class_init (ObjectClass *oc,void *data) {DeviceClass *dc =DEVICE_CLASS (oc); +device_class_set_props (dc, fsl_imx6_properties); dc->realize = fsl_imx6_realize; dc->desc ="i.MX6 SOC" ;/* Reason: Uses serial_hd() in the realize() function */
include/hw/arm/fsl-imx6.h +1 -0
@@ -73,6 +73,7 @@ typedef struct FslIMX6State {MemoryRegion caam;MemoryRegion ocram;MemoryRegion ocram_alias; +uint32_t phy_num; } FslIMX6State;
Signature · 1 line
2.25.1
PATCH 3/3 Add the ability to change the FEC PHY MDIO devices numbers on i.MX7 processor
In reply to Jean-Christophe Dubois--- hw/arm/fsl-imx7.c | 9 +++++++++ include/hw/arm/fsl-imx7.h | 1 + 2 files changed, 10 insertions(+)
hw/arm/fsl-imx7.c +9 -0
@@ -364,6 +364,8 @@ static void fsl_imx7_realize(DeviceState *dev, Error **errp)FSL_IMX7_ENET2_ADDR , }; +object_property_set_uint (OBJECT (&s->eth[i]), s->phy_num[i], +"phy-num" , &error_abort);object_property_set_uint (OBJECT (&s->eth[i]),FSL_IMX7_ETH_NUM_TX_RINGS ,"tx-ring-num" , &error_abort);qdev_set_nic_properties (DEVICE (&s->eth[i]), &nd_table[i]);
@@ -551,10 +553,17 @@ static void fsl_imx7_realize(DeviceState *dev, Error **errp) FSL_IMX7_PCIE_PHY_SIZE); } +static Property fsl_imx7_properties[] = { +DEFINE_PROP_UINT32 ("fec1-phy-num" , FslIMX7State, phy_num[0 ],0 ), +DEFINE_PROP_UINT32 ("fec2-phy-num" , FslIMX7State, phy_num[1 ],1 ), +DEFINE_PROP_END_OF_LIST (), +}; +static void fsl_imx7_class_init (ObjectClass *oc,void *data) {DeviceClass *dc =DEVICE_CLASS (oc); +device_class_set_props (dc, fsl_imx7_properties); dc->realize = fsl_imx7_realize;/* Reason: Uses serial_hds and nd_table in realize() directly */
include/hw/arm/fsl-imx7.h +1 -0
@@ -81,6 +81,7 @@ typedef struct FslIMX7State {IMX7GPRState gpr;ChipideaState usb[FSL_IMX7_NUM_USBS ];DesignwarePCIEHost pcie; +uint32_t phy_num[FSL_IMX7_NUM_ETHS ]; } FslIMX7State;enum FslIMX7MemoryMap {
Signature · 1 line
2.25.1
Patchew URL: https://patchew.org/QEMU/[email protected]/
Patchew URL: https://patchew.org/QEMU/[email protected]/
Hi,
This series failed the docker-quick@centos7 build test. Please find the testing commands and their output below. If you have Docker installed, you can probably reproduce it locally.
=== TEST SCRIPT BEGIN ===
#!/bin/bash
make docker-image-centos7 V=1 NETWORK=1
time make docker-test-quick@centos7 SHOW_ENV=1 J=14 NETWORK=1 === TEST SCRIPT END ===
qemu-system-aarch64: Property '.phy-num' not found
Broken pipe/tmp/qemu-test/src/tests/qtest/libqtest.c:175: kill_qemu() detected QEMU death from signal 6 (Aborted) (core dumped)
ERROR - too few tests run (expected 66, got 0)
make: *** [check-qtest-aarch64] Error 1
make: *** Waiting for unfinished jobs....
TEST iotest-qcow2: 154
Could not access KVM kernel module: No such file or directory
---
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['sudo', '-n', 'docker', 'run', '--label', 'com.qemu.instance.uuid=4a2335c3dedc4400bae7b327958dfa5a', '-u', '1001', '--security-opt', 'seccomp=unconfined', '--rm', '-e', 'TARGET_LIST=', '-e', 'EXTRA_CONFIGURE_OPTS=', '-e', 'V=', '-e', 'J=14', '-e', 'DEBUG=', '-e', 'SHOW_ENV=1', '-e', 'CCACHE_DIR=/var/tmp/ccache', '-v', '/home/patchew/.cache/qemu-docker-ccache:/var/tmp/ccache:z', '-v', '/var/tmp/patchew-tester-tmp-9e58kfzn/src/docker-src.2020-07-03-16.29.20.28169:/var/tmp/qemu:z,ro', 'qemu:centos7', '/var/tmp/qemu/run', 'test-quick']' returned non-zero exit status 2. filter=--filter=label=com.qemu.instance.uuid=4a2335c3dedc4400bae7b327958dfa5a
make[1]: *** [docker-run] Error 1
make[1]: Leaving directory `/var/tmp/patchew-tester-tmp-9e58kfzn/src'
make: *** [docker-run-test-quick@centos7] Error 2
real 14m58.666s
user 0m9.169s
The full log is available at
http://patchew.org/logs/[email protected]/testing.docker-quick@centos7/?type=message.
---
Email generated automatically by Patchew [https://patchew.org/].
Please send your feedback to [email protected]
This patch set is to be applied on top of the patch serie recently accepted by Peter on his tree.
I guess I will have to wait a bit that his pull request is accepted in mainline before resubmitting my patch.
JC
Le 03/07/2020 à 22:44, [email protected] a écrit :
Quoted 41 lines
Patchew URL: https://patchew.org/QEMU/[email protected]/
Hi,
This series failed the docker-quick@centos7 build test. Please find the testing commands and their output below. If you have Docker installed, you can probably reproduce it locally.
=== TEST SCRIPT BEGIN ===
#!/bin/bash
make docker-image-centos7 V=1 NETWORK=1
time make docker-test-quick@centos7 SHOW_ENV=1 J=14 NETWORK=1 === TEST SCRIPT END ===qemu-system-aarch64: Property '.phy-num' not found
Broken pipe/tmp/qemu-test/src/tests/qtest/libqtest.c:175:kill_qemu()detected QEMU death from signal 6 (Aborted) (core dumped)
ERROR - too few tests run (expected 66, got 0)
make: *** [check-qtest-aarch64] Error 1
make: *** Waiting for unfinished jobs....
TEST iotest-qcow2: 154
Could not access KVM kernel module: No such file or directory
---
raiseCalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['sudo', '-n', 'docker', 'run', '--label', 'com.qemu.instance.uuid=4a2335c3dedc4400bae7b327958dfa5a', '-u', '1001', '--security-opt', 'seccomp=unconfined', '--rm', '-e', 'TARGET_LIST=', '-e', 'EXTRA_CONFIGURE_OPTS=', '-e', 'V=', '-e', 'J=14', '-e', 'DEBUG=', '-e', 'SHOW_ENV=1', '-e', 'CCACHE_DIR=/var/tmp/ccache', '-v', '/home/patchew/.cache/qemu-docker-ccache:/var/tmp/ccache:z', '-v', '/var/tmp/patchew-tester-tmp-9e58kfzn/src/docker-src.2020-07-03-16.29.20.28169:/var/tmp/qemu:z,ro', 'qemu:centos7', '/var/tmp/qemu/run', 'test-quick']' returned non-zero exit status 2. filter=--filter=label=com.qemu.instance.uuid=4a2335c3dedc4400bae7b327958dfa5a
make[1]: *** [docker-run] Error 1
make[1]: Leaving directory `/var/tmp/patchew-tester-tmp-9e58kfzn/src'
make: *** [docker-run-test-quick@centos7] Error 2real 14m58.666s
user 0m9.169sThe full log is available at
http://patchew.org/logs/[email protected]/testing.docker-quick@centos7/?type=message.
---
Email generated automatically by Patchew [https://patchew.org/].
Please send your feedback to [email protected]
Peter Maydell
AppliedQuoted 6 lines · Jean-Christophe Dubois
This patch set adds the ability to select the Ethernet PHY device number for the i.MX25 processor, the i.MX6 processor and the i.MX7 processor.
Note: the i.MX6UL processor was addressed in a previous patch.
Quoted 7 lines
Jean-Christophe Dubois (3):
Add the ability to change the FEC PHY MDIO device number on i.MX25
processor
Add the ability to change the FEC PHY MDIO device number on i.MX6
processor
Add the ability to change the FEC PHY MDIO devices numbers on i.MX7
processor
Applied to target-arm.next, thanks.
-- PMM