Skip to content

hw/i2c/aspeed: Introduce 'bus-label' to customize bus naming

Kane Chen via qemu-arm qemu-devel 1 version Applied

Status from this message: Applied to aspeed-next.

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest1 patch 17 repliesApplied

Patches in v1 Applied

#Subject and filesSizeRepliesApplied
1/1hw/i2c/aspeed: Introduce 'bus-label' to customize bus naminghw/i2c/aspeed_i2c.c include/hw/i2c/aspeed_i2c.h+23 -67 replies

Reviews trailers per patch

The patch has a Reviewed-by or Acked-by.

PatchNabih EstefanCédric Le Goater
1/1T-b R-b R-b

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 0/1] hw/i2c/aspeed: Introduce 'bus-label' to customize bus naming

From: Kane-Chen-AS <[email protected]>

Currently, the Aspeed I2C controller uses a static naming convention for its buses (e.g., "aspeed.i2c.bus.0"). This approach leads to object name conflicts in machine models that incorporate multiple I2C controllers, such as an Aspeed SoC paired with an external IO expander or a co-processor like the AST1700.

This patch series introduces a 'bus-label' property to the Aspeed I2C controller. By setting this property, higher-level platform code (e.g., the SoC realize function) can provide a unique prefix for the I2C buses.

Changes in v1:

Added bus-label property to AspeedI2CState.
Added bus-name property to AspeedI2CBus.
Modified aspeed_i2c_realize to generate bus names based on the label. Updated aspeed_i2c_bus_realize to use the customized name for bus initialization and memory region naming.

Example usage: If a controller's bus-label is set to "ioexp0", its buses will be named "ioexp0.0", "ioexp0.1", etc., instead of the default "aspeed.i2c.bus.0".

Any feedback or suggestions are appreciated.

Best Regards,
Kane

Kane-Chen-AS (1):
hw/i2c/aspeed: Introduce 'bus-label' to customize bus naming

 include/hw/i2c/aspeed_i2c.h |  2 ++
 hw/i2c/aspeed_i2c.c         | 27 +++++++++++++++++++++------
 2 files changed, 23 insertions(+), 6 deletions(-)
Signature · 1 line
2.43.0