Skip to content

hw/aspeed: Convert all Aspeed devices to DEFINE_TYPES() with inlined TypeInfo

Jamin Lin qemu-arm qemu-devel 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest24 patches 1 replyIn review

Changes in v1 from the cover letter

The changes are purely mechanical refactoring with no functional difference. The 24 patches cover all Aspeed-related device models across hw/adc, hw/arm, hw/fsi, hw/gpio, hw/i2c, hw/intc, hw/misc, hw/net, hw/nvram, hw/pci-host, hw/rtc, hw/ssi, hw/timer and hw/watchdog.

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/24hw/misc/aspeed_hace: Convert to DEFINE_TYPES() with inlined TypeInfohw/misc/aspeed_hace.c+34 -470 replies
2/24hw/misc/aspeed_lpc: Convert to DEFINE_TYPES() with inlined TypeInfohw/misc/aspeed_lpc.c+9 -120 replies
3/24hw/misc/aspeed_ltpi: Convert to DEFINE_TYPES() with inlined TypeInfohw/misc/aspeed_ltpi.c+8 -110 replies
4/24hw/misc/aspeed_pwm: Convert to DEFINE_TYPES() with inlined TypeInfohw/misc/aspeed_pwm.c+8 -110 replies
5/24hw/misc/aspeed_sbc: Convert to DEFINE_TYPES() with inlined TypeInfohw/misc/aspeed_sbc.c+20 -260 replies
6/24hw/misc/aspeed_scu: Convert to DEFINE_TYPES() with inlined TypeInfohw/misc/aspeed_scu.c+46 -610 replies
7/24hw/misc/aspeed_sdmc: Convert to DEFINE_TYPES() with inlined TypeInfohw/misc/aspeed_sdmc.c+31 -420 replies
8/24hw/misc:aspeed_sli: Convert to DEFINE_TYPES() with inlined TypeInfohw/misc/aspeed_sli.c+19 -250 replies
9/24hw/misc/aspeed_xdma: Convert to DEFINE_TYPES() with inlined TypeInfohw/misc/aspeed_xdma.c+25 -330 replies
10/24hw/adc/aspeed_adc: Convert to DEFINE_TYPES() with inlined TypeInfohw/adc/aspeed_adc.c+40 -550 replies
11/24hw/arm/aspeed_ast1700: Convert to DEFINE_TYPES() with inlined TypeInfohw/arm/aspeed_ast1700.c+9 -120 replies
12/24hw/gpio/aspeed_gpio: Convert to DEFINE_TYPES() with inlined TypeInfohw/gpio/aspeed_gpio.c+46 -610 replies
13/24hw/gpio/aspeed_sgpio: Convert to DEFINE_TYPES() with inlined TypeInfohw/gpio/aspeed_sgpio.c+16 -210 replies
14/24hw/intc/aspeed_intc: convert to DEFINE_TYPES() with inlined TypeInfohw/intc/aspeed_intc.c+51 -700 replies
15/24hw/intc/aspeed_vic: Convert to DEFINE_TYPES() with inlined TypeInfohw/intc/aspeed_vic.c+8 -110 replies
16/24hw/rtc/aspeed_rtc: Convert to DEFINE_TYPES() with inlined TypeInfohw/rtc/aspeed_rtc.c+8 -110 replies
17/24hw/watchdog/wdt_aspeed: Convert to DEFINE_TYPES() with inlined TypeInfohw/watchdog/wdt_aspeed.c+40 -530 replies
18/24hw/nvram/aspeed_otp: Convert to DEFINE_TYPES() with inlined TypeInfohw/nvram/aspeed_otp.c+8 -110 replies
19/24hw/timer/aspeed_timer: Convert to DEFINE_TYPES() with inlined TypeInfohw/timer/aspeed_timer.c+35 -480 replies
20/24hw/fsi/aspeed_apb2opb: Convert to DEFINE_TYPES() with inlined TypeInfohw/fsi/aspeed_apb2opb.c+18 -240 replies
21/24hw/pci-host/aspeed_pcie: Convert to DEFINE_TYPES() with inlined TypeInfohw/pci-host/aspeed_pcie.c+41 -530 replies
22/24hw/i2c/aspeed_i2c: Convert to DEFINE_TYPES() with inlined TypeInfohw/i2c/aspeed_i2c.c+48 -650 replies
23/24hw/net/ftgmac100: Convert to DEFINE_TYPES() with inlined TypeInfohw/net/ftgmac100.c+14 -180 replies
24/24hw/ssi/aspeed_smc: Convert to DEFINE_TYPES() with inlined TypeInfohw/ssi/aspeed_smc.c+96 -1320 replies

Reviews trailers per patch

None of the 24 patches has a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchCédric Le Goater
SeriesR-b
1/24
2/24
3/24
4/24
5/24
6/24
7/24
8/24
9/24
10/24
11/24
12/24
13/24
14/24
15/24
16/24
17/24
18/24
19/24
20/24
21/24
22/24
23/24
24/24

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH v1 00/24] hw/aspeed: Convert all Aspeed devices to DEFINE_TYPES() with inlined TypeInfo

