All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/3] Add ability to choose MDIO phy number to i.MX processors
@ 2020-07-04 19:12 ` Jean-Christophe Dubois
  0 siblings, 0 replies; 11+ messages in thread
From: Jean-Christophe Dubois @ 2020-07-03 20:15 UTC (permalink / raw)
  To: qemu-devel, peter.maydell, peter.chubb, f4bug; +Cc: 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.

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(+)

-- 
2.25.1



^ permalink raw reply	[flat|nested] 11+ messages in thread

* [PATCH 1/3] Add the ability to change the FEC PHY MDIO device number on i.MX25 processor
@ 2020-07-04 19:12   ` Jean-Christophe Dubois
  0 siblings, 0 replies; 11+ messages in thread
From: Jean-Christophe Dubois @ 2020-07-03 20:15 UTC (permalink / raw)
  To: qemu-devel, peter.maydell, peter.chubb, f4bug; +Cc: Jean-Christophe Dubois

Signed-off-by: Jean-Christophe Dubois <jcd@tribudubois.net>
---
 hw/arm/fsl-imx25.c         | 7 +++++++
 include/hw/arm/fsl-imx25.h | 1 +
 2 files changed, 8 insertions(+)

diff --git a/hw/arm/fsl-imx25.c b/hw/arm/fsl-imx25.c
index 7ab5c98fbe1..35874aac00b 100644
--- a/hw/arm/fsl-imx25.c
+++ b/hw/arm/fsl-imx25.c
@@ -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";
     /*
diff --git a/include/hw/arm/fsl-imx25.h b/include/hw/arm/fsl-imx25.h
index 9e228daceae..54ee1bfd780 100644
--- a/include/hw/arm/fsl-imx25.h
+++ b/include/hw/arm/fsl-imx25.h
@@ -65,6 +65,7 @@ typedef struct FslIMX25State {
     MemoryRegion   rom[2];
     MemoryRegion   iram;
     MemoryRegion   iram_alias;
+    uint32_t       phy_num;
 } FslIMX25State;
 
 /**
-- 
2.25.1



^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [PATCH 2/3] Add the ability to change the FEC PHY MDIO device number on i.MX6 processor
@ 2020-07-04 19:12   ` Jean-Christophe Dubois
  0 siblings, 0 replies; 11+ messages in thread
From: Jean-Christophe Dubois @ 2020-07-03 20:15 UTC (permalink / raw)
  To: qemu-devel, peter.maydell, peter.chubb, f4bug; +Cc: Jean-Christophe Dubois

Signed-off-by: Jean-Christophe Dubois <jcd@tribudubois.net>
---
 hw/arm/fsl-imx6.c         | 7 +++++++
 include/hw/arm/fsl-imx6.h | 1 +
 2 files changed, 8 insertions(+)

diff --git a/hw/arm/fsl-imx6.c b/hw/arm/fsl-imx6.c
index 4ae3c3efc28..0721f333497 100644
--- a/hw/arm/fsl-imx6.c
+++ b/hw/arm/fsl-imx6.c
@@ -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 */
diff --git a/include/hw/arm/fsl-imx6.h b/include/hw/arm/fsl-imx6.h
index 1ebd7513246..162fe99375d 100644
--- a/include/hw/arm/fsl-imx6.h
+++ b/include/hw/arm/fsl-imx6.h
@@ -73,6 +73,7 @@ typedef struct FslIMX6State {
     MemoryRegion   caam;
     MemoryRegion   ocram;
     MemoryRegion   ocram_alias;
+    uint32_t       phy_num;
 } FslIMX6State;
 
 
-- 
2.25.1



