]> git.ipfire.org Git - thirdparty/qemu.git/commit
hw/arm/aspeed: Split Supermicro X11SPI machine into a separate file for maintainability
authorJamin Lin <jamin_lin@aspeedtech.com>
Tue, 4 Nov 2025 03:12:50 +0000 (11:12 +0800)
committerCédric Le Goater <clg@redhat.com>
Tue, 4 Nov 2025 08:27:58 +0000 (09:27 +0100)
commit4121d4ee74fe27e0e7f55e6f39c04c6fcf1e76f1
tree3eb69ecd144f3d8cbe63ef9a92e90a4fb184f987
parent1a1f476b74e6d42bbf9c7f57a5e755ffc83785a5
hw/arm/aspeed: Split Supermicro X11SPI machine into a separate file for maintainability

This commit moves the Supermicro X11SPI BMC machine definition from
aspeed.c into a new standalone file aspeed_ast2500_supermicro-x11spi.c,
and adds a dedicated I²C initialization function for the platform.

The refactor continues the effort to modularize Aspeed platform support,
ensuring each machine model is defined in its own source file. This improves
code organization, readability, and simplifies maintenance when adding or
modifying platform-specific behavior.

Previously, the Supermicro X11SPI machine reused
palmetto_bmc_i2c_init() for its I²C setup. To make the machine
definition fully self-contained, the function was copied and renamed
to supermicro_x11spi_bmc_i2c_init(). This ensures that the machine
can evolve independently without depending on Palmetto’s board logi

Key updates include:
- Moved SUPERMICRO_X11SPI_BMC_HW_STRAP1 macro and machine class init
(aspeed_machine_supermicro_x11spi_bmc_class_init) into a new file.
- Added new function supermicro_x11spi_bmc_i2c_init() copied from
palmetto_bmc_i2c_init() for independent control.
- Updated the machine definition to use the new I²C init function.
- Registered the new source file in meson.build.
- Removed all Supermicro X11SPI-related definitions from aspeed.c.

No functional changes.

Signed-off-by: Jamin Lin <jamin_lin@aspeedtech.com>
Reviewed-by: Cédric Le Goater <clg@redhat.com>
Link: https://lore.kernel.org/qemu-devel/20251104031325.146374-13-jamin_lin@aspeedtech.com
Signed-off-by: Cédric Le Goater <clg@redhat.com>
hw/arm/aspeed.c
hw/arm/aspeed_ast2500_supermicro-x11spi.c [new file with mode: 0644]
hw/arm/meson.build