The QEMU community now prefers the DEFINE_TYPES() macro over the legacy type_register_static()/type_init() pattern for device type registration. DEFINE_TYPES() accepts an array of TypeInfo structs and registers them all in a single call, making the registration code more concise and consistent with modern QEMU coding style.

This series converts all Aspeed device models to use DEFINE_TYPES() and further inlines the individual static TypeInfo variable declarations directly into the types array, eliminating the need for standalone TypeInfo variables scattered throughout each file.

v1:
The changes are purely mechanical refactoring with no functional difference. The 24 patches cover all Aspeed-related device models across hw/adc, hw/arm, hw/fsi, hw/gpio, hw/i2c, hw/intc, hw/misc, hw/net, hw/nvram, hw/pci-host, hw/rtc, hw/ssi, hw/timer and hw/watchdog.

Jamin Lin (24):
hw/misc/aspeed_hace: Convert to DEFINE_TYPES() with inlined TypeInfo hw/misc/aspeed_lpc: Convert to DEFINE_TYPES() with inlined TypeInfo hw/misc/aspeed_ltpi: Convert to DEFINE_TYPES() with inlined TypeInfo hw/misc/aspeed_pwm: Convert to DEFINE_TYPES() with inlined TypeInfo hw/misc/aspeed_sbc: Convert to DEFINE_TYPES() with inlined TypeInfo hw/misc/aspeed_scu: Convert to DEFINE_TYPES() with inlined TypeInfo hw/misc/aspeed_sdmc: Convert to DEFINE_TYPES() with inlined TypeInfo hw/misc:aspeed_sli: Convert to DEFINE_TYPES() with inlined TypeInfo hw/misc/aspeed_xdma: Convert to DEFINE_TYPES() with inlined TypeInfo hw/adc/aspeed_adc: Convert to DEFINE_TYPES() with inlined TypeInfo hw/arm/aspeed_ast1700: Convert to DEFINE_TYPES() with inlined TypeInfo hw/gpio/aspeed_gpio: Convert to DEFINE_TYPES() with inlined TypeInfo hw/gpio/aspeed_sgpio: Convert to DEFINE_TYPES() with inlined TypeInfo hw/intc/aspeed_intc: convert to DEFINE_TYPES() with inlined TypeInfo hw/intc/aspeed_vic: Convert to DEFINE_TYPES() with inlined TypeInfo hw/rtc/aspeed_rtc: Convert to DEFINE_TYPES() with inlined TypeInfo hw/watchdog/wdt_aspeed: Convert to DEFINE_TYPES() with inlined
TypeInfo
hw/nvram/aspeed_otp: Convert to DEFINE_TYPES() with inlined TypeInfo hw/timer/aspeed_timer: Convert to DEFINE_TYPES() with inlined TypeInfo hw/fsi/aspeed_apb2opb: Convert to DEFINE_TYPES() with inlined TypeInfo hw/pci-host/aspeed_pcie: Convert to DEFINE_TYPES() with inlined
TypeInfo
hw/i2c/aspeed_i2c: Convert to DEFINE_TYPES() with inlined TypeInfo hw/net/ftgmac100: Convert to DEFINE_TYPES() with inlined TypeInfo hw/ssi/aspeed_smc: Convert to DEFINE_TYPES() with inlined TypeInfo

 hw/adc/aspeed_adc.c       |  95 +++++++---------
 hw/arm/aspeed_ast1700.c   |  21 ++--
 hw/fsi/aspeed_apb2opb.c   |  42 +++----
 hw/gpio/aspeed_gpio.c     | 107 ++++++++----------
 hw/gpio/aspeed_sgpio.c    |  37 +++----
 hw/i2c/aspeed_i2c.c       | 113 ++++++++-----------
 hw/intc/aspeed_intc.c     | 121 +++++++++-----------
 hw/intc/aspeed_vic.c      |  19 ++--
 hw/misc/aspeed_hace.c     |  81 ++++++--------
 hw/misc/aspeed_lpc.c      |  21 ++--
 hw/misc/aspeed_ltpi.c     |  19 ++--
 hw/misc/aspeed_pwm.c      |  19 ++--
 hw/misc/aspeed_sbc.c      |  46 ++++----
 hw/misc/aspeed_scu.c      | 107 ++++++++----------
 hw/misc/aspeed_sdmc.c     |  73 ++++++------
 hw/misc/aspeed_sli.c      |  44 ++++----
 hw/misc/aspeed_xdma.c     |  58 +++++-----
 hw/net/ftgmac100.c        |  32 +++---
 hw/nvram/aspeed_otp.c     |  19 ++--
 hw/pci-host/aspeed_pcie.c |  94 +++++++---------
 hw/rtc/aspeed_rtc.c       |  19 ++--
 hw/ssi/aspeed_smc.c       | 228 ++++++++++++++++----------------------
 hw/timer/aspeed_timer.c   |  83 ++++++--------
 hw/watchdog/wdt_aspeed.c  |  93 +++++++---------
 24 files changed, 678 insertions(+), 913 deletions(-)
Signature · 1 line
2.43.0