^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [PATCH 3/3] Add the ability to change the FEC PHY MDIO devices numbers on i.MX7 processor
@ 2020-07-04 19:12   ` Jean-Christophe Dubois
  0 siblings, 0 replies; 11+ messages in thread
From: Jean-Christophe Dubois @ 2020-07-03 20:15 UTC (permalink / raw)
  To: qemu-devel, peter.maydell, peter.chubb, f4bug; +Cc: Jean-Christophe Dubois

Signed-off-by: Jean-Christophe Dubois <jcd@tribudubois.net>
---
 hw/arm/fsl-imx7.c         | 9 +++++++++
 include/hw/arm/fsl-imx7.h | 1 +
 2 files changed, 10 insertions(+)

diff --git a/hw/arm/fsl-imx7.c b/hw/arm/fsl-imx7.c
index b49d895a412..5dbf0e500aa 100644
--- a/hw/arm/fsl-imx7.c
+++ b/hw/arm/fsl-imx7.c
@@ -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 */
diff --git a/include/hw/arm/fsl-imx7.h b/include/hw/arm/fsl-imx7.h
index da977f9ffb4..ad889237077 100644
--- a/include/hw/arm/fsl-imx7.h
+++ b/include/hw/arm/fsl-imx7.h
@@ -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 {
-- 
2.25.1



^ permalink raw reply related	[flat|nested] 11+ messages in thread

* Re: [PATCH 0/3] Add ability to choose MDIO phy number to i.MX processors
  2020-07-04 19:12 ` [PATCH v2 " Jean-Christophe Dubois
                   ` (3 preceding siblings ...)
  (?)
@ 2020-07-03 20:44 ` no-reply
  2020-07-04  7:07   ` Jean-Christophe DUBOIS
  -1 siblings, 1 reply; 11+ messages in thread
From: no-reply @ 2020-07-03 20:44 UTC (permalink / raw)
  To: jcd; +Cc: peter.maydell, jcd, peter.chubb, qemu-devel, f4bug

Patchew URL: https://patchew.org/QEMU/cover.1593806826.git.jcd@tribudubois.net/



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/cover.1593806826.git.jcd@tribudubois.net/testing.docker-quick@centos7/?type=message.
---
Email generated automatically by Patchew [https://patchew.org/].
Please send your feedback to patchew-devel@redhat.com

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH 0/3] Add ability to choose MDIO phy number to i.MX processors
  2020-07-03 20:44 ` [PATCH 0/3] Add ability to choose MDIO phy number to i.MX processors no-reply
@ 2020-07-04  7:07   ` Jean-Christophe DUBOIS
  0 siblings, 0 replies; 11+ messages in thread
From: Jean-Christophe DUBOIS @ 2020-07-04  7:07 UTC (permalink / raw)
  To: qemu-devel; +Cc: peter.maydell, peter.chubb, f4bug

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, no-reply@patchew.org a écrit :
> Patchew URL: https://patchew.org/QEMU/cover.1593806826.git.jcd@tribudubois.net/
>
>
>
> 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/cover.1593806826.git.jcd@tribudubois.net/testing.docker-quick@centos7/?type=message.
> ---
> Email generated automatically by Patchew [https://patchew.org/].
> Please send your feedback to patchew-devel@redhat.com




^ permalink raw reply	[flat|nested] 11+ messages in thread

* [PATCH v2 0/3] Add ability to choose MDIO phy number to i.MX processors
@ 2020-07-04 19:12 ` Jean-Christophe Dubois
  0 siblings, 0 replies; 11+ messages in thread
From: Jean-Christophe Dubois @ 2020-07-04 19:12 UTC (permalink / raw)
  To: qemu-devel, peter.maydell, peter.chubb, f4bug; +Cc: 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.

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(+)

 v2: same patch after pull request from peter is validated.

-- 
2.25.1



^ permalink raw reply	[flat|nested] 11+ messages in thread

* [PATCH v2 1/3] Add the ability to change the FEC PHY MDIO device number on i.MX25 processor
@ 2020-07-04 19:12   ` Jean-Christophe Dubois
  0 siblings, 0 replies; 11+ messages in thread
From: Jean-Christophe Dubois @ 2020-07-04 19:12 UTC (permalink / raw)
  To: qemu-devel, peter.maydell, peter.chubb, f4bug; +Cc: Jean-Christophe Dubois

Signed-off-by: Jean-Christophe Dubois <jcd@tribudubois.net>
---

 v2: same patch after pull request from peter is validated.

 hw/arm/fsl-imx25.c         | 7 +++++++
 include/hw/arm/fsl-imx25.h | 1 +
 2 files changed, 8 insertions(+)

diff --git a/hw/arm/fsl-imx25.c b/hw/arm/fsl-imx25.c
index 7ab5c98fbe1..35874aac00b 100644
--- a/hw/arm/fsl-imx25.c
+++ b/hw/arm/fsl-imx25.c
@@ -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";
     /*
diff --git a/include/hw/arm/fsl-imx25.h b/include/hw/arm/fsl-imx25.h
index 9e228daceae..54ee1bfd780 100644
--- a/include/hw/arm/fsl-imx25.h
+++ b/include/hw/arm/fsl-imx25.h
@@ -65,6 +65,7 @@ typedef struct FslIMX25State {
     MemoryRegion   rom[2];
     MemoryRegion   iram;
     MemoryRegion   iram_alias;
+    uint32_t       phy_num;
 } FslIMX25State;
 
 /**
-- 
2.25.1



^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [PATCH v2 2/3] Add the ability to change the FEC PHY MDIO device number on i.MX6 processor
@ 2020-07-04 19:12   ` Jean-Christophe Dubois
  0 siblings, 0 replies; 11+ messages in thread
From: Jean-Christophe Dubois @ 2020-07-04 19:12 UTC (permalink / raw)
  To: qemu-devel, peter.maydell, peter.chubb, f4bug; +Cc: Jean-Christophe Dubois

Signed-off-by: Jean-Christophe Dubois <jcd@tribudubois.net>
---

 v2: same patch after pull request from peter is validated.

 hw/arm/fsl-imx6.c         | 7 +++++++
 include/hw/arm/fsl-imx6.h | 1 +
 2 files changed, 8 insertions(+)

diff --git a/hw/arm/fsl-imx6.c b/hw/arm/fsl-imx6.c
index 4ae3c3efc28..0721f333497 100644
--- a/hw/arm/fsl-imx6.c
+++ b/hw/arm/fsl-imx6.c
@@ -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 */
diff --git a/include/hw/arm/fsl-imx6.h b/include/hw/arm/fsl-imx6.h
index 1ebd7513246..162fe99375d 100644
--- a/include/hw/arm/fsl-imx6.h
+++ b/include/hw/arm/fsl-imx6.h
@@ -73,6 +73,7 @@ typedef struct FslIMX6State {
     MemoryRegion   caam;
     MemoryRegion   ocram;
     MemoryRegion   ocram_alias;
+    uint32_t       phy_num;
 } FslIMX6State;
 
 
-- 
2.25.1



^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [PATCH v2 3/3] Add the ability to change the FEC PHY MDIO devices numbers on i.MX7 processor
@ 2020-07-04 19:12   ` Jean-Christophe Dubois
  0 siblings, 0 replies; 11+ messages in thread
From: Jean-Christophe Dubois @ 2020-07-04 19:12 UTC (permalink / raw)
  To: qemu-devel, peter.maydell, peter.chubb, f4bug; +Cc: Jean-Christophe Dubois

Signed-off-by: Jean-Christophe Dubois <jcd@tribudubois.net>
---

 v2: same patch after pull request from peter is validated.

 hw/arm/fsl-imx7.c         | 9 +++++++++
 include/hw/arm/fsl-imx7.h | 1 +
 2 files changed, 10 insertions(+)

diff --git a/hw/arm/fsl-imx7.c b/hw/arm/fsl-imx7.c
index b49d895a412..5dbf0e500aa 100644
--- a/hw/arm/fsl-imx7.c
+++ b/hw/arm/fsl-imx7.c
@@ -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 */
diff --git a/include/hw/arm/fsl-imx7.h b/include/hw/arm/fsl-imx7.h
index da977f9ffb4..ad889237077 100644
--- a/include/hw/arm/fsl-imx7.h
+++ b/include/hw/arm/fsl-imx7.h
@@ -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 {
-- 
2.25.1



^ permalink raw reply related	[flat|nested] 11+ messages in thread

* Re: [PATCH v2 0/3] Add ability to choose MDIO phy number to i.MX processors
  2020-07-04 19:12 ` [PATCH v2 " Jean-Christophe Dubois
                   ` (4 preceding siblings ...)
  (?)
@ 2020-07-09 13:18 ` Peter Maydell
  -1 siblings, 0 replies; 11+ messages in thread
From: Peter Maydell @ 2020-07-09 13:18 UTC (permalink / raw)
  To: Jean-Christophe Dubois
  Cc: Peter Chubb, QEMU Developers, Philippe Mathieu-Daudé

On Sat, 4 Jul 2020 at 20:12, Jean-Christophe Dubois <jcd@tribudubois.net> wrote:
>
> 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



Applied to target-arm.next, thanks.

-- PMM


^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2020-07-09 13:19 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-03 20:15 [PATCH 0/3] Add ability to choose MDIO phy number to i.MX processors Jean-Christophe Dubois
2020-07-04 19:12 ` [PATCH v2 " Jean-Christophe Dubois
2020-07-03 20:15 ` [PATCH 1/3] Add the ability to change the FEC PHY MDIO device number on i.MX25 processor Jean-Christophe Dubois
2020-07-04 19:12   ` [PATCH v2 " Jean-Christophe Dubois
2020-07-03 20:15 ` [PATCH 2/3] Add the ability to change the FEC PHY MDIO device number on i.MX6 processor Jean-Christophe Dubois
2020-07-04 19:12   ` [PATCH v2 " Jean-Christophe Dubois
2020-07-03 20:15 ` [PATCH 3/3] Add the ability to change the FEC PHY MDIO devices numbers on i.MX7 processor Jean-Christophe Dubois
2020-07-04 19:12   ` [PATCH v2 " Jean-Christophe Dubois
2020-07-03 20:44 ` [PATCH 0/3] Add ability to choose MDIO phy number to i.MX processors no-reply
2020-07-04  7:07   ` Jean-Christophe DUBOIS
2020-07-09 13:18 ` [PATCH v2 " Peter Maydell

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.