i.MX fixes and cleanup
Subsystems (2)
v2 cover i.MX fixes and cleanup
This series fixes various issues in i.MX device emulation, cleans up i.MX Kconfig handling, improves tracing, and improves some code. Functional console tests for the remaining i.MX boards are added where images are publicly available, except for imx6ul which is taken care of in a different series [1]. Fixes which appear safe for backporting are cc'd to qemu-stable.
The series is structured as follows: Patches 1-4 fix some issues and are mostly marked for backporting. Patch 3 is a follow-up on patches 1 and 2 and should not be backported since it breaks migration.
Patches 5-10 add and improve functional tests for i.MX devices. While at it, saner defaults for the amount of RAM and number of CPUs are established.
Patches 11-15 turn the remaining i.MX SoC device models into SySBus devices which fixes their reset behavior.
Patches 16-29 are Kconfig cleanups where CONFIG_IMX gets split into dedicated config items.
The last commit just fixes some typos in the code.
Changes in v2:
* Remove patch adding mc->ignore_memory_transaction_failures = true; (Peter)
* Rework wdt_imx2 patches (Peter)
* Remove all but "hw/misc/Kconfig: Remove redundant USB_EHCI_SYSBUS from config IMX" already queued by Phil. The preserved patch is required to remove all dependencies from CONFIG_IMX such that it can be removed.
* Pick up R-b tags
* Rebase onto latest master
Testing done:
* Run functional tests for sabrelite, imx8mp-evk, imx8mm-evk, mcimx7d-sabre.
[1] https://lore.kernel.org/qemu-devel/[email protected]/
base-commit: d7a65d1793d691d356a56833620f7d1e6f5d653b
Bernhard Beschow (30):
hw/watchdog/wdt_imx2: Fix handling of write-once WCR bits hw/watchdog/wdt_imx2: Clear WDT lock on reset hw/watchdog/wdt_imx2: Remove redundant attributes hw/arm/imx8mm-evk: Fix reference count of SoC object docs, tests/functional: Drop redundant CLI arguments in imx8m*-evk
invocations
hw/arm/sabrelite: Have 4 CPUs and 1 GiB of RAM by default tests/functional/arm: Add console test for sabrelite machine hw/arm/mcimx6ul-evk: Have 512 MiB of RAM by default hw/arm/mcimx7d-sabre: Have 2 CPUs and 2 GiB of RAM by default tests/functional/arm: Add console test for mcimx7d-sabre machine hw/arm/fsl-imx25: Derive from TYPE_SYS_BUS_DEVICE hw/arm/fsl-imx31: Derive from TYPE_SYS_BUS_DEVICE hw/arm/fsl-imx6: Derive from TYPE_SYS_BUS_DEVICE hw/arm/fsl-imx6ul: Derive from TYPE_SYS_BUS_DEVICE hw/arm/fsl-imx7: Derive from TYPE_SYS_BUS_DEVICE hw/misc/Kconfig: Remove redundant USB_EHCI_SYSBUS from config IMX
Kconfig: Extract config IMX_AVIC from config IMX
Kconfig: Extract config IMX_GPCV2 from config IMX
Kconfig: Extract config IMX_RNG from config IMX
Kconfig: Extract config FSL_IMX7_GPR from config IMX
Kconfig: Extract config FSL_IMX{6, 7}_SRC from config IMX
Kconfig: Extract config FSL_IMX7_SNVS from config IMX
Kconfig: Extract dedicated config FSL_IMXx_CCM from config IMX
Kconfig: Extract config IMX_GPT from config IMX
Kconfig: Extract config IMX_EPIT from config IMX
Kconfig: Extract config GPIO_IMX from config IMX
Kconfig: Extract config IMX_SPI from config IMX
Kconfig: Extract config IMX_SERIAL from config IMX
Kconfig: Remove config IMX
hw/arm/fsl-imx8m: Fix typo
MAINTAINERS | 2 + docs/system/arm/imx8m.rst | 2 +- docs/system/arm/sabrelite.rst | 4 +- include/hw/arm/fsl-imx25.h | 5 +- include/hw/arm/fsl-imx31.h | 5 +- include/hw/arm/fsl-imx6.h | 5 +- include/hw/arm/fsl-imx6ul.h | 5 +- include/hw/arm/fsl-imx7.h | 5 +- include/hw/arm/fsl-imx8mm.h | 4 +- include/hw/arm/fsl-imx8mp.h | 4 +- include/hw/watchdog/wdt_imx2.h | 2 - hw/arm/fsl-imx25.c | 7 +-- hw/arm/fsl-imx31.c | 7 +-- hw/arm/fsl-imx6.c | 4 +- hw/arm/fsl-imx6ul.c | 4 +- hw/arm/fsl-imx7.c | 5 +- hw/arm/fsl-imx8mm.c | 2 +- hw/arm/fsl-imx8mp.c | 2 +- hw/arm/imx25_pdk.c | 2 +- hw/arm/imx8mm-evk.c | 4 +- hw/arm/kzm.c | 2 +- hw/arm/mcimx6ul-evk.c | 3 +- hw/arm/mcimx7d-sabre.c | 4 +- hw/arm/sabrelite.c | 5 +- hw/watchdog/wdt_imx2.c | 22 ++------ hw/arm/Kconfig | 56 ++++++++++++++++++--- hw/char/Kconfig | 3 ++ hw/char/meson.build | 2 +- hw/gpio/Kconfig | 3 ++ hw/gpio/meson.build | 2 +- hw/intc/Kconfig | 6 +++ hw/intc/meson.build | 3 +- hw/misc/Kconfig | 41 +++++++++++++-- hw/misc/meson.build | 24 ++++----- hw/net/Kconfig | 2 +- hw/ssi/Kconfig | 4 ++ hw/ssi/meson.build | 2 +- hw/timer/Kconfig | 10 ++++ hw/timer/meson.build | 4 +- tests/functional/aarch64/test_imx8mm_evk.py | 4 +- tests/functional/aarch64/test_imx8mp_evk.py | 4 +- tests/functional/arm/meson.build | 2 + tests/functional/arm/test_mcimx7d_sabre.py | 46 +++++++++++++++++ tests/functional/arm/test_sabrelite.py | 46 +++++++++++++++++ 44 files changed, 271 insertions(+), 109 deletions(-) create mode 100755 tests/functional/arm/test_mcimx7d_sabre.py create mode 100755 tests/functional/arm/test_sabrelite.py
Signature · 1 line
2.56.0
PATCH v2 1/30 hw/watchdog/wdt_imx2: Fix handling of write-once WCR bits
Guests such as u-boot may experience inadvertant reboots when configuring the WCR register. Apparently there is a typo in the WCR locked bits
handling: The locked values for s->wcr must come from itself rather than from s->wicr, so fix that.
--- hw/watchdog/wdt_imx2.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
hw/watchdog/wdt_imx2.c +3 -3
@@ -156,18 +156,18 @@ static void imx2_wdt_write(void *opaque, hwaddr addr,case IMX2_WDT_WCR :if (s->wcr_locked) { value &= ~IMX2_WDT_WCR_LOCK_MASK ; - value |= (s->wicr &IMX2_WDT_WCR_LOCK_MASK ); + value |= (s->wcr &IMX2_WDT_WCR_LOCK_MASK ); } s->wcr_locked = true;if (s->wcr_wde_locked) { value &= ~IMX2_WDT_WCR_WDE ; - value |= (s->wicr & ~IMX2_WDT_WCR_WDE ); + value |= (s->wcr & ~IMX2_WDT_WCR_WDE ); }else if (value &IMX2_WDT_WCR_WDE ) { s->wcr_wde_locked = true; }if (s->wcr_wdt_locked) { value &= ~IMX2_WDT_WCR_WDT ; - value |= (s->wicr & ~IMX2_WDT_WCR_WDT ); + value |= (s->wcr & ~IMX2_WDT_WCR_WDT ); }else if (value &IMX2_WDT_WCR_WDT ) { s->wcr_wdt_locked = true; }
Signature · 1 line
2.56.0
Re: [PATCH v2 01/30] hw/watchdog/wdt_imx2: Fix handling of write-once WCR bits
Hi Bernhard,
Quoted 18 lines · Bernhard Beschow
Guests such as u-boot may experience inadvertant reboots when configuring the WCR register. Apparently there is a typo in the WCR locked bits
handling: The locked values fors->wcrmust come from itself rather than froms->wicr, so fix that.Fixes daca13d495a1 ("hw/watchdog: Implement full i.MX watchdog support")cc qemu-stableSigned-off-by Bernhard Beschow <[email protected]>--- hw/watchdog/wdt_imx2.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)hw/watchdog/wdt_imx2.c +0
-0
hw/watchdog/wdt_imx2.c static void imx2_wdt_write(void *opaque, hwaddr addr, · line 159
Quoted 5 lines
hw/watchdog/wdt_imx2.c +1
-1@@ -156,18 +156,18 @@ static void imx2_wdt_write(void *opaque, hwaddr addr,case IMX2_WDT_WCR :if (s->wcr_locked) { value &= ~IMX2_WDT_WCR_LOCK_MASK ; - value |= (s->wicr &IMX2_WDT_WCR_LOCK_MASK ); + value |= (s->wcr &IMX2_WDT_WCR_LOCK_MASK );
I see this patch has qemu-stable cc'ed, so it shall be a complete fix instead of a partial one that relies one another patch (in this case, patch 03 in this series).
So patch 1 corrects the source register from s->wicr to s->wcr, but the WDE and WDT branches still use inverted masks:
hw/watchdog/wdt_imx2.c static void imx2_wdt_write(void *opaque, hwaddr addr, · line 161
Quoted 2 lines
hw/watchdog/wdt_imx2.c +0
-0s->wcr & ~IMX2_WDT_WCR_WDE s->wcr & ~IMX2_WDT_WCR_WDT
These preserve all the other bits rather than the locked bit, which is apparently wrong.
Patch 3 fixes this as part of removing the redundant lock flags, but not marked as qemu-stable intentionally. When applying patch 1 & 3 together on QEMU master, this issue is fixed correctly, but not for stable.
Could you fix the WDE/WDT masks in patch 1, leaving patch 3 to remove the redundant flags and migration fields? That would make the stable fixes work correctly without depending on patch 3.
Quoted 16 lines
hw/watchdog/wdt_imx2.c +2
-2} s->wcr_locked = true;if (s->wcr_wde_locked) { value &= ~IMX2_WDT_WCR_WDE ; - value |= (s->wicr & ~IMX2_WDT_WCR_WDE ); + value |= (s->wcr & ~IMX2_WDT_WCR_WDE ); }else if (value &IMX2_WDT_WCR_WDE ) { s->wcr_wde_locked = true; }if (s->wcr_wdt_locked) { value &= ~IMX2_WDT_WCR_WDT ; - value |= (s->wicr & ~IMX2_WDT_WCR_WDT ); + value |= (s->wcr & ~IMX2_WDT_WCR_WDT ); }else if (value &IMX2_WDT_WCR_WDT ) {s->wcr_wdt_locked = true; }
Quoted 1 line
--
Regards,
Bin
Re: [PATCH v2 01/30] hw/watchdog/wdt_imx2: Fix handling of write-once WCR bits
Am 4. Oktober 2026 15:05:57 UTC schrieb Bin Meng <[email protected]>:
Quoted 40 lines
Hi Bernhard,
Quoted 18 lines · Bernhard Beschow
Guests such as u-boot may experience inadvertant reboots when configuring the WCR register. Apparently there is a typo in the WCR locked bits
handling: The locked values fors->wcrmust come from itself rather than froms->wicr, so fix that.Fixes daca13d495a1 ("hw/watchdog: Implement full i.MX watchdog support")cc qemu-stableSigned-off-by Bernhard Beschow <[email protected]>--- hw/watchdog/wdt_imx2.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)hw/watchdog/wdt_imx2.c +0
-0hw/watchdog/wdt_imx2.c static void imx2_wdt_write(void *opaque, hwaddr addr, · line 159
Quoted 5 lines
hw/watchdog/wdt_imx2.c +1
-1@@ -156,18 +156,18 @@ static void imx2_wdt_write(void *opaque, hwaddr addr,case IMX2_WDT_WCR :if (s->wcr_locked) { value &= ~IMX2_WDT_WCR_LOCK_MASK ; - value |= (s->wicr &IMX2_WDT_WCR_LOCK_MASK ); + value |= (s->wcr &IMX2_WDT_WCR_LOCK_MASK );I see this patch has qemu-stable cc'ed, so it shall be a complete fix instead of a partial one that relies one another patch (in this case, patch 03 in this series).
So patch 1 corrects the source register from
s->wicrtos->wcr, but the WDE and WDT branches still use inverted masks:hw/watchdog/wdt_imx2.c static void imx2_wdt_write(void *opaque, hwaddr addr, · line 161
Quoted 2 lines
hw/watchdog/wdt_imx2.c +0
-0s->wcr & ~IMX2_WDT_WCR_WDE s->wcr & ~IMX2_WDT_WCR_WDTThese preserve all the other bits rather than the locked bit, which is apparently wrong.
Quoted 8 lines
Patch 3 fixes this as part of removing the redundant lock flags, but not marked as qemu-stable intentionally. When applying patch 1 & 3 together on QEMU master, this issue is fixed correctly, but not for stable.
Could you fix the WDE/WDT masks in patch 1, leaving patch 3 to remove the redundant flags and migration fields? That would make the stable fixes work correctly without depending on patch 3.
Hi Bin,
Thanks for spotting this! Dedicated patch added to v3 series.
And thanks for the other comments and reviews! Everything should be incorporated in v3.
Best regards,
Bernhard
Quoted 21 lines
Quoted 17 lines
hw/watchdog/wdt_imx2.c +2
-2} s->wcr_locked = true;if (s->wcr_wde_locked) { value &= ~IMX2_WDT_WCR_WDE ; - value |= (s->wicr & ~IMX2_WDT_WCR_WDE ); + value |= (s->wcr & ~IMX2_WDT_WCR_WDE ); }else if (value &IMX2_WDT_WCR_WDE ) { s->wcr_wde_locked = true; }if (s->wcr_wdt_locked) { value &= ~IMX2_WDT_WCR_WDT ; - value |= (s->wicr & ~IMX2_WDT_WCR_WDT ); + value |= (s->wcr & ~IMX2_WDT_WCR_WDT ); }else if (value &IMX2_WDT_WCR_WDT ) {s->wcr_wdt_locked = true; }Quoted 1 line
--
Regards,
Bin
Re: [PATCH v2 01/30] hw/watchdog/wdt_imx2: Fix handling of write-once WCR bits
In reply to Bernhard BeschowQuoted 2 lines · Bernhard Beschow
Guests such as u-boot may experience inadvertant reboots when configuring
a typo: inadvertent
Quoted 11 lines
the WCR register. Apparently there is a typo in the WCR locked bits
handling: The locked values fors->wcrmust come from itself rather than froms->wicr, so fix that.Fixes daca13d495a1 ("hw/watchdog: Implement full i.MX watchdog support")cc qemu-stableSigned-off-by Bernhard Beschow <[email protected]>--- hw/watchdog/wdt_imx2.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
Regards,
Bin
PATCH v2 2/30 hw/watchdog/wdt_imx2: Clear WDT lock on reset
In reply to Bernhard BeschowThe WDT bit gets reset and becomes writeable after power on reset which imx2_wdt_reset() represents. While the WDT bit in the WCR register already gets reset, its locked attribute wasn't. Fix this inconsistency by adding the missing unlock of its locked attribute.
--- include/hw/watchdog/wdt_imx2.h | 2 +- hw/watchdog/wdt_imx2.c | 1 + 2 files changed, 2 insertions(+), 1 deletion(-)
include/hw/watchdog/wdt_imx2.h +1 -1
@@ -85,7 +85,7 @@ struct IMX2WdtState {bool wcr_locked;/* affects WDZST, WDBG, and WDW */ bool wcr_wde_locked;/* affects WDE */ - bool wcr_wdt_locked; /* affects WDT (never cleared) */ + bool wcr_wdt_locked; /* affects WDT, cleared on POR */ };#endif /* WDT_IMX2_H */
hw/watchdog/wdt_imx2.c +1 -0
@@ -60,6 +60,7 @@ static void imx2_wdt_reset(DeviceState *dev) s->wicr_locked = false; s->wcr_locked = false; s->wcr_wde_locked = false; + s->wcr_wdt_locked = false; s->wcr =IMX2_WDT_WCR_WDA |IMX2_WDT_WCR_SRS ; s->wsr =0 ;
Signature · 1 line
2.56.0
Re: [PATCH v2 02/30] hw/watchdog/wdt_imx2: Clear WDT lock on reset
Quoted 6 lines · Bernhard Beschow
The WDT bit gets reset and becomes writeable after power on reset which
imx2_wdt_reset()represents. While the WDT bit in the WCR register already gets reset, its locked attribute wasn't. Fix this inconsistency by adding the missing unlock of its locked attribute.
Quoted 9 lines
Fixes daca13d495a1 ("hw/watchdog: Implement full i.MX watchdog support")cc qemu-stableReported-by Peter Maydell <[email protected]>Signed-off-by Bernhard Beschow <[email protected]>--- include/hw/watchdog/wdt_imx2.h | 2 +- hw/watchdog/wdt_imx2.c | 1 + 2 files changed, 2 insertions(+), 1 deletion(-)
PATCH v2 3/30 hw/watchdog/wdt_imx2: Remove redundant attributes
In reply to Bernhard BeschowSince WDT and WDE are write one once bits, their values always correspond with their respective locked attributes. Thus, the attributes are redundant. Take advantage of this observation to simplify the code.
Note that removing the attributes changes the vmstate structure which constitutes a migration break. This is allowed since QEMU does not guarantee migration compatibility for i.MX devices between feature releases.
--- include/hw/watchdog/wdt_imx2.h | 2 -- hw/watchdog/wdt_imx2.c | 21 ++++----------------- 2 files changed, 4 insertions(+), 19 deletions(-)
include/hw/watchdog/wdt_imx2.h +0 -2
@@ -84,8 +84,6 @@ struct IMX2WdtState {uint16_t wmcr; bool wcr_locked; /* affects WDZST, WDBG, and WDW */ -bool wcr_wde_locked;/* affects WDE */ - bool wcr_wdt_locked; /* affects WDT, cleared on POR */ };#endif /* WDT_IMX2_H */
hw/watchdog/wdt_imx2.c +4 -17
@@ -59,8 +59,6 @@ static void imx2_wdt_reset(DeviceState *dev) s->wicr_locked = false; s->wcr_locked = false; - s->wcr_wde_locked = false; - s->wcr_wdt_locked = false; s->wcr =IMX2_WDT_WCR_WDA |IMX2_WDT_WCR_SRS ; s->wsr =0 ;
@@ -156,24 +154,14 @@ static void imx2_wdt_write(void *opaque, hwaddr addr,switch (addr) {case IMX2_WDT_WCR :if (s->wcr_locked) { +/* WDZST, WDBG, and WDW are write-once bits */ value &= ~IMX2_WDT_WCR_LOCK_MASK ; value |= (s->wcr &IMX2_WDT_WCR_LOCK_MASK ); } s->wcr_locked = true; -if (s->wcr_wde_locked) { - value &= ~IMX2_WDT_WCR_WDE ; - value |= (s->wcr & ~IMX2_WDT_WCR_WDE ); - }else if (value &IMX2_WDT_WCR_WDE ) { - s->wcr_wde_locked = true; - } -if (s->wcr_wdt_locked) { - value &= ~IMX2_WDT_WCR_WDT ; - value |= (s->wcr & ~IMX2_WDT_WCR_WDT ); - }else if (value &IMX2_WDT_WCR_WDT ) { - s->wcr_wdt_locked = true; - } - s->wcr = value; +/* WDT and WDE are write one once bits */ + s->wcr = value | (s->wcr & (IMX2_WDT_WCR_WDT |IMX2_WDT_WCR_WDE ));if (!(value &IMX2_WDT_WCR_SRS )) { s->wrsr =IMX2_WDT_WRSR_SFTW ; }
@@ -234,13 +222,12 @@ static const MemoryRegionOps imx2_wdt_ops = {static const VMStateDescription vmstate_imx2_wdt = { .name ="imx2.wdt" , + .version_id =1 , .fields = (const VMStateField []) {VMSTATE_PTIMER (timer, IMX2WdtState),VMSTATE_PTIMER (itimer, IMX2WdtState),VMSTATE_BOOL (wicr_locked, IMX2WdtState),VMSTATE_BOOL (wcr_locked, IMX2WdtState), -VMSTATE_BOOL (wcr_wde_locked, IMX2WdtState), -VMSTATE_BOOL (wcr_wdt_locked, IMX2WdtState),VMSTATE_UINT16 (wcr, IMX2WdtState),VMSTATE_UINT16 (wsr, IMX2WdtState),VMSTATE_UINT16 (wrsr, IMX2WdtState),
Signature · 1 line
2.56.0
PATCH v2 4/30 hw/arm/imx8mm-evk: Fix reference count of SoC object
In reply to Bernhard BeschowUsing sysbus_realize_and_unref() requires object_new() rather than object_new_with_props(), otherwise the initial reference count is subtracted twice, i.e. ends up being one too low.
board")
--- hw/arm/imx8mm-evk.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
hw/arm/imx8mm-evk.c +2 -2
@@ -83,8 +83,8 @@ static void imx8mm_evk_init(MachineState *machine) ims->bootinfo.psci_conduit =QEMU_PSCI_CONDUIT_SMC ; ims->bootinfo.modify_dtb = imx8mm_evk_modify_dtb; - s =FSL_IMX8MM (object_new_with_props (TYPE_FSL_IMX8MM ,OBJECT (machine), -"soc" , &error_fatal,NULL )); + s =FSL_IMX8MM (object_new (TYPE_FSL_IMX8MM )); +object_property_add_child (OBJECT (machine),"soc" ,OBJECT (s));object_property_set_uint (OBJECT (s),"fec1-phy-num" ,1 , &error_fatal);sysbus_realize_and_unref (SYS_BUS_DEVICE (s), &error_fatal);
Signature · 1 line
2.56.0
Re: [PATCH v2 04/30] hw/arm/imx8mm-evk: Fix reference count of SoC object
Quoted 6 lines · Bernhard Beschow
Using
sysbus_realize_and_unref()requiresobject_new()rather thanobject_new_with_props(), otherwise the initial reference count is subtracted twice, i.e. ends up being one too low.board")
corrupted commit message?
Quoted 15 lines
Fixes 7bcd1f30bc83 ("hw/arm: Add the i.MX 8MM EVK(Evaluation Kit)cc qemu-stableReported-by Peter Maydell <[email protected]>Reviewed-by Peter Maydell <[email protected]>Signed-off-by Bernhard Beschow <[email protected]>--- hw/arm/imx8mm-evk.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)hw/arm/imx8mm-evk.c +0
-0
hw/arm/imx8mm-evk.c static void imx8mm_evk_init(MachineState *machine) · line 90
Quoted 10 lines
hw/arm/imx8mm-evk.c +2
-2@@ -83,8 +83,8 @@ static void imx8mm_evk_init(MachineState *machine) ims->bootinfo.psci_conduit =QEMU_PSCI_CONDUIT_SMC ; ims->bootinfo.modify_dtb = imx8mm_evk_modify_dtb; - s =FSL_IMX8MM (object_new_with_props (TYPE_FSL_IMX8MM ,OBJECT (machine), -"soc" , &error_fatal,NULL )); + s =FSL_IMX8MM (object_new (TYPE_FSL_IMX8MM )); +object_property_add_child (OBJECT (machine),"soc" ,OBJECT (s));object_property_set_uint (OBJECT (s),"fec1-phy-num" ,1 , &error_fatal);sysbus_realize_and_unref (SYS_BUS_DEVICE (s), &error_fatal);
Otherwise,
PATCH v2 5/30 docs, tests/functional: Drop redundant CLI arguments in imx8m*-evk invocations
In reply to Bernhard BeschowBoth boards provide defaults matching real hardware. No need to ask users to repeat these. Also, remove these redundant arguments from the functional tests such that the defaults get tested.
--- docs/system/arm/imx8m.rst | 2 +- tests/functional/aarch64/test_imx8mm_evk.py | 4 +--- tests/functional/aarch64/test_imx8mp_evk.py | 4 +--- 3 files changed, 3 insertions(+), 7 deletions(-)
docs/system/arm/imx8m.rst +1 -1
@@ -79,7 +79,7 @@ For i.MX 8M Mini EVK: .. code-block:: bash - $ qemu-system-aarch64 -M imx8mm-evk -smp 4 -m 2G \ + $ qemu-system-aarch64 -M imx8mm-evk \ -display none -serial null -serial stdio \ -kernel Image \ -dtb imx8mm-evk.dtb \
tests/functional/aarch64/test_imx8mm_evk.py +1 -3
@@ -52,9 +52,7 @@ def test_aarch64_imx8mm_evk_usdhc(self): self.require_accelerator("tcg") self.set_machine('imx8mm-evk') self.vm.set_console(console_index=1) - self.vm.add_args('-m', '2G', - '-smp', '4', - '-kernel', self.kernel_path, + self.vm.add_args('-kernel', self.kernel_path, '-initrd', self.initrd_path, '-dtb', self.dtb_path, '-append', 'root=/dev/mmcblk2p1',
tests/functional/aarch64/test_imx8mp_evk.py +1 -3
@@ -52,9 +52,7 @@ def test_aarch64_imx8mp_evk_usdhc(self): self.require_accelerator("tcg") self.set_machine('imx8mp-evk') self.vm.set_console(console_index=1) - self.vm.add_args('-m', '2G', - '-smp', '4', - '-kernel', self.kernel_path, + self.vm.add_args('-kernel', self.kernel_path, '-initrd', self.initrd_path, '-dtb', self.dtb_path, '-append', 'root=/dev/mmcblk2p1',
Signature · 1 line
2.56.0
Re: [PATCH v2 05/30] docs, tests/functional: Drop redundant CLI arguments in imx8m*-evk invocations
Quoted 5 lines · Bernhard Beschow
Both boards provide defaults matching real hardware. No need to ask users to repeat these. Also, remove these redundant arguments from the functional tests such that the defaults get tested.
Quoted 9 lines
Reviewed-by Philippe Mathieu-Daudé <[email protected]>Reviewed-by Peter Maydell <[email protected]>Signed-off-by Bernhard Beschow <[email protected]>--- docs/system/arm/imx8m.rst | 2 +- tests/functional/aarch64/test_imx8mm_evk.py | 4 +--- tests/functional/aarch64/test_imx8mp_evk.py | 4 +--- 3 files changed, 3 insertions(+), 7 deletions(-)
PATCH v2 6/30 hw/arm/sabrelite: Have 4 CPUs and 1 GiB of RAM by default
In reply to Bernhard BeschowHaving four CPUs and 1 GiB of RAM matches real hardware. Fix the machine defaults to make its use more ergonomic and less error-prone. Also reflect this in the board documentation.
To reproduce the old default behavior for e.g. migration purposes, -smp 1 -m 128M needs to be passed on the command line.
--- docs/system/arm/sabrelite.rst | 4 ++-- hw/arm/sabrelite.c | 3 +++ 2 files changed, 5 insertions(+), 2 deletions(-)
docs/system/arm/sabrelite.rst +2 -2
@@ -55,7 +55,7 @@ To boot the newly built Linux kernel in QEMU with the SABRE Lite machine, use: .. code-block:: bash - $ qemu-system-arm -M sabrelite -smp 4 -m 1G \ + $ qemu-system-arm -M sabrelite \ -display none -serial null -serial stdio \ -kernel arch/arm/boot/zImage \ -dtb arch/arm/boot/dts/imx6q-sabrelite.dtb \
@@ -89,7 +89,7 @@ the -kernel argument, along with an SD card image with rootfs: .. code-block:: bash - $ qemu-system-arm -M sabrelite -smp 4 -m 1G \ + $ qemu-system-arm -M sabrelite \ -display none -serial null -serial stdio \ -kernel u-boot
hw/arm/sabrelite.c +3 -0
@@ -17,6 +17,7 @@#include "hw/core/boards.h" #include "hw/core/qdev-properties.h" #include "qemu/error-report.h" +#include "qemu/units.h" #include "system/qtest.h" struct SabreliteMachineState {
@@ -139,7 +140,9 @@ static void sabrelite_machine_class_init(ObjectClass *oc, const void *data) mc->desc ="Freescale i.MX6 Quad SABRE Lite Board (Cortex-A9)" ; mc->init = sabrelite_init; mc->max_cpus =FSL_IMX6_NUM_CPUS ; + mc->default_cpus =FSL_IMX6_NUM_CPUS ; mc->ignore_memory_transaction_failures = true; + mc->default_ram_size =1 * GiB; mc->default_ram_id ="sabrelite.ram" ; mc->auto_create_sdcard = true; }
Signature · 1 line
2.56.0
Re: [PATCH v2 06/30] hw/arm/sabrelite: Have 4 CPUs and 1 GiB of RAM by default
Quoted 8 lines · Bernhard Beschow
Having four CPUs and 1 GiB of RAM matches real hardware. Fix the machine defaults to make its use more ergonomic and less error-prone. Also reflect this in the board documentation.
To reproduce the old default behavior for e.g. migration purposes,
-smp 1 -m 128Mneeds to be passed on the command line.
Quoted 7 lines
Reviewed-by Philippe Mathieu-Daudé <[email protected]>Signed-off-by Bernhard Beschow <[email protected]>--- docs/system/arm/sabrelite.rst | 4 ++-- hw/arm/sabrelite.c | 3 +++ 2 files changed, 5 insertions(+), 2 deletions(-)
PATCH v2 7/30 tests/functional/arm: Add console test for `sabrelite` machine
In reply to Bernhard Beschow--- MAINTAINERS | 1 + tests/functional/arm/meson.build | 1 + tests/functional/arm/test_sabrelite.py | 46 ++++++++++++++++++++++++++ 3 files changed, 48 insertions(+) create mode 100755 tests/functional/arm/test_sabrelite.py
MAINTAINERS +1 -0
@@ -1054,6 +1054,7 @@ F: include/hw/usb/imx-usb-phy.h F: include/hw/arm/fsl-imx6.h F: include/hw/misc/imx6_*.h F: include/hw/ssi/imx_spi.h +F: tests/functional/arm/test_sabrelite.py SBSA-REF M: Peter Maydell <[email protected]>
tests/functional/arm/meson.build +1 -0
@@ -24,6 +24,7 @@ test_arm_timeouts = { 'quanta_gsj' : 240, 'raspi2' : 120, 'replay' : 240, + 'sabrelite' : 240, 'tuxrun' : 240, 'sx1' : 360, }
tests/functional/arm/test_sabrelite.py new file +46 -0
46 lines not on this page · raw message
Signature · 1 line
2.56.0
Re: [PATCH v2 07/30] tests/functional/arm: Add console test for `sabrelite` machine
Hi Bernhard,
On Sun, Oct 4, 2026 at 8:28 PM Bernhard Beschow <[email protected]> wrote:
nits: please add a simple commit body.
Quoted 27 lines
Reviewed-by Philippe Mathieu-Daudé <[email protected]>Signed-off-by Bernhard Beschow <[email protected]>--- MAINTAINERS | 1 + tests/functional/arm/meson.build | 1 + tests/functional/arm/test_sabrelite.py | 46 ++++++++++++++++++++++++++ 3 files changed, 48 insertions(+) create mode 100755 tests/functional/arm/test_sabrelite.pyMAINTAINERS +1
-0@@ -1054,6 +1054,7 @@ F: include/hw/usb/imx-usb-phy.h F: include/hw/arm/fsl-imx6.h F: include/hw/misc/imx6_*.h F: include/hw/ssi/imx_spi.h +F: tests/functional/arm/test_sabrelite.py SBSA-REF M: Peter Maydell <[email protected]>tests/functional/arm/meson.build +0
-0
tests/functional/arm/meson.build test_arm_timeouts = { · line 30
Quoted 7 lines
tests/functional/arm/meson.build +1
-0@@ -24,6 +24,7 @@ test_arm_timeouts = { 'quanta_gsj' : 240, 'raspi2' : 120, 'replay' : 240, + 'sabrelite' : 240, 'tuxrun' : 240, 'sx1' : 360, }
Missing adding an entry to 'tests_arm_system_thorough' otherwise the test cannot be run automatically.
Quoted 43 lines
tests/functional/arm/test_sabrelite.py new file +37
-0@@ -0,0 +1,46 @@ +#!/usr/bin/env python3 +# +# Functional test that boots a Linux kernel and checks the console +# +# SPDX-License-Identifier: GPL-2.0-or-later + +from qemu_test import LinuxKernelTest, Asset + + +class SabreliteMachine(LinuxKernelTest): + + ASSET_KERNEL = Asset( + ('https://ftp.debian.org/debian/dists/bookworm/main/installer-armhf/' + '20230607/images/netboot/vmlinuz'), + '5851e9c61465a26db810796db671c4729e66e81c365b3ebb1a4b7f772737605b') + + ASSET_INITRD = Asset( + ('https://ftp.debian.org/debian/dists/bookworm/main/installer-armhf/' + '20230607/images/netboot/initrd.gz'), + 'fe33f836232a9107716d34dc56d36dea81bab039243a2a42ea6583a50c9b92ca') + + ASSET_DTB = Asset( + ('https://ftp.debian.org/debian/dists/bookworm/main/installer-armhf/' + '20230607/images/device-tree/imx6q-sabrelite.dtb'), + '3ad637c8ea55ebd058a67f686e050b82ccb0d1327bc283623c133c48ad87db44') + + def setUp(self): + super().setUp() + + self.kernel_path = self.ASSET_KERNEL.fetch() + self.initrd_path = self.ASSET_INITRD.fetch() + self.dtb_path = self.ASSET_DTB.fetch() + + def test_console(self): + self.require_accelerator("tcg") + self.set_machine('sabrelite') + self.vm.set_console(console_index=1)
tests/functional/arm/test_sabrelite.py
Quoted 10 lines
tests/functional/arm/test_sabrelite.py new file +9
-1+ self.vm.add_args('-kernel', self.kernel_path, + '-initrd', self.initrd_path, + '-dtb', self.dtb_path) + + self.vm.launch() + self.wait_for_console_pattern('Starting system log daemon:') + +if __name__ == '__main__': + LinuxKernelTest.main() --
Regards,
Bin
PATCH v2 8/30 hw/arm/mcimx6ul-evk: Have 512 MiB of RAM by default
In reply to Bernhard BeschowHaving 512 MiB of RAM matches real hardware. Fix the machine default to make its use more ergonomic and less error-prone.
To reproduce the old default behavior for e.g. migration purposes, -m 128M needs to be added to the command line.
--- hw/arm/mcimx6ul-evk.c | 1 + 1 file changed, 1 insertion(+)
hw/arm/mcimx6ul-evk.c +1 -0
@@ -73,6 +73,7 @@ static void mcimx6ul_evk_machine_init(MachineClass *mc) mc->desc ="Freescale i.MX6UL Evaluation Kit (Cortex-A7)" ; mc->init = mcimx6ul_evk_init; mc->max_cpus =FSL_IMX6UL_NUM_CPUS ; + mc->default_ram_size =512 * MiB; mc->default_ram_id ="mcimx6ul-evk.ram" ; mc->auto_create_sdcard = true; }
Signature · 1 line
2.56.0
Re: [PATCH v2 08/30] hw/arm/mcimx6ul-evk: Have 512 MiB of RAM by default
Quoted 4 lines · Bernhard Beschow
Having 512 MiB of RAM matches real hardware. Fix the machine default to make its use more ergonomic and less error-prone.
Quoted 8 lines
To reproduce the old default behavior for e.g. migration purposes,
-m 128Mneeds to be added to the command line.Signed-off-by Bernhard Beschow <[email protected]>--- hw/arm/mcimx6ul-evk.c | 1 + 1 file changed, 1 insertion(+)
PATCH v2 9/30 hw/arm/mcimx7d-sabre: Have 2 CPUs and 2 GiB of RAM by default
In reply to Bernhard BeschowHaving two CPUs and 1 GiB of RAM matches real hardware. Fix the machine defaults to make its use more ergonomic and less error-prone.
To reproduce the old default behavior for e.g. migration purposes, -smp 1 -m 128M needs to be passed on the command line.
--- hw/arm/mcimx7d-sabre.c | 2 ++ 1 file changed, 2 insertions(+)
hw/arm/mcimx7d-sabre.c +2 -0
@@ -81,6 +81,8 @@ static void mcimx7d_sabre_machine_init(MachineClass *mc) mc->desc ="Freescale i.MX7 DUAL SABRE (Cortex-A7)" ; mc->init = mcimx7d_sabre_init; mc->max_cpus =FSL_IMX7_NUM_CPUS ; + mc->default_cpus =FSL_IMX7_NUM_CPUS ; + mc->default_ram_size =2 * GiB; mc->default_ram_id ="mcimx7d-sabre.ram" ; mc->auto_create_sdcard = true; }
Signature · 1 line
2.56.0
Re: [PATCH v2 09/30] hw/arm/mcimx7d-sabre: Have 2 CPUs and 2 GiB of RAM by default
Quoted 4 lines · Bernhard Beschow
Having two CPUs and 1 GiB of RAM matches real hardware. Fix the machine defaults to make its use more ergonomic and less error-prone.
Quoted 8 lines
To reproduce the old default behavior for e.g. migration purposes,
-smp 1 -m 128Mneeds to be passed on the command line.Signed-off-by Bernhard Beschow <[email protected]>--- hw/arm/mcimx7d-sabre.c | 2 ++ 1 file changed, 2 insertions(+)
PATCH v2 10/30 tests/functional/arm: Add console test for `mcimx7d-sabre` machine
In reply to Bernhard Beschow--- MAINTAINERS | 1 + tests/functional/arm/meson.build | 1 + tests/functional/arm/test_mcimx7d_sabre.py | 46 ++++++++++++++++++++++ 3 files changed, 48 insertions(+) create mode 100755 tests/functional/arm/test_mcimx7d_sabre.py
MAINTAINERS +1 -0
@@ -935,6 +935,7 @@ F: include/hw/misc/imx7_*.h F: hw/pci-host/designware.c F: include/hw/pci-host/designware.h F: docs/system/arm/mcimx7d-sabre.rst +F: tests/functional/arm/test_mcimx7d_sabre.py MCIMX8MM-EVK / iMX8MM M: Gaurav Sharma <[email protected]>
tests/functional/arm/meson.build +1 -0
@@ -20,6 +20,7 @@ test_arm_timeouts = { 'bpim2u' : 500, 'collie' : 180, 'cubieboard' : 360, + 'mcimx7d-sabre' : 240, 'orangepi' : 540, 'quanta_gsj' : 240, 'raspi2' : 120,
tests/functional/arm/test_mcimx7d_sabre.py new file +46 -0
46 lines not on this page · raw message
Signature · 1 line
2.56.0
Re: [PATCH v2 10/30] tests/functional/arm: Add console test for `mcimx7d-sabre` machine
Hi Bernhard,
On Sun, Oct 4, 2026 at 8:29 PM Bernhard Beschow <[email protected]> wrote:
nits: please add a simple commit body.
Quoted 27 lines
Reviewed-by Philippe Mathieu-Daudé <[email protected]>Signed-off-by Bernhard Beschow <[email protected]>--- MAINTAINERS | 1 + tests/functional/arm/meson.build | 1 + tests/functional/arm/test_mcimx7d_sabre.py | 46 ++++++++++++++++++++++ 3 files changed, 48 insertions(+) create mode 100755 tests/functional/arm/test_mcimx7d_sabre.pyMAINTAINERS +1
-0@@ -935,6 +935,7 @@ F: include/hw/misc/imx7_*.h F: hw/pci-host/designware.c F: include/hw/pci-host/designware.h F: docs/system/arm/mcimx7d-sabre.rst +F: tests/functional/arm/test_mcimx7d_sabre.py MCIMX8MM-EVK / iMX8MM M: Gaurav Sharma <[email protected]>tests/functional/arm/meson.build +0
-0
tests/functional/arm/meson.build test_arm_timeouts = { · line 23
Quoted 4 lines
tests/functional/arm/meson.build +1
-0@@ -20,6 +20,7 @@ test_arm_timeouts = { 'bpim2u' : 500, 'collie' : 180, 'cubieboard' : 360, + 'mcimx7d-sabre' : 240,
This should be "mcimx7d_sabre".
tests/functional/arm/meson.build test_arm_timeouts = { · line 26
Quoted 3 lines
tests/functional/arm/meson.build +0
-0'orangepi' : 540, 'quanta_gsj' : 240, 'raspi2' : 120,
and missing an entry in tests_arm_system_thorough.
Quoted 43 lines
tests/functional/arm/test_mcimx7d_sabre.py new file +37
-0@@ -0,0 +1,46 @@ +#!/usr/bin/env python3 +# +# Functional test that boots a Linux kernel and checks the console +# +# SPDX-License-Identifier: GPL-2.0-or-later + +from qemu_test import LinuxKernelTest, Asset + + +class Mcimx7dSabreMachine(LinuxKernelTest): + + ASSET_KERNEL = Asset( + ('https://ftp.debian.org/debian/dists/bookworm/main/installer-armhf/' + '20230607/images/netboot/vmlinuz'), + '5851e9c61465a26db810796db671c4729e66e81c365b3ebb1a4b7f772737605b') + + ASSET_INITRD = Asset( + ('https://ftp.debian.org/debian/dists/bookworm/main/installer-armhf/' + '20230607/images/netboot/initrd.gz'), + 'fe33f836232a9107716d34dc56d36dea81bab039243a2a42ea6583a50c9b92ca') + + ASSET_DTB = Asset( + ('https://ftp.debian.org/debian/dists/bookworm/main/installer-armhf/' + '20230607/images/device-tree/imx7d-sdb.dtb'), + 'eed45fe3ba682cc814217bc4558551d36c034ec7a7692c4eb6eaf86132baf80c') + + def setUp(self): + super().setUp() + + self.kernel_path = self.ASSET_KERNEL.fetch() + self.initrd_path = self.ASSET_INITRD.fetch() + self.dtb_path = self.ASSET_DTB.fetch() + + def test_console(self): + self.require_accelerator("tcg") + self.set_machine('mcimx7d-sabre') + self.vm.set_console(console_index=0)
tests/functional/arm/test_mcimx7d_sabre.py
Quoted 10 lines
tests/functional/arm/test_mcimx7d_sabre.py new file +9
-1+ self.vm.add_args('-kernel', self.kernel_path, + '-initrd', self.initrd_path, + '-dtb', self.dtb_path) + + self.vm.launch() + self.wait_for_console_pattern('Starting system log daemon:') + +if __name__ == '__main__': + LinuxKernelTest.main() --
Regards,
Bin
PATCH v2 11/30 hw/arm/fsl-imx25: Derive from TYPE_SYS_BUS_DEVICE
In reply to Bernhard BeschowDeriving from TYPE_SYS_BUS_DEVICE fixes the SoC object to be reset upon machine reset.
--- 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(-)
include/hw/arm/fsl-imx25.h +2 -3
@@ -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 2struct FslIMX25State { -/*< private >*/ -DeviceState parent_obj; +SysBusDevice parent_obj; -/*< public >*/ ARMCPU cpu;IMXAVICState avic;IMX25CCMState ccm;
hw/arm/fsl-imx25.c +1 -6
@@ -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; }static const TypeInfo fsl_imx25_type_info = { .name =TYPE_FSL_IMX25 , - .parent =TYPE_DEVICE , + .parent =TYPE_SYS_BUS_DEVICE , .instance_size =sizeof (FslIMX25State), .instance_init = fsl_imx25_init, .class_init = fsl_imx25_class_init,
hw/arm/imx25_pdk.c +1 -1
@@ -72,7 +72,7 @@ static void imx25_pdk_init(MachineState *machine)object_initialize_child (OBJECT (machine),"soc" , &s->soc,TYPE_FSL_IMX25 ); -qdev_realize (DEVICE (&s->soc),NULL , &error_fatal); +sysbus_realize_and_unref (SYS_BUS_DEVICE (&s->soc), &error_fatal);/* We need to initialize our memory */ if (machine->ram_size > (FSL_IMX25_SDRAM0_SIZE +FSL_IMX25_SDRAM1_SIZE )) {
Signature · 1 line
2.56.0
Re: [PATCH v2 11/30] hw/arm/fsl-imx25: Derive from TYPE_SYS_BUS_DEVICE
Hi Bernhard,
Quoted 62 lines · Bernhard Beschow
Deriving from
TYPE_SYS_BUS_DEVICEfixes the SoC object to be reset upon machine reset.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(-)include/hw/arm/fsl-imx25.h +2
-3@@ -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 2struct FslIMX25State { -/*< private >*/ -DeviceState parent_obj; +SysBusDevice parent_obj; -/*< public >*/ ARMCPU cpu;IMXAVICState avic;IMX25CCMState ccm;hw/arm/fsl-imx25.c +1
-6@@ -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; }static const TypeInfo fsl_imx25_type_info = { .name =TYPE_FSL_IMX25 , - .parent =TYPE_DEVICE , + .parent =TYPE_SYS_BUS_DEVICE , .instance_size =sizeof (FslIMX25State), .instance_init = fsl_imx25_init, .class_init = fsl_imx25_class_init,hw/arm/imx25_pdk.c +0
-0
hw/arm/imx25_pdk.c static void imx25_pdk_init(MachineState *machine) · line 75
Quoted 5 lines
hw/arm/imx25_pdk.c +1
-1@@ -72,7 +72,7 @@ static void imx25_pdk_init(MachineState *machine)object_initialize_child (OBJECT (machine),"soc" , &s->soc,TYPE_FSL_IMX25 ); -qdev_realize (DEVICE (&s->soc),NULL , &error_fatal); +sysbus_realize_and_unref (SYS_BUS_DEVICE (&s->soc), &error_fatal);
This should use sysbus_realize(), as object_initialize_child() already decreased the ref cnt on success. The same for patch 12 & 13.
hw/arm/imx25_pdk.c static void imx25_pdk_init(MachineState *machine) · line 78
Quoted 3 lines
hw/arm/imx25_pdk.c +0
-0/* We need to initialize our memory */ if (machine->ram_size > (FSL_IMX25_SDRAM0_SIZE +FSL_IMX25_SDRAM1_SIZE )) {
Regards,
Bin
PATCH v2 12/30 hw/arm/fsl-imx31: Derive from TYPE_SYS_BUS_DEVICE
In reply to Bernhard BeschowDeriving from TYPE_SYS_BUS_DEVICE fixes the SoC object to be reset upon machine reset.
--- include/hw/arm/fsl-imx31.h | 5 ++--- hw/arm/fsl-imx31.c | 7 +------ hw/arm/kzm.c | 2 +- 3 files changed, 4 insertions(+), 10 deletions(-)
include/hw/arm/fsl-imx31.h +2 -3
@@ -25,6 +25,7 @@#include "hw/i2c/imx_i2c.h" #include "hw/gpio/imx_gpio.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"
@@ -38,10 +39,8 @@ OBJECT_DECLARE_SIMPLE_TYPE(FslIMX31State, FSL_IMX31)#define FSL_IMX31_NUM_GPIOS 3struct FslIMX31State { -/*< private >*/ -DeviceState parent_obj; +SysBusDevice parent_obj; -/*< public >*/ ARMCPU cpu;IMXAVICState avic;IMX31CCMState ccm;
hw/arm/fsl-imx31.c +1 -6
@@ -224,16 +224,11 @@ static void fsl_imx31_class_init(ObjectClass *oc, const void *data) dc->realize = fsl_imx31_realize; dc->desc ="i.MX31 SOC" ; -/* -* Reason: uses serial_hds in realize and the kzm board does not -* support multiple CPUs -*/ - dc->user_creatable = false; }static const TypeInfo fsl_imx31_type_info = { .name =TYPE_FSL_IMX31 , - .parent =TYPE_DEVICE , + .parent =TYPE_SYS_BUS_DEVICE , .instance_size =sizeof (FslIMX31State), .instance_init = fsl_imx31_init, .class_init = fsl_imx31_class_init,
hw/arm/kzm.c +1 -1
@@ -69,7 +69,7 @@ static void kzm_init(MachineState *machine)object_initialize_child (OBJECT (machine),"soc" , &s->soc,TYPE_FSL_IMX31 ); -qdev_realize (DEVICE (&s->soc),NULL , &error_fatal); +sysbus_realize_and_unref (SYS_BUS_DEVICE (&s->soc), &error_fatal);/* Check the amount of memory is compatible with the SOC */ if (machine->ram_size > (FSL_IMX31_SDRAM0_SIZE +FSL_IMX31_SDRAM1_SIZE )) {
Signature · 1 line
2.56.0
PATCH v2 13/30 hw/arm/fsl-imx6: Derive from TYPE_SYS_BUS_DEVICE
In reply to Bernhard BeschowDeriving from TYPE_SYS_BUS_DEVICE fixes the SoC object to be reset upon machine reset.
--- include/hw/arm/fsl-imx6.h | 5 ++--- hw/arm/fsl-imx6.c | 4 +--- hw/arm/sabrelite.c | 2 +- 3 files changed, 4 insertions(+), 7 deletions(-)
include/hw/arm/fsl-imx6.h +2 -3
@@ -35,6 +35,7 @@#include "hw/usb/imx-usb-phy.h" #include "hw/pci-host/designware.h" #include "hw/core/or-irq.h" +#include "hw/core/sysbus.h" #include "system/memory.h" #include "target/arm/cpu.h" #include "net/can_emu.h"
@@ -56,10 +57,8 @@ OBJECT_DECLARE_SIMPLE_TYPE(FslIMX6State, FSL_IMX6)#define FSL_IMX6_NUM_CANS 2struct FslIMX6State { -/*< private >*/ -DeviceState parent_obj; +SysBusDevice parent_obj; -/*< public >*/ ARMCPU cpu[FSL_IMX6_NUM_CPUS ];A9MPPrivState a9mpcore;IMX6CCMState ccm;
hw/arm/fsl-imx6.c +1 -3
@@ -519,13 +519,11 @@ static void fsl_imx6_class_init(ObjectClass *oc, const void *data)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 */ - dc->user_creatable = false; }static const TypeInfo fsl_imx6_type_info = { .name =TYPE_FSL_IMX6 , - .parent =TYPE_DEVICE , + .parent =TYPE_SYS_BUS_DEVICE , .instance_size =sizeof (FslIMX6State), .instance_init = fsl_imx6_init, .class_init = fsl_imx6_class_init,
hw/arm/sabrelite.c +1 -1
@@ -66,7 +66,7 @@ static void sabrelite_init(MachineState *machine) OBJECT(s->canbus[i]), &error_fatal); } -qdev_realize (DEVICE (&s->soc),NULL , &error_fatal); +sysbus_realize_and_unref (SYS_BUS_DEVICE (&s->soc), &error_fatal);memory_region_add_subregion (get_system_memory (),FSL_IMX6_MMDC_ADDR , machine->ram);
Signature · 1 line
2.56.0
PATCH v2 14/30 hw/arm/fsl-imx6ul: Derive from TYPE_SYS_BUS_DEVICE
In reply to Bernhard BeschowDeriving from TYPE_SYS_BUS_DEVICE fixes the SoC object to be reset upon machine reset.
--- include/hw/arm/fsl-imx6ul.h | 5 ++--- hw/arm/fsl-imx6ul.c | 4 +--- hw/arm/mcimx6ul-evk.c | 2 +- 3 files changed, 4 insertions(+), 7 deletions(-)
include/hw/arm/fsl-imx6ul.h +2 -3
@@ -18,6 +18,7 @@#define FSL_IMX6UL_H #include "hw/cpu/a15mpcore.h" +#include "hw/core/sysbus.h" #include "hw/misc/imx6ul_ccm.h" #include "hw/misc/imx6_src.h" #include "hw/misc/imx7_snvs.h"
@@ -64,10 +65,8 @@ enum FslIMX6ULConfiguration { };struct FslIMX6ULState { -/*< private >*/ -DeviceState parent_obj; +SysBusDevice parent_obj; -/*< public >*/ ARMCPU cpu;A15MPPrivState a7mpcore;IMXGPTState gpt[FSL_IMX6UL_NUM_GPTS ];
hw/arm/fsl-imx6ul.c +1 -3
@@ -730,13 +730,11 @@ static void fsl_imx6ul_class_init(ObjectClass *oc, const void *data)device_class_set_props (dc, fsl_imx6ul_properties); dc->realize = fsl_imx6ul_realize; dc->desc ="i.MX6UL SOC" ; -/* Reason: Uses serial_hds and nd_table in realize() directly */ - dc->user_creatable = false; }static const TypeInfo fsl_imx6ul_type_info = { .name =TYPE_FSL_IMX6UL , - .parent =TYPE_DEVICE , + .parent =TYPE_SYS_BUS_DEVICE , .instance_size =sizeof (FslIMX6ULState), .instance_init = fsl_imx6ul_init, .class_init = fsl_imx6ul_class_init,
hw/arm/mcimx6ul-evk.c +1 -1
@@ -44,7 +44,7 @@ static void mcimx6ul_evk_init(MachineState *machine)object_property_set_uint (OBJECT (s),"fec2-phy-num" ,1 , &error_fatal);object_property_set_bool (OBJECT (s),"fec1-phy-connected" , false, &error_fatal); -qdev_realize (DEVICE (s),NULL , &error_fatal); +sysbus_realize_and_unref (SYS_BUS_DEVICE (s), &error_fatal);memory_region_add_subregion (get_system_memory (),FSL_IMX6UL_MMDC_ADDR , machine->ram);
Signature · 1 line
2.56.0
Re: [PATCH v2 14/30] hw/arm/fsl-imx6ul: Derive from TYPE_SYS_BUS_DEVICE
Quoted 11 lines · Bernhard Beschow
Deriving from
TYPE_SYS_BUS_DEVICEfixes the SoC object to be reset upon machine reset.Signed-off-by Bernhard Beschow <[email protected]>--- include/hw/arm/fsl-imx6ul.h | 5 ++--- hw/arm/fsl-imx6ul.c | 4 +--- hw/arm/mcimx6ul-evk.c | 2 +- 3 files changed, 4 insertions(+), 7 deletions(-)
PATCH v2 15/30 hw/arm/fsl-imx7: Derive from TYPE_SYS_BUS_DEVICE
In reply to Bernhard BeschowDeriving from TYPE_SYS_BUS_DEVICE fixes the SoC object to be reset upon machine reset.
--- include/hw/arm/fsl-imx7.h | 5 ++--- hw/arm/fsl-imx7.c | 5 +---- hw/arm/mcimx7d-sabre.c | 2 +- 3 files changed, 4 insertions(+), 8 deletions(-)
include/hw/arm/fsl-imx7.h +2 -3
@@ -37,6 +37,7 @@#include "hw/pci-host/designware.h" #include "hw/usb/chipidea.h" #include "hw/core/or-irq.h" +#include "hw/core/sysbus.h" #include "target/arm/cpu.h" #include "qom/object.h" #include "qemu/units.h"
@@ -64,10 +65,8 @@ enum FslIMX7Configuration { };struct FslIMX7State { -/*< private >*/ -DeviceState parent_obj; +SysBusDevice parent_obj; -/*< public >*/ ARMCPU cpu[FSL_IMX7_NUM_CPUS ];A15MPPrivState a7mpcore;IMXGPTState gpt[FSL_IMX7_NUM_GPTS ];
hw/arm/fsl-imx7.c +1 -4
@@ -753,15 +753,12 @@ static void fsl_imx7_class_init(ObjectClass *oc, const void *data)device_class_set_props (dc, fsl_imx7_properties); dc->realize = fsl_imx7_realize; - -/* Reason: Uses serial_hds and nd_table in realize() directly */ - dc->user_creatable = false; dc->desc ="i.MX7 SOC" ; }static const TypeInfo fsl_imx7_type_info = { .name =TYPE_FSL_IMX7 , - .parent =TYPE_DEVICE , + .parent =TYPE_SYS_BUS_DEVICE , .instance_size =sizeof (FslIMX7State), .instance_init = fsl_imx7_init, .class_init = fsl_imx7_class_init,
hw/arm/mcimx7d-sabre.c +1 -1
@@ -52,7 +52,7 @@ static void mcimx7d_sabre_init(MachineState *machine)object_property_add_child (OBJECT (machine),"soc" ,OBJECT (s));object_property_set_bool (OBJECT (s),"fec2-phy-connected" , false, &error_fatal); -qdev_realize (DEVICE (s),NULL , &error_fatal); +sysbus_realize_and_unref (SYS_BUS_DEVICE (s), &error_fatal);memory_region_add_subregion (get_system_memory (),FSL_IMX7_MMDC_ADDR , machine->ram);
Signature · 1 line
2.56.0
Re: [PATCH v2 15/30] hw/arm/fsl-imx7: Derive from TYPE_SYS_BUS_DEVICE
Quoted 11 lines · Bernhard Beschow
Deriving from
TYPE_SYS_BUS_DEVICEfixes the SoC object to be reset upon machine reset.Signed-off-by Bernhard Beschow <[email protected]>--- include/hw/arm/fsl-imx7.h | 5 ++--- hw/arm/fsl-imx7.c | 5 +---- hw/arm/mcimx7d-sabre.c | 2 +- 3 files changed, 4 insertions(+), 8 deletions(-)
PATCH v2 16/30 hw/misc/Kconfig: Remove redundant USB_EHCI_SYSBUS from config IMX
In reply to Bernhard BeschowSince commit 464ce71a963b "Kconfig: Extract CONFIG_USB_CHIPIDEA from CONFIG_IMX" all relevant i.MX SoC models select USB_CHIPIDEA such that selecting USB_EHCI_SYSBUS became redundant in CONFIG_IMX. Remove it.
--- hw/misc/Kconfig | 1 - 1 file changed, 1 deletion(-)
hw/misc/Kconfig +0 -1
@@ -93,7 +93,6 @@ config IMX bool select PTIMER select SSI - select USB_EHCI_SYSBUS config FSL_IMX8MP_ANALOG bool
Signature · 1 line
2.56.0
Re: [PATCH v2 16/30] hw/misc/Kconfig: Remove redundant USB_EHCI_SYSBUS from config IMX
Quoted 6 lines · Bernhard Beschow
Since commit
464ce71a963b"Kconfig: ExtractCONFIG_USB_CHIPIDEAfromCONFIG_IMX" all relevant i.MX SoC models selectUSB_CHIPIDEAsuch that selectingUSB_EHCI_SYSBUSbecame redundant inCONFIG_IMX. Remove it.
Quoted 6 lines
Fixes 464ce71a963b ("Kconfig: Extract CONFIG_USB_CHIPIDEA from CONFIG_IMX")Signed-off-by Bernhard Beschow <[email protected]>--- hw/misc/Kconfig | 1 - 1 file changed, 1 deletion(-)
PATCH v2 17/30 Kconfig: Extract config IMX_AVIC from config IMX
In reply to Bernhard BeschowOver time, QEMU has grown a number of i.MX boards and the monolithic config IMX drags in unneeded dependencies into each SoC model. Extract config IMX_AVIC to eventually eliminate config IMX.
--- hw/arm/Kconfig | 2 ++ hw/intc/Kconfig | 3 +++ hw/intc/meson.build | 3 ++- 3 files changed, 7 insertions(+), 1 deletion(-)
hw/arm/Kconfig +2 -0
@@ -480,6 +480,7 @@ config FSL_IMX25 depends on TCG && ARM imply I2C_DEVICES select IMX + select IMX_AVIC select IMX_FEC select IMX_I2C select USB_CHIPIDEA
@@ -493,6 +494,7 @@ config FSL_IMX31 imply I2C_DEVICES select SERIAL_MM select IMX + select IMX_AVIC select IMX_I2C select WDT_IMX2 select LAN9118
hw/intc/Kconfig +3 -0
@@ -5,6 +5,9 @@ config I8259 bool select ISA_BUS +config IMX_AVIC + bool + config PL190 bool
hw/intc/meson.build +2 -1
@@ -23,7 +23,8 @@ system_ss.add(when: 'CONFIG_EXYNOS4', if_true: files('exynos4210_gic.c', 'exynos system_ss.add(when: 'CONFIG_GOLDFISH_PIC', if_true: files('goldfish_pic.c')) system_ss.add(when: 'CONFIG_HEATHROW_PIC', if_true: files('heathrow_pic.c')) system_ss.add(when: 'CONFIG_I8259', if_true: files('i8259_common.c', 'i8259.c')) -system_ss.add(when: 'CONFIG_IMX', if_true: files('imx_avic.c', 'imx_gpcv2.c')) +system_ss.add(when: 'CONFIG_IMX_AVIC', if_true: files('imx_avic.c')) +system_ss.add(when: 'CONFIG_IMX', if_true: files('imx_gpcv2.c')) system_ss.add(when: 'CONFIG_IOAPIC', if_true: files('ioapic_common.c'), if_false: files('ioapic-stub.c')) system_ss.add(when: 'CONFIG_OMAP', if_true: files('omap_intc.c')) system_ss.add(when: 'CONFIG_OPENPIC', if_true: files('openpic.c'))
Signature · 1 line
2.56.0
Re: [PATCH v2 17/30] Kconfig: Extract config IMX_AVIC from config IMX
Quoted 5 lines · Bernhard Beschow
Over time, QEMU has grown a number of i.MX boards and the monolithic config IMX drags in unneeded dependencies into each SoC model. Extract config
IMX_AVICto eventually eliminate config IMX.
Quoted 8 lines
Reviewed-by Philippe Mathieu-Daudé <[email protected]>Signed-off-by Bernhard Beschow <[email protected]>--- hw/arm/Kconfig | 2 ++ hw/intc/Kconfig | 3 +++ hw/intc/meson.build | 3 ++- 3 files changed, 7 insertions(+), 1 deletion(-)
PATCH v2 18/30 Kconfig: Extract config IMX_GPCV2 from config IMX
In reply to Bernhard BeschowOver time, QEMU has grown a number of i.MX boards and the monolithic config IMX drags in unneeded dependencies into each SoC model. Extract config IMX_GPCV2 to eventually eliminate config IMX.
--- hw/arm/Kconfig | 2 ++ hw/intc/Kconfig | 3 +++ hw/intc/meson.build | 2 +- 3 files changed, 6 insertions(+), 1 deletion(-)
hw/arm/Kconfig +2 -0
@@ -581,6 +581,7 @@ config FSL_IMX7 select PCI select IMX select IMX_FEC + select IMX_GPCV2 select IMX_I2C select WDT_IMX2 select PCI_EXPRESS_DESIGNWARE
@@ -661,6 +662,7 @@ config FSL_IMX6UL select IMX select IMX6UL_LCDIF select IMX_FEC + select IMX_GPCV2 select IMX_I2C select IMX_USBPHY select WDT_IMX2
hw/intc/Kconfig +3 -0
@@ -8,6 +8,9 @@ config I8259 config IMX_AVIC bool +config IMX_GPCV2 + bool + config PL190 bool
hw/intc/meson.build +1 -1
@@ -24,7 +24,7 @@ system_ss.add(when: 'CONFIG_GOLDFISH_PIC', if_true: files('goldfish_pic.c')) system_ss.add(when: 'CONFIG_HEATHROW_PIC', if_true: files('heathrow_pic.c')) system_ss.add(when: 'CONFIG_I8259', if_true: files('i8259_common.c', 'i8259.c')) system_ss.add(when: 'CONFIG_IMX_AVIC', if_true: files('imx_avic.c')) -system_ss.add(when: 'CONFIG_IMX', if_true: files('imx_gpcv2.c')) +system_ss.add(when: 'CONFIG_IMX_GPCV2', if_true: files('imx_gpcv2.c')) system_ss.add(when: 'CONFIG_IOAPIC', if_true: files('ioapic_common.c'), if_false: files('ioapic-stub.c')) system_ss.add(when: 'CONFIG_OMAP', if_true: files('omap_intc.c')) system_ss.add(when: 'CONFIG_OPENPIC', if_true: files('openpic.c'))
Signature · 1 line
2.56.0
Re: [PATCH v2 18/30] Kconfig: Extract config IMX_GPCV2 from config IMX
Quoted 5 lines · Bernhard Beschow
Over time, QEMU has grown a number of i.MX boards and the monolithic config IMX drags in unneeded dependencies into each SoC model. Extract config
IMX_GPCV2to eventually eliminate config IMX.
Quoted 8 lines
Reviewed-by Philippe Mathieu-Daudé <[email protected]>Signed-off-by Bernhard Beschow <[email protected]>--- hw/arm/Kconfig | 2 ++ hw/intc/Kconfig | 3 +++ hw/intc/meson.build | 2 +- 3 files changed, 6 insertions(+), 1 deletion(-)
PATCH v2 19/30 Kconfig: Extract config IMX_RNG from config IMX
In reply to Bernhard BeschowOver time, QEMU has grown a number of i.MX boards and the monolithic config IMX drags in unneeded dependencies into each SoC model. Extract config IMX_RNG to eventually eliminate config IMX.
--- hw/arm/Kconfig | 1 + hw/misc/Kconfig | 3 +++ hw/misc/meson.build | 2 +- 3 files changed, 5 insertions(+), 1 deletion(-)
hw/arm/Kconfig +1 -0
@@ -483,6 +483,7 @@ config FSL_IMX25 select IMX_AVIC select IMX_FEC select IMX_I2C + select IMX_RNG select USB_CHIPIDEA select WDT_IMX2 select SDHCI
hw/misc/Kconfig +3 -0
@@ -94,6 +94,9 @@ config IMX select PTIMER select SSI +config IMX_RNG + bool + config FSL_IMX8MP_ANALOG bool
hw/misc/meson.build +1 -1
@@ -62,6 +62,7 @@ system_ss.add(when: 'CONFIG_ECCMEMCTL', if_true: files('eccmemctl.c')) system_ss.add(when: 'CONFIG_EXYNOS4', if_true: files('exynos4210_pmu.c', 'exynos4210_clk.c', 'exynos4210_rng.c')) system_ss.add(when: 'CONFIG_FSL_IMX8MP_ANALOG', if_true: files('imx8mp_analog.c')) system_ss.add(when: 'CONFIG_FSL_IMX8MP_CCM', if_true: files('imx8mp_ccm.c')) +system_ss.add(when: 'CONFIG_IMX_RNG', if_true: files('imx_rngc.c')) system_ss.add(when: 'CONFIG_IMX', if_true: files( 'imx25_ccm.c', 'imx31_ccm.c',
@@ -73,7 +74,6 @@ system_ss.add(when: 'CONFIG_IMX', if_true: files( 'imx7_gpr.c', 'imx7_snvs.c', 'imx_ccm.c', - 'imx_rngc.c', )) system_ss.add(when: 'CONFIG_MAX78000_AES', if_true: files('max78000_aes.c')) system_ss.add(when: 'CONFIG_MAX78000_GCR', if_true: files('max78000_gcr.c'))
Signature · 1 line
2.56.0
Re: [PATCH v2 19/30] Kconfig: Extract config IMX_RNG from config IMX
Quoted 5 lines · Bernhard Beschow
Over time, QEMU has grown a number of i.MX boards and the monolithic config IMX drags in unneeded dependencies into each SoC model. Extract config
IMX_RNGto eventually eliminate config IMX.
Quoted 8 lines
Reviewed-by Philippe Mathieu-Daudé <[email protected]>Signed-off-by Bernhard Beschow <[email protected]>--- hw/arm/Kconfig | 1 + hw/misc/Kconfig | 3 +++ hw/misc/meson.build | 2 +- 3 files changed, 5 insertions(+), 1 deletion(-)
PATCH v2 20/30 Kconfig: Extract config FSL_IMX7_GPR from config IMX
In reply to Bernhard BeschowOver time, QEMU has grown a number of i.MX boards and the monolithic config IMX drags in unneeded dependencies into each SoC model. Extract config FSL_IMX7_GPR to eventually eliminate config IMX.
--- hw/arm/Kconfig | 1 + hw/misc/Kconfig | 3 +++ hw/misc/meson.build | 2 +- 3 files changed, 5 insertions(+), 1 deletion(-)
hw/arm/Kconfig +1 -0
@@ -579,6 +579,7 @@ config FSL_IMX7 imply TEST_DEVICES imply I2C_DEVICES select A15MPCORE + select FSL_IMX7_GPR select PCI select IMX select IMX_FEC
hw/misc/Kconfig +3 -0
@@ -97,6 +97,9 @@ config IMX config IMX_RNG bool +config FSL_IMX7_GPR + bool + config FSL_IMX8MP_ANALOG bool
hw/misc/meson.build +1 -1
@@ -60,6 +60,7 @@ system_ss.add(when: 'CONFIG_AXP2XX_PMU', if_true: files('axp2xx.c')) system_ss.add(when: 'CONFIG_REALVIEW', if_true: files('arm_sysctl.c')) system_ss.add(when: 'CONFIG_ECCMEMCTL', if_true: files('eccmemctl.c')) system_ss.add(when: 'CONFIG_EXYNOS4', if_true: files('exynos4210_pmu.c', 'exynos4210_clk.c', 'exynos4210_rng.c')) +system_ss.add(when: 'CONFIG_FSL_IMX7_GPR', if_true: files('imx7_gpr.c')) system_ss.add(when: 'CONFIG_FSL_IMX8MP_ANALOG', if_true: files('imx8mp_analog.c')) system_ss.add(when: 'CONFIG_FSL_IMX8MP_CCM', if_true: files('imx8mp_ccm.c')) system_ss.add(when: 'CONFIG_IMX_RNG', if_true: files('imx_rngc.c'))
@@ -71,7 +72,6 @@ system_ss.add(when: 'CONFIG_IMX', if_true: files( 'imx6ul_ccm.c', 'imx7_ccm.c', 'imx7_src.c', - 'imx7_gpr.c', 'imx7_snvs.c', 'imx_ccm.c', ))
Signature · 1 line
2.56.0
Re: [PATCH v2 20/30] Kconfig: Extract config FSL_IMX7_GPR from config IMX
Quoted 5 lines · Bernhard Beschow
Over time, QEMU has grown a number of i.MX boards and the monolithic config IMX drags in unneeded dependencies into each SoC model. Extract config
FSL_IMX7_GPRto eventually eliminate config IMX.
Quoted 7 lines
Signed-off-by Bernhard Beschow <[email protected]>--- hw/arm/Kconfig | 1 + hw/misc/Kconfig | 3 +++ hw/misc/meson.build | 2 +- 3 files changed, 5 insertions(+), 1 deletion(-)
PATCH v2 21/30 Kconfig: Extract config FSL_IMX{6, 7}_SRC from config IMX
In reply to Bernhard BeschowOver time, QEMU has grown a number of i.MX boards and the monolithic config IMX drags in unneeded dependencies into each SoC model. Extract SoC-specific config FSL_IMX{6,7}_SRC to eventually eliminate config IMX.
--- hw/arm/Kconfig | 3 +++ hw/misc/Kconfig | 6 ++++++ hw/misc/meson.build | 4 ++-- 3 files changed, 11 insertions(+), 2 deletions(-)
hw/arm/Kconfig +3 -0
@@ -505,6 +505,7 @@ config FSL_IMX6 imply PCIE_DEVICES imply I2C_DEVICES select A9MPCORE + select FSL_IMX6_SRC select IMX select IMX_FEC select IMX_I2C
@@ -580,6 +581,7 @@ config FSL_IMX7 imply I2C_DEVICES select A15MPCORE select FSL_IMX7_GPR + select FSL_IMX7_SRC select PCI select IMX select IMX_FEC
@@ -661,6 +663,7 @@ config FSL_IMX6UL depends on TCG && ARM imply I2C_DEVICES select A15MPCORE + select FSL_IMX6_SRC select IMX select IMX6UL_LCDIF select IMX_FEC
hw/misc/Kconfig +6 -0
@@ -97,9 +97,15 @@ config IMX config IMX_RNG bool +config FSL_IMX6_SRC + bool + config FSL_IMX7_GPR bool +config FSL_IMX7_SRC + bool + config FSL_IMX8MP_ANALOG bool
hw/misc/meson.build +2 -2
@@ -60,7 +60,9 @@ system_ss.add(when: 'CONFIG_AXP2XX_PMU', if_true: files('axp2xx.c')) system_ss.add(when: 'CONFIG_REALVIEW', if_true: files('arm_sysctl.c')) system_ss.add(when: 'CONFIG_ECCMEMCTL', if_true: files('eccmemctl.c')) system_ss.add(when: 'CONFIG_EXYNOS4', if_true: files('exynos4210_pmu.c', 'exynos4210_clk.c', 'exynos4210_rng.c')) +system_ss.add(when: 'CONFIG_FSL_IMX6_SRC', if_true: files('imx6_src.c')) system_ss.add(when: 'CONFIG_FSL_IMX7_GPR', if_true: files('imx7_gpr.c')) +system_ss.add(when: 'CONFIG_FSL_IMX7_SRC', if_true: files('imx7_src.c')) system_ss.add(when: 'CONFIG_FSL_IMX8MP_ANALOG', if_true: files('imx8mp_analog.c')) system_ss.add(when: 'CONFIG_FSL_IMX8MP_CCM', if_true: files('imx8mp_ccm.c')) system_ss.add(when: 'CONFIG_IMX_RNG', if_true: files('imx_rngc.c'))
@@ -68,10 +70,8 @@ system_ss.add(when: 'CONFIG_IMX', if_true: files( 'imx25_ccm.c', 'imx31_ccm.c', 'imx6_ccm.c', - 'imx6_src.c', 'imx6ul_ccm.c', 'imx7_ccm.c', - 'imx7_src.c', 'imx7_snvs.c', 'imx_ccm.c', ))
Signature · 1 line
2.56.0
Re: [PATCH v2 21/30] Kconfig: Extract config FSL_IMX{6, 7}_SRC from config IMX
Quoted 6 lines · Bernhard Beschow
Over time, QEMU has grown a number of i.MX boards and the monolithic config IMX drags in unneeded dependencies into each SoC model. Extract SoC-specific config FSL_IMX{6,7}_SRC to eventually eliminate config IMX.
Quoted 7 lines
Signed-off-by Bernhard Beschow <[email protected]>--- hw/arm/Kconfig | 3 +++ hw/misc/Kconfig | 6 ++++++ hw/misc/meson.build | 4 ++-- 3 files changed, 11 insertions(+), 2 deletions(-)
PATCH v2 22/30 Kconfig: Extract config FSL_IMX7_SNVS from config IMX
In reply to Bernhard BeschowOver time, QEMU has grown a number of i.MX boards and the monolithic config IMX drags in unneeded dependencies into each SoC model. Extract config FSL_IMX7_SNVS to eventually eliminate config IMX.
--- hw/arm/Kconfig | 5 +++++ hw/misc/Kconfig | 3 +++ hw/misc/meson.build | 2 +- 3 files changed, 9 insertions(+), 1 deletion(-)
hw/arm/Kconfig +5 -0
@@ -506,6 +506,7 @@ config FSL_IMX6 imply I2C_DEVICES select A9MPCORE select FSL_IMX6_SRC + select FSL_IMX7_SNVS select IMX select IMX_FEC select IMX_I2C
@@ -581,6 +582,7 @@ config FSL_IMX7 imply I2C_DEVICES select A15MPCORE select FSL_IMX7_GPR + select FSL_IMX7_SNVS select FSL_IMX7_SRC select PCI select IMX
@@ -600,6 +602,7 @@ config FSL_IMX8MP imply PCI_DEVICES select ARM_GIC select CAN_FLEXCAN + select FSL_IMX7_SNVS select FSL_IMX8MP_ANALOG select FSL_IMX8MP_CCM select IMX
@@ -625,6 +628,7 @@ config FSL_IMX8MM imply PCI_DEVICES imply I2C_DEVICES select ARM_GIC + select FSL_IMX7_SNVS select FSL_IMX8MP_ANALOG select FSL_IMX8MP_CCM select IMX
@@ -664,6 +668,7 @@ config FSL_IMX6UL imply I2C_DEVICES select A15MPCORE select FSL_IMX6_SRC + select FSL_IMX7_SNVS select IMX select IMX6UL_LCDIF select IMX_FEC
hw/misc/Kconfig +3 -0
@@ -103,6 +103,9 @@ config FSL_IMX6_SRC config FSL_IMX7_GPR bool +config FSL_IMX7_SNVS + bool + config FSL_IMX7_SRC bool
hw/misc/meson.build +1 -1
@@ -62,6 +62,7 @@ system_ss.add(when: 'CONFIG_ECCMEMCTL', if_true: files('eccmemctl.c')) system_ss.add(when: 'CONFIG_EXYNOS4', if_true: files('exynos4210_pmu.c', 'exynos4210_clk.c', 'exynos4210_rng.c')) system_ss.add(when: 'CONFIG_FSL_IMX6_SRC', if_true: files('imx6_src.c')) system_ss.add(when: 'CONFIG_FSL_IMX7_GPR', if_true: files('imx7_gpr.c')) +system_ss.add(when: 'CONFIG_FSL_IMX7_SNVS', if_true: files('imx7_snvs.c')) system_ss.add(when: 'CONFIG_FSL_IMX7_SRC', if_true: files('imx7_src.c')) system_ss.add(when: 'CONFIG_FSL_IMX8MP_ANALOG', if_true: files('imx8mp_analog.c')) system_ss.add(when: 'CONFIG_FSL_IMX8MP_CCM', if_true: files('imx8mp_ccm.c'))
@@ -72,7 +73,6 @@ system_ss.add(when: 'CONFIG_IMX', if_true: files( 'imx6_ccm.c', 'imx6ul_ccm.c', 'imx7_ccm.c', - 'imx7_snvs.c', 'imx_ccm.c', )) system_ss.add(when: 'CONFIG_MAX78000_AES', if_true: files('max78000_aes.c'))
Signature · 1 line
2.56.0
Re: [PATCH v2 22/30] Kconfig: Extract config FSL_IMX7_SNVS from config IMX
Quoted 5 lines · Bernhard Beschow
Over time, QEMU has grown a number of i.MX boards and the monolithic config IMX drags in unneeded dependencies into each SoC model. Extract config
FSL_IMX7_SNVSto eventually eliminate config IMX.
Quoted 7 lines
Signed-off-by Bernhard Beschow <[email protected]>--- hw/arm/Kconfig | 5 +++++ hw/misc/Kconfig | 3 +++ hw/misc/meson.build | 2 +- 3 files changed, 9 insertions(+), 1 deletion(-)
PATCH v2 23/30 Kconfig: Extract dedicated config FSL_IMXx_CCM from config IMX
In reply to Bernhard BeschowOver time, QEMU has grown a number of i.MX boards and the monolithic config IMX drags in unneeded dependencies into each SoC model. Extract SoC-specific config FSL_IMXx_CCM to eventually eliminate config IMX.
Note that config IMX_CCM represents a base class for i.MX clock control modules which is used in i.MX timers and FlexCAN.
--- hw/arm/Kconfig | 5 +++++ hw/misc/Kconfig | 25 +++++++++++++++++++++++++ hw/misc/meson.build | 14 ++++++-------- hw/net/Kconfig | 2 +- 4 files changed, 37 insertions(+), 9 deletions(-)
hw/arm/Kconfig +5 -0
@@ -479,6 +479,7 @@ config FSL_IMX25 default y depends on TCG && ARM imply I2C_DEVICES + select FSL_IMX25_CCM select IMX select IMX_AVIC select IMX_FEC
@@ -493,6 +494,7 @@ config FSL_IMX31 default y depends on TCG && ARM imply I2C_DEVICES + select FSL_IMX31_CCM select SERIAL_MM select IMX select IMX_AVIC
@@ -505,6 +507,7 @@ config FSL_IMX6 imply PCIE_DEVICES imply I2C_DEVICES select A9MPCORE + select FSL_IMX6_CCM select FSL_IMX6_SRC select FSL_IMX7_SNVS select IMX
@@ -581,6 +584,7 @@ config FSL_IMX7 imply TEST_DEVICES imply I2C_DEVICES select A15MPCORE + select FSL_IMX7_CCM select FSL_IMX7_GPR select FSL_IMX7_SNVS select FSL_IMX7_SRC
@@ -668,6 +672,7 @@ config FSL_IMX6UL imply I2C_DEVICES select A15MPCORE select FSL_IMX6_SRC + select FSL_IMX6UL_CCM select FSL_IMX7_SNVS select IMX select IMX6UL_LCDIF
hw/misc/Kconfig +25 -0
@@ -91,15 +91,39 @@ config ECCMEMCTL config IMX bool + depends on IMX_CCM select PTIMER select SSI +config IMX_CCM + bool + config IMX_RNG bool +config FSL_IMX25_CCM + bool + select IMX_CCM + +config FSL_IMX31_CCM + bool + select IMX_CCM + +config FSL_IMX6_CCM + bool + select IMX_CCM + config FSL_IMX6_SRC bool +config FSL_IMX6UL_CCM + bool + select IMX_CCM + +config FSL_IMX7_CCM + bool + select IMX_CCM + config FSL_IMX7_GPR bool
@@ -114,6 +138,7 @@ config FSL_IMX8MP_ANALOG config FSL_IMX8MP_CCM bool + select IMX_CCM config STM32_RCC bool
hw/misc/meson.build +6 -8
@@ -60,21 +60,19 @@ system_ss.add(when: 'CONFIG_AXP2XX_PMU', if_true: files('axp2xx.c')) system_ss.add(when: 'CONFIG_REALVIEW', if_true: files('arm_sysctl.c')) system_ss.add(when: 'CONFIG_ECCMEMCTL', if_true: files('eccmemctl.c')) system_ss.add(when: 'CONFIG_EXYNOS4', if_true: files('exynos4210_pmu.c', 'exynos4210_clk.c', 'exynos4210_rng.c')) +system_ss.add(when: 'CONFIG_FSL_IMX25_CCM', if_true: files('imx25_ccm.c')) +system_ss.add(when: 'CONFIG_FSL_IMX31_CCM', if_true: files('imx31_ccm.c')) +system_ss.add(when: 'CONFIG_FSL_IMX6_CCM', if_true: files('imx6_ccm.c')) system_ss.add(when: 'CONFIG_FSL_IMX6_SRC', if_true: files('imx6_src.c')) +system_ss.add(when: 'CONFIG_FSL_IMX6UL_CCM', if_true: files('imx6ul_ccm.c')) +system_ss.add(when: 'CONFIG_FSL_IMX7_CCM', if_true: files('imx7_ccm.c')) system_ss.add(when: 'CONFIG_FSL_IMX7_GPR', if_true: files('imx7_gpr.c')) system_ss.add(when: 'CONFIG_FSL_IMX7_SNVS', if_true: files('imx7_snvs.c')) system_ss.add(when: 'CONFIG_FSL_IMX7_SRC', if_true: files('imx7_src.c')) system_ss.add(when: 'CONFIG_FSL_IMX8MP_ANALOG', if_true: files('imx8mp_analog.c')) system_ss.add(when: 'CONFIG_FSL_IMX8MP_CCM', if_true: files('imx8mp_ccm.c')) +system_ss.add(when: 'CONFIG_IMX_CCM', if_true: files('imx_ccm.c')) system_ss.add(when: 'CONFIG_IMX_RNG', if_true: files('imx_rngc.c')) -system_ss.add(when: 'CONFIG_IMX', if_true: files( - 'imx25_ccm.c', - 'imx31_ccm.c', - 'imx6_ccm.c', - 'imx6ul_ccm.c', - 'imx7_ccm.c', - 'imx_ccm.c', -)) system_ss.add(when: 'CONFIG_MAX78000_AES', if_true: files('max78000_aes.c')) system_ss.add(when: 'CONFIG_MAX78000_GCR', if_true: files('max78000_gcr.c')) system_ss.add(when: 'CONFIG_MAX78000_ICC', if_true: files('max78000_icc.c'))
hw/net/Kconfig +1 -1
@@ -160,5 +160,5 @@ config CAN_CTUCANFD_PCI config CAN_FLEXCAN bool - depends on IMX + depends on IMX_CCM select CAN_BUS
Signature · 1 line
2.56.0
Re: [PATCH v2 23/30] Kconfig: Extract dedicated config FSL_IMXx_CCM from config IMX
Quoted 8 lines · Bernhard Beschow
Over time, QEMU has grown a number of i.MX boards and the monolithic config IMX drags in unneeded dependencies into each SoC model. Extract SoC-specific config
FSL_IMXx_CCMto eventually eliminate config IMX.Note that config
IMX_CCMrepresents a base class for i.MX clock control modules which is used in i.MX timers and FlexCAN.
Quoted 8 lines
Signed-off-by Bernhard Beschow <[email protected]>--- hw/arm/Kconfig | 5 +++++ hw/misc/Kconfig | 25 +++++++++++++++++++++++++ hw/misc/meson.build | 14 ++++++-------- hw/net/Kconfig | 2 +- 4 files changed, 37 insertions(+), 9 deletions(-)
PATCH v2 24/30 Kconfig: Extract config IMX_GPT from config IMX
In reply to Bernhard BeschowOver time, QEMU has grown a number of i.MX boards and the monolithic config IMX drags in unneeded dependencies into each SoC model. Extract config IMX_GPT to eventually eliminate config IMX.
--- hw/arm/Kconfig | 7 +++++++ hw/timer/Kconfig | 5 +++++ hw/timer/meson.build | 2 +- 3 files changed, 13 insertions(+), 1 deletion(-)
hw/arm/Kconfig +7 -0
@@ -483,6 +483,7 @@ config FSL_IMX25 select IMX select IMX_AVIC select IMX_FEC + select IMX_GPT select IMX_I2C select IMX_RNG select USB_CHIPIDEA
@@ -498,6 +499,7 @@ config FSL_IMX31 select SERIAL_MM select IMX select IMX_AVIC + select IMX_GPT select IMX_I2C select WDT_IMX2 select LAN9118
@@ -512,6 +514,7 @@ config FSL_IMX6 select FSL_IMX7_SNVS select IMX select IMX_FEC + select IMX_GPT select IMX_I2C select IMX_USBPHY select CAN_FLEXCAN
@@ -592,6 +595,7 @@ config FSL_IMX7 select IMX select IMX_FEC select IMX_GPCV2 + select IMX_GPT select IMX_I2C select WDT_IMX2 select PCI_EXPRESS_DESIGNWARE
@@ -611,6 +615,7 @@ config FSL_IMX8MP select FSL_IMX8MP_CCM select IMX select IMX_FEC + select IMX_GPT select IMX_I2C select OR_IRQ select PCI_EXPRESS_DESIGNWARE
@@ -637,6 +642,7 @@ config FSL_IMX8MM select FSL_IMX8MP_CCM select IMX select IMX_FEC + select IMX_GPT select IMX_I2C select OR_IRQ select SDHCI
@@ -678,6 +684,7 @@ config FSL_IMX6UL select IMX6UL_LCDIF select IMX_FEC select IMX_GPCV2 + select IMX_GPT select IMX_I2C select IMX_USBPHY select WDT_IMX2
hw/timer/Kconfig +5 -0
@@ -23,6 +23,11 @@ config I8254 bool depends on ISA_BUS +config IMX_GPT + bool + depends on IMX_CCM + select PTIMER + config ALLWINNER_A10_PIT bool select PTIMER
hw/timer/meson.build +1 -1
@@ -16,7 +16,7 @@ system_ss.add(when: 'CONFIG_GRLIB', if_true: files('grlib_gptimer.c')) system_ss.add(when: 'CONFIG_HPET_C', if_true: files('hpet.c')) system_ss.add(when: 'CONFIG_I8254', if_true: files('i8254_common.c', 'i8254.c')) system_ss.add(when: 'CONFIG_IMX', if_true: files('imx_epit.c')) -system_ss.add(when: 'CONFIG_IMX', if_true: files('imx_gpt.c')) +system_ss.add(when: 'CONFIG_IMX_GPT', if_true: files('imx_gpt.c')) system_ss.add(when: 'CONFIG_MIPS_CPS', if_true: files('mips_gictimer.c')) system_ss.add(when: 'CONFIG_MSF2', if_true: files('mss-timer.c')) system_ss.add(when: 'CONFIG_NPCM7XX', if_true: files('npcm7xx_timer.c'))
Signature · 1 line
2.56.0
Re: [PATCH v2 24/30] Kconfig: Extract config IMX_GPT from config IMX
Quoted 5 lines · Bernhard Beschow
Over time, QEMU has grown a number of i.MX boards and the monolithic config IMX drags in unneeded dependencies into each SoC model. Extract config
IMX_GPTto eventually eliminate config IMX.
Quoted 7 lines
Signed-off-by Bernhard Beschow <[email protected]>--- hw/arm/Kconfig | 7 +++++++ hw/timer/Kconfig | 5 +++++ hw/timer/meson.build | 2 +- 3 files changed, 13 insertions(+), 1 deletion(-)
PATCH v2 25/30 Kconfig: Extract config IMX_EPIT from config IMX
In reply to Bernhard BeschowOver time, QEMU has grown a number of i.MX boards and the monolithic config IMX drags in unneeded dependencies into each SoC model. Extract config IMX_EPIT to eventually eliminate config IMX.
--- hw/arm/Kconfig | 4 ++++ hw/misc/Kconfig | 2 -- hw/timer/Kconfig | 5 +++++ hw/timer/meson.build | 2 +- 4 files changed, 10 insertions(+), 3 deletions(-)
hw/arm/Kconfig +4 -0
@@ -482,6 +482,7 @@ config FSL_IMX25 select FSL_IMX25_CCM select IMX select IMX_AVIC + select IMX_EPIT select IMX_FEC select IMX_GPT select IMX_I2C
@@ -499,6 +500,7 @@ config FSL_IMX31 select SERIAL_MM select IMX select IMX_AVIC + select IMX_EPIT select IMX_GPT select IMX_I2C select WDT_IMX2
@@ -513,6 +515,7 @@ config FSL_IMX6 select FSL_IMX6_SRC select FSL_IMX7_SNVS select IMX + select IMX_EPIT select IMX_FEC select IMX_GPT select IMX_I2C
@@ -682,6 +685,7 @@ config FSL_IMX6UL select FSL_IMX7_SNVS select IMX select IMX6UL_LCDIF + select IMX_EPIT select IMX_FEC select IMX_GPCV2 select IMX_GPT
hw/misc/Kconfig +0 -2
@@ -91,8 +91,6 @@ config ECCMEMCTL config IMX bool - depends on IMX_CCM - select PTIMER select SSI config IMX_CCM
hw/timer/Kconfig +5 -0
@@ -23,6 +23,11 @@ config I8254 bool depends on ISA_BUS +config IMX_EPIT + bool + depends on IMX_CCM + select PTIMER + config IMX_GPT bool depends on IMX_CCM
hw/timer/meson.build +1 -1
@@ -15,7 +15,7 @@ system_ss.add(when: 'CONFIG_EXYNOS4', if_true: files('exynos4210_pwm.c')) system_ss.add(when: 'CONFIG_GRLIB', if_true: files('grlib_gptimer.c')) system_ss.add(when: 'CONFIG_HPET_C', if_true: files('hpet.c')) system_ss.add(when: 'CONFIG_I8254', if_true: files('i8254_common.c', 'i8254.c')) -system_ss.add(when: 'CONFIG_IMX', if_true: files('imx_epit.c')) +system_ss.add(when: 'CONFIG_IMX_EPIT', if_true: files('imx_epit.c')) system_ss.add(when: 'CONFIG_IMX_GPT', if_true: files('imx_gpt.c')) system_ss.add(when: 'CONFIG_MIPS_CPS', if_true: files('mips_gictimer.c')) system_ss.add(when: 'CONFIG_MSF2', if_true: files('mss-timer.c'))
Signature · 1 line
2.56.0
Re: [PATCH v2 25/30] Kconfig: Extract config IMX_EPIT from config IMX
Quoted 5 lines · Bernhard Beschow
Over time, QEMU has grown a number of i.MX boards and the monolithic config IMX drags in unneeded dependencies into each SoC model. Extract config
IMX_EPITto eventually eliminate config IMX.
Quoted 8 lines
Signed-off-by Bernhard Beschow <[email protected]>--- hw/arm/Kconfig | 4 ++++ hw/misc/Kconfig | 2 -- hw/timer/Kconfig | 5 +++++ hw/timer/meson.build | 2 +- 4 files changed, 10 insertions(+), 3 deletions(-)
PATCH v2 26/30 Kconfig: Extract config GPIO_IMX from config IMX
In reply to Bernhard BeschowOver time, QEMU has grown a number of i.MX boards and the monolithic config IMX drags in unneeded dependencies into each SoC model. Extract config GPIO_IMX to eventually eliminate config IMX.
--- hw/arm/Kconfig | 7 +++++++ hw/gpio/Kconfig | 3 +++ hw/gpio/meson.build | 2 +- 3 files changed, 11 insertions(+), 1 deletion(-)
hw/arm/Kconfig +7 -0
@@ -480,6 +480,7 @@ config FSL_IMX25 depends on TCG && ARM imply I2C_DEVICES select FSL_IMX25_CCM + select GPIO_IMX select IMX select IMX_AVIC select IMX_EPIT
@@ -497,6 +498,7 @@ config FSL_IMX31 depends on TCG && ARM imply I2C_DEVICES select FSL_IMX31_CCM + select GPIO_IMX select SERIAL_MM select IMX select IMX_AVIC
@@ -514,6 +516,7 @@ config FSL_IMX6 select FSL_IMX6_CCM select FSL_IMX6_SRC select FSL_IMX7_SNVS + select GPIO_IMX select IMX select IMX_EPIT select IMX_FEC
@@ -594,6 +597,7 @@ config FSL_IMX7 select FSL_IMX7_GPR select FSL_IMX7_SNVS select FSL_IMX7_SRC + select GPIO_IMX select PCI select IMX select IMX_FEC
@@ -616,6 +620,7 @@ config FSL_IMX8MP select FSL_IMX7_SNVS select FSL_IMX8MP_ANALOG select FSL_IMX8MP_CCM + select GPIO_IMX select IMX select IMX_FEC select IMX_GPT
@@ -643,6 +648,7 @@ config FSL_IMX8MM select FSL_IMX7_SNVS select FSL_IMX8MP_ANALOG select FSL_IMX8MP_CCM + select GPIO_IMX select IMX select IMX_FEC select IMX_GPT
@@ -683,6 +689,7 @@ config FSL_IMX6UL select FSL_IMX6_SRC select FSL_IMX6UL_CCM select FSL_IMX7_SNVS + select GPIO_IMX select IMX select IMX6UL_LCDIF select IMX_EPIT
hw/gpio/Kconfig +3 -0
@@ -1,6 +1,9 @@ config PL061 bool +config GPIO_IMX + bool + config GPIO_KEY bool
hw/gpio/meson.build +1 -1
@@ -1,3 +1,4 @@ +system_ss.add(when: 'CONFIG_GPIO_IMX', if_true: files('imx_gpio.c')) system_ss.add(when: 'CONFIG_GPIO_KEY', if_true: files('gpio_key.c')) system_ss.add(when: 'CONFIG_GPIO_MPC8XXX', if_true: files('mpc8xxx.c')) system_ss.add(when: 'CONFIG_GPIO_PWR', if_true: files('gpio_pwr.c'))
@@ -6,7 +7,6 @@ system_ss.add(when: 'CONFIG_PCA9554', if_true: files('pca9554.c')) system_ss.add(when: 'CONFIG_PL061', if_true: files('pl061.c')) system_ss.add(when: 'CONFIG_ZAURUS_SCOOP', if_true: files('zaurus.c')) -system_ss.add(when: 'CONFIG_IMX', if_true: files('imx_gpio.c')) system_ss.add(when: 'CONFIG_NPCM7XX', if_true: files('npcm7xx_gpio.c')) system_ss.add(when: 'CONFIG_NRF51_SOC', if_true: files('nrf51_gpio.c')) system_ss.add(when: 'CONFIG_OMAP', if_true: files('omap_gpio.c'))
Signature · 1 line
2.56.0
Re: [PATCH v2 26/30] Kconfig: Extract config GPIO_IMX from config IMX
Quoted 5 lines · Bernhard Beschow
Over time, QEMU has grown a number of i.MX boards and the monolithic config IMX drags in unneeded dependencies into each SoC model. Extract config
GPIO_IMXto eventually eliminate config IMX.
Quoted 7 lines
Signed-off-by Bernhard Beschow <[email protected]>--- hw/arm/Kconfig | 7 +++++++ hw/gpio/Kconfig | 3 +++ hw/gpio/meson.build | 2 +- 3 files changed, 11 insertions(+), 1 deletion(-)
PATCH v2 27/30 Kconfig: Extract config IMX_SPI from config IMX
In reply to Bernhard BeschowOver time, QEMU has grown a number of i.MX boards and the monolithic config IMX drags in unneeded dependencies into each SoC model. Extract config IMX_SPI to eventually eliminate config IMX.
--- hw/arm/Kconfig | 5 +++++ hw/misc/Kconfig | 1 - hw/ssi/Kconfig | 4 ++++ hw/ssi/meson.build | 2 +- 4 files changed, 10 insertions(+), 2 deletions(-)
hw/arm/Kconfig +5 -0
@@ -522,6 +522,7 @@ config FSL_IMX6 select IMX_FEC select IMX_GPT select IMX_I2C + select IMX_SPI select IMX_USBPHY select CAN_FLEXCAN select WDT_IMX2
@@ -604,6 +605,7 @@ config FSL_IMX7 select IMX_GPCV2 select IMX_GPT select IMX_I2C + select IMX_SPI select WDT_IMX2 select PCI_EXPRESS_DESIGNWARE select SDHCI
@@ -625,6 +627,7 @@ config FSL_IMX8MP select IMX_FEC select IMX_GPT select IMX_I2C + select IMX_SPI select OR_IRQ select PCI_EXPRESS_DESIGNWARE select PCI_EXPRESS_FSL_IMX8M_PHY
@@ -653,6 +656,7 @@ config FSL_IMX8MM select IMX_FEC select IMX_GPT select IMX_I2C + select IMX_SPI select OR_IRQ select SDHCI select PCI_EXPRESS_DESIGNWARE
@@ -697,6 +701,7 @@ config FSL_IMX6UL select IMX_GPCV2 select IMX_GPT select IMX_I2C + select IMX_SPI select IMX_USBPHY select WDT_IMX2 select SDHCI
hw/misc/Kconfig +0 -1
@@ -91,7 +91,6 @@ config ECCMEMCTL config IMX bool - select SSI config IMX_CCM bool
hw/ssi/Kconfig +4 -0
@@ -32,3 +32,7 @@ config PNV_SPI config ALLWINNER_A10_SPI bool select SSI + +config IMX_SPI + bool + select SSI
hw/ssi/meson.build +1 -1
@@ -9,7 +9,7 @@ system_ss.add(when: 'CONFIG_STM32F2XX_SPI', if_true: files('stm32f2xx_spi.c')) system_ss.add(when: 'CONFIG_XILINX_SPI', if_true: files('xilinx_spi.c')) system_ss.add(when: 'CONFIG_XILINX_SPIPS', if_true: files('xilinx_spips.c')) system_ss.add(when: 'CONFIG_XLNX_VERSAL', if_true: files('xlnx-versal-ospi.c')) -system_ss.add(when: 'CONFIG_IMX', if_true: files('imx_spi.c')) +system_ss.add(when: 'CONFIG_IMX_SPI', if_true: files('imx_spi.c')) system_ss.add(when: 'CONFIG_IBEX', if_true: files('ibex_spi_host.c')) system_ss.add(when: 'CONFIG_BCM2835_SPI', if_true: files('bcm2835_spi.c')) system_ss.add(when: 'CONFIG_PNV_SPI', if_true: files('pnv_spi.c'))
Signature · 1 line
2.56.0
Re: [PATCH v2 27/30] Kconfig: Extract config IMX_SPI from config IMX
Quoted 5 lines · Bernhard Beschow
Over time, QEMU has grown a number of i.MX boards and the monolithic config IMX drags in unneeded dependencies into each SoC model. Extract config
IMX_SPIto eventually eliminate config IMX.
Quoted 8 lines
Signed-off-by Bernhard Beschow <[email protected]>--- hw/arm/Kconfig | 5 +++++ hw/misc/Kconfig | 1 - hw/ssi/Kconfig | 4 ++++ hw/ssi/meson.build | 2 +- 4 files changed, 10 insertions(+), 2 deletions(-)
PATCH v2 28/30 Kconfig: Extract config IMX_SERIAL from config IMX
In reply to Bernhard BeschowOver time, QEMU has grown a number of i.MX boards and the monolithic config IMX drags in unneeded dependencies into each SoC model. Extract config IMX_SERIAL to eventually eliminate config IMX.
--- hw/arm/Kconfig | 7 +++++++ hw/char/Kconfig | 3 +++ hw/char/meson.build | 2 +- 3 files changed, 11 insertions(+), 1 deletion(-)
hw/arm/Kconfig +7 -0
@@ -488,6 +488,7 @@ config FSL_IMX25 select IMX_GPT select IMX_I2C select IMX_RNG + select IMX_SERIAL select USB_CHIPIDEA select WDT_IMX2 select SDHCI
@@ -505,6 +506,7 @@ config FSL_IMX31 select IMX_EPIT select IMX_GPT select IMX_I2C + select IMX_SERIAL select WDT_IMX2 select LAN9118
@@ -522,6 +524,7 @@ config FSL_IMX6 select IMX_FEC select IMX_GPT select IMX_I2C + select IMX_SERIAL select IMX_SPI select IMX_USBPHY select CAN_FLEXCAN
@@ -605,6 +608,7 @@ config FSL_IMX7 select IMX_GPCV2 select IMX_GPT select IMX_I2C + select IMX_SERIAL select IMX_SPI select WDT_IMX2 select PCI_EXPRESS_DESIGNWARE
@@ -627,6 +631,7 @@ config FSL_IMX8MP select IMX_FEC select IMX_GPT select IMX_I2C + select IMX_SERIAL select IMX_SPI select OR_IRQ select PCI_EXPRESS_DESIGNWARE
@@ -656,6 +661,7 @@ config FSL_IMX8MM select IMX_FEC select IMX_GPT select IMX_I2C + select IMX_SERIAL select IMX_SPI select OR_IRQ select SDHCI
@@ -701,6 +707,7 @@ config FSL_IMX6UL select IMX_GPCV2 select IMX_GPT select IMX_I2C + select IMX_SERIAL select IMX_SPI select IMX_USBPHY select WDT_IMX2
hw/char/Kconfig +3 -0
@@ -48,6 +48,9 @@ config VIRTIO_SERIAL default y depends on VIRTIO +config IMX_SERIAL + bool + config MAX78000_UART bool
hw/char/meson.build +1 -1
@@ -3,7 +3,7 @@ system_ss.add(when: 'CONFIG_CMSDK_APB_UART', if_true: files('cmsdk-apb-uart.c')) system_ss.add(when: 'CONFIG_ESCC', if_true: files('escc.c')) system_ss.add(when: 'CONFIG_GRLIB', if_true: files('grlib_apbuart.c')) system_ss.add(when: 'CONFIG_IBEX', if_true: files('ibex_uart.c')) -system_ss.add(when: 'CONFIG_IMX', if_true: files('imx_serial.c')) +system_ss.add(when: 'CONFIG_IMX_SERIAL', if_true: files('imx_serial.c')) system_ss.add(when: 'CONFIG_IP_OCTAL_232', if_true: files('ipoctal232.c')) system_ss.add(when: 'CONFIG_ISA_BUS', if_true: files('parallel-isa.c')) system_ss.add(when: 'CONFIG_ISA_DEBUG', if_true: files('debugcon.c'))
Signature · 1 line
2.56.0
Re: [PATCH v2 28/30] Kconfig: Extract config IMX_SERIAL from config IMX
Quoted 5 lines · Bernhard Beschow
Over time, QEMU has grown a number of i.MX boards and the monolithic config IMX drags in unneeded dependencies into each SoC model. Extract config
IMX_SERIALto eventually eliminate config IMX.
Quoted 7 lines
Signed-off-by Bernhard Beschow <[email protected]>--- hw/arm/Kconfig | 7 +++++++ hw/char/Kconfig | 3 +++ hw/char/meson.build | 2 +- 3 files changed, 11 insertions(+), 1 deletion(-)
PATCH v2 29/30 Kconfig: Remove config IMX
In reply to Bernhard BeschowThe previous changes removed all uses of config IMX. Remove the now hollow config item.
--- hw/arm/Kconfig | 7 ------- hw/misc/Kconfig | 3 --- 2 files changed, 10 deletions(-)
hw/arm/Kconfig +0 -7
@@ -481,7 +481,6 @@ config FSL_IMX25 imply I2C_DEVICES select FSL_IMX25_CCM select GPIO_IMX - select IMX select IMX_AVIC select IMX_EPIT select IMX_FEC
@@ -501,7 +500,6 @@ config FSL_IMX31 select FSL_IMX31_CCM select GPIO_IMX select SERIAL_MM - select IMX select IMX_AVIC select IMX_EPIT select IMX_GPT
@@ -519,7 +517,6 @@ config FSL_IMX6 select FSL_IMX6_SRC select FSL_IMX7_SNVS select GPIO_IMX - select IMX select IMX_EPIT select IMX_FEC select IMX_GPT
@@ -603,7 +600,6 @@ config FSL_IMX7 select FSL_IMX7_SRC select GPIO_IMX select PCI - select IMX select IMX_FEC select IMX_GPCV2 select IMX_GPT
@@ -627,7 +623,6 @@ config FSL_IMX8MP select FSL_IMX8MP_ANALOG select FSL_IMX8MP_CCM select GPIO_IMX - select IMX select IMX_FEC select IMX_GPT select IMX_I2C
@@ -657,7 +652,6 @@ config FSL_IMX8MM select FSL_IMX8MP_ANALOG select FSL_IMX8MP_CCM select GPIO_IMX - select IMX select IMX_FEC select IMX_GPT select IMX_I2C
@@ -700,7 +694,6 @@ config FSL_IMX6UL select FSL_IMX6UL_CCM select FSL_IMX7_SNVS select GPIO_IMX - select IMX select IMX6UL_LCDIF select IMX_EPIT select IMX_FEC
hw/misc/Kconfig +0 -3
@@ -89,9 +89,6 @@ config IVSHMEM_FLAT_DEVICE config ECCMEMCTL bool -config IMX - bool - config IMX_CCM bool
Signature · 1 line
2.56.0
Re: [PATCH v2 29/30] Kconfig: Remove config IMX
Quoted 10 lines · Bernhard Beschow
The previous changes removed all uses of config IMX. Remove the now hollow config item.
Signed-off-by Bernhard Beschow <[email protected]>--- hw/arm/Kconfig | 7 ------- hw/misc/Kconfig | 3 --- 2 files changed, 10 deletions(-)
PATCH v2 30/30 hw/arm/fsl-imx8m: Fix typo
In reply to Bernhard BeschowThis is IMX8MP and IMX8MM, not IMX6.
--- include/hw/arm/fsl-imx8mm.h | 4 ++-- include/hw/arm/fsl-imx8mp.h | 4 ++-- hw/arm/fsl-imx8mm.c | 2 +- hw/arm/fsl-imx8mp.c | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-)
include/hw/arm/fsl-imx8mm.h +2 -2
@@ -229,8 +229,8 @@ enum FslImx8mmIrqs {FSL_IMX8MM_WDOG2_IRQ =79 ,FSL_IMX8MM_WDOG3_IRQ =10 , -FSL_IMX8MM_ENET1_MAC_IRQ =118 , -FSL_IMX6_ENET1_MAC_1588_IRQ =121 , +FSL_IMX8MM_ENET1_MAC_IRQ =118 , +FSL_IMX8MM_ENET1_MAC_1588_IRQ =121 ,FSL_IMX8MM_PCI_INTA_IRQ =122 , FSL_IMX8MM_PCI_INTB_IRQ = 123,
include/hw/arm/fsl-imx8mp.h +2 -2
@@ -276,8 +276,8 @@ enum FslImx8mpIrqs {FSL_IMX8MP_WDOG2_IRQ =79 ,FSL_IMX8MP_WDOG3_IRQ =10 , -FSL_IMX8MP_ENET1_MAC_IRQ =118 , -FSL_IMX6_ENET1_MAC_1588_IRQ =121 , +FSL_IMX8MP_ENET1_MAC_IRQ =118 , +FSL_IMX8MP_ENET1_MAC_1588_IRQ =121 ,FSL_IMX8MP_PCI_INTA_IRQ =126 , FSL_IMX8MP_PCI_INTB_IRQ = 125,
hw/arm/fsl-imx8mm.c +1 -1
@@ -589,7 +589,7 @@ static void fsl_imx8mm_realize(DeviceState *dev, Error **errp)sysbus_connect_irq (SYS_BUS_DEVICE (&s->enet),0 ,qdev_get_gpio_in (gicdev,FSL_IMX8MM_ENET1_MAC_IRQ ));sysbus_connect_irq (SYS_BUS_DEVICE (&s->enet),1 , -qdev_get_gpio_in (gicdev,FSL_IMX6_ENET1_MAC_1588_IRQ )); +qdev_get_gpio_in (gicdev,FSL_IMX8MM_ENET1_MAC_1588_IRQ ));/* SNVS */ if (!sysbus_realize (SYS_BUS_DEVICE (&s->snvs), errp)) {
hw/arm/fsl-imx8mp.c +1 -1
@@ -619,7 +619,7 @@ static void fsl_imx8mp_realize(DeviceState *dev, Error **errp)sysbus_connect_irq (SYS_BUS_DEVICE (&s->enet),0 ,qdev_get_gpio_in (gicdev,FSL_IMX8MP_ENET1_MAC_IRQ ));sysbus_connect_irq (SYS_BUS_DEVICE (&s->enet),1 , -qdev_get_gpio_in (gicdev,FSL_IMX6_ENET1_MAC_1588_IRQ )); +qdev_get_gpio_in (gicdev,FSL_IMX8MP_ENET1_MAC_1588_IRQ ));/* SNVS */ if (!sysbus_realize (SYS_BUS_DEVICE (&s->snvs), errp)) {
Signature · 1 line
2.56.0
Re: [PATCH v2 30/30] hw/arm/fsl-imx8m: Fix typo
Quoted 6 lines · Bernhard Beschow
This is IMX8MP and IMX8MM, not IMX6.
Fixes 0c105b261551 ("hw/arm/fsl-imx8mp: Add Ethernet controller")Fixes 857670200c51 ("hw/arm/fsl-imx8mm: Adding support for ENET ethernet controller")Signed-off-by Bernhard Beschow <[email protected]>
Quoted 7 lines
--- include/hw/arm/fsl-imx8mm.h | 4 ++-- include/hw/arm/fsl-imx8mp.h | 4 ++-- hw/arm/fsl-imx8mm.c | 2 +- hw/arm/fsl-imx8mp.c | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-)
RE: [EXT] [PATCH v2 30/30] hw/arm/fsl-imx8m: Fix typo
In reply to Bernhard BeschowNXP Confidential
Quoted 94 lines
-----Original Message-----
From: Bernhard Beschow <[email protected]>
Sent: 04 October 2026 17:57
To: [email protected]
Cc: Marc-André Lureau <[email protected]>; Peter Maydell <[email protected]>; Gaurav Sharma <[email protected]>; Alistair Francis <[email protected]>; Bernhard Beschow <[email protected]>; [email protected]; Philippe Mathieu-Daudé <[email protected]>; Jason Wang <[email protected]>; Paolo Bonzini <[email protected]>; Bin Meng <[email protected]>; Jean-Christophe Dubois <[email protected]>; Pierrick Bouvier <[email protected]>
Subject: [EXT] [PATCH v2 30/30] hw/arm/fsl-imx8m: Fix typoCaution: This is an external email. Please take care when clicking links or opening attachments. When in doubt, report the message using the 'Report this email' button
This is IMX8MP and IMX8MM, not IMX6.
Fixes 0c105b261551 ("hw/arm/fsl-imx8mp: Add Ethernet controller")Fixes 857670200c51 ("hw/arm/fsl-imx8mm: Adding support for ENETethernet controller")
Signed-off-by Bernhard Beschow <[email protected]>--- include/hw/arm/fsl-imx8mm.h | 4 ++-- include/hw/arm/fsl-imx8mp.h | 4 ++-- hw/arm/fsl-imx8mm.c | 2 +- hw/arm/fsl-imx8mp.c | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-)include/hw/arm/fsl-imx8mm.h +2
-2@@ -229,8 +229,8 @@ enum FslImx8mmIrqs {FSL_IMX8MM_WDOG2_IRQ =79 ,FSL_IMX8MM_WDOG3_IRQ =10 , -FSL_IMX8MM_ENET1_MAC_IRQ =118 , -FSL_IMX6_ENET1_MAC_1588_IRQ =121 , +FSL_IMX8MM_ENET1_MAC_IRQ =118 , +FSL_IMX8MM_ENET1_MAC_1588_IRQ =121 ,FSL_IMX8MM_PCI_INTA_IRQ =122 , FSL_IMX8MM_PCI_INTB_IRQ = 123,include/hw/arm/fsl-imx8mp.h +2
-2@@ -276,8 +276,8 @@ enum FslImx8mpIrqs {FSL_IMX8MP_WDOG2_IRQ =79 ,FSL_IMX8MP_WDOG3_IRQ =10 , -FSL_IMX8MP_ENET1_MAC_IRQ =118 , -FSL_IMX6_ENET1_MAC_1588_IRQ =121 , +FSL_IMX8MP_ENET1_MAC_IRQ =118 , +FSL_IMX8MP_ENET1_MAC_1588_IRQ =121 ,FSL_IMX8MP_PCI_INTA_IRQ =126 , FSL_IMX8MP_PCI_INTB_IRQ = 125,hw/arm/fsl-imx8mm.c index renamed from hw/arm/fsl-imx8mm.c +0
-0
875e92bb34..dd79188e0c100644hw/arm/fsl-imx8mm.c +2
-1@@ -589,7 +589,7 @@ static void fsl_imx8mm_realize(DeviceState *dev, Error **errp)sysbus_connect_irq (SYS_BUS_DEVICE (&s->enet),0 ,qdev_get_gpio_in (gicdev,FSL_IMX8MM_ENET1_MAC_IRQ ));sysbus_connect_irq (SYS_BUS_DEVICE (&s->enet),1 , -qdev_get_gpio_in (gicdev,FSL_IMX6_ENET1_MAC_1588_IRQ )); +qdev_get_gpio_in (gicdev, +FSL_IMX8MM_ENET1_MAC_1588_IRQ ));/* SNVS */ if (!sysbus_realize(SYS_BUS_DEVICE(&s->snvs), errp)) { diff --git
a/hw/arm/fsl-imx8mp.cb/hw/arm/fsl-imx8mp.cindexbcd91739d9..0b46a4971f100644hw/arm/fsl-imx8mp.c +2
-2@@ -619,7 +619,7 @@ static void fsl_imx8mp_realize(DeviceState *dev, Error **errp)sysbus_connect_irq (SYS_BUS_DEVICE (&s->enet),0 ,qdev_get_gpio_in (gicdev,FSL_IMX8MP_ENET1_MAC_IRQ ));sysbus_connect_irq (SYS_BUS_DEVICE (&s->enet),1 , -qdev_get_gpio_in (gicdev,FSL_IMX6_ENET1_MAC_1588_IRQ )); +qdev_get_gpio_in (gicdev, +FSL_IMX8MP_ENET1_MAC_1588_IRQ ));/* SNVS */ if (!sysbus_realize (SYS_BUS_DEVICE (&s->snvs), errp)) { --
Quoted 1 line
2.56.0