[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 03/25] Add the ability to change the FEC PHY MDIO device number on
From: |
Peter Maydell |
Subject: |
[PULL 03/25] Add the ability to change the FEC PHY MDIO device number on i.MX25 processor |
Date: |
Mon, 13 Jul 2020 15:10:42 +0100 |
From: Jean-Christophe Dubois <jcd@tribudubois.net>
Signed-off-by: Jean-Christophe Dubois <jcd@tribudubois.net>
Message-id:
9f8923ecd974160ae8f634c275b1100c2cbe66d7.1593806826.git.jcd@tribudubois.net
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
[PMM: updated for object_property_set_uint() argument reordering]
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
---
include/hw/arm/fsl-imx25.h | 1 +
hw/arm/fsl-imx25.c | 7 +++++++
2 files changed, 8 insertions(+)
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;
/**
diff --git a/hw/arm/fsl-imx25.c b/hw/arm/fsl-imx25.c
index b4ddceae45a..08a98f828fc 100644
--- a/hw/arm/fsl-imx25.c
+++ b/hw/arm/fsl-imx25.c
@@ -171,6 +171,7 @@ static void fsl_imx25_realize(DeviceState *dev, Error
**errp)
epit_table[i].irq));
}
+ object_property_set_uint(OBJECT(&s->fec), "phy-num", s->phy_num, &err);
qdev_set_nic_properties(DEVICE(&s->fec), &nd_table[0]);
if (!sysbus_realize(SYS_BUS_DEVICE(&s->fec), errp)) {
@@ -315,10 +316,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";
/*
--
2.20.1
- [PULL 00/25] target-arm queue, Peter Maydell, 2020/07/13
- [PULL 01/25] hw/arm/bcm2836: Remove unused 'cpu_type' field, Peter Maydell, 2020/07/13
- [PULL 02/25] target/arm: Fix mtedesc for do_mem_zpz, Peter Maydell, 2020/07/13
- [PULL 03/25] Add the ability to change the FEC PHY MDIO device number on i.MX25 processor,
Peter Maydell <=
- [PULL 04/25] Add the ability to change the FEC PHY MDIO device number on i.MX6 processor, Peter Maydell, 2020/07/13
- [PULL 06/25] target/arm: Don't do raw writes for PMINTENCLR, Peter Maydell, 2020/07/13
- [PULL 05/25] Add the ability to change the FEC PHY MDIO devices numbers on i.MX7 processor, Peter Maydell, 2020/07/13
- [PULL 07/25] virtio-iommu: Fix coverity issue in virtio_iommu_handle_command(), Peter Maydell, 2020/07/13
- [PULL 08/25] build: Enable BSD symbols for Haiku, Peter Maydell, 2020/07/13
- [PULL 09/25] util/qemu-openpty.c: Don't assume pty.h is glibc-only, Peter Maydell, 2020/07/13
- [PULL 10/25] build: Check that mlockall() exists, Peter Maydell, 2020/07/13
- [PULL 11/25] osdep.h: Always include <sys/signal.h> if it exists, Peter Maydell, 2020/07/13
- [PULL 12/25] osdep.h: For Haiku, define SIGIO as equivalent to SIGPOLL, Peter Maydell, 2020/07/13
- [PULL 14/25] util/compatfd.c: Only include <sys/syscall.h> if CONFIG_SIGNALFD, Peter Maydell, 2020/07/13