On 2026-10-06 11:47, Bernhard Beschow wrote:


Am 6. Oktober 2026 09:26:52 UTC schrieb "Philippe Mathieu-Daudé" 
<[email protected]>:
On 6/10/26 10:34, Bernhard Beschow wrote:
Deriving from TYPE_SYS_BUS_DEVICE fixes the SoC object to be reset upon
machine reset.

Reviewed-by: Bin Meng <[email protected]>
Signed-off-by: Bernhard Beschow <[email protected]>
---
   include/hw/arm/fsl-imx25.h | 5 ++---
   hw/arm/fsl-imx25.c         | 7 +------
   hw/arm/imx25_pdk.c         | 2 +-
   3 files changed, 4 insertions(+), 10 deletions(-)

diff --git a/include/hw/arm/fsl-imx25.h b/include/hw/arm/fsl-imx25.h
index b68d4334a0..4bb4d5b3e5 100644
--- a/include/hw/arm/fsl-imx25.h
+++ b/include/hw/arm/fsl-imx25.h
@@ -29,6 +29,7 @@
   #include "hw/sd/sdhci.h"
   #include "hw/usb/chipidea.h"
   #include "hw/watchdog/wdt_imx2.h"
+#include "hw/core/sysbus.h"
   #include "system/memory.h"
   #include "target/arm/cpu.h"
   #include "qom/object.h"
@@ -45,10 +46,8 @@ OBJECT_DECLARE_SIMPLE_TYPE(FslIMX25State, FSL_IMX25)
   #define FSL_IMX25_NUM_USBS 2
     struct FslIMX25State {
-    /*< private >*/
-    DeviceState parent_obj;
+    SysBusDevice parent_obj;
   -    /*< public >*/
       ARMCPU         cpu;
       IMXAVICState   avic;
       IMX25CCMState  ccm;
diff --git a/hw/arm/fsl-imx25.c b/hw/arm/fsl-imx25.c
index 7f65f4ca4b..efb22359c5 100644
--- a/hw/arm/fsl-imx25.c
+++ b/hw/arm/fsl-imx25.c
@@ -317,16 +317,11 @@ static void fsl_imx25_class_init(ObjectClass *oc, const 
void *data)
       device_class_set_props(dc, fsl_imx25_properties);
       dc->realize = fsl_imx25_realize;
       dc->desc = "i.MX25 SOC";
-    /*
-     * Reason: uses serial_hds in realize and the imx25 board does not
-     * support multiple CPUs
-     */
-    dc->user_creatable = false;

Can we explain this change?

SysBus devices aren't user-creatable, are they?

"Remove clearing user-creatable which is implicit for
 SysBus-based devices" comment would have cleared any
 doubts.

Reply via email to