diff options
| author | Emmanuel Blot <emmanuel.blot@free.fr> | 2026-07-31 12:45:14 +0200 |
|---|---|---|
| committer | Cédric Le Goater <clg@redhat.com> | 2026-09-05 07:05:11 +0200 |
| commit | b03939c997d7523c4ee276eb4f2724efb88d7320 (patch) | |
| tree | 783d8ede6ece9411424cd4607d7b232b4b996209 | |
| parent | f3ad6d3eacb7b08081f26f4861bcbd4a5283bf5c (diff) | |
| download | qemu-b03939c997d7523c4ee276eb4f2724efb88d7320.tar.gz qemu-b03939c997d7523c4ee276eb4f2724efb88d7320.zip | |
hw/arm: fuji: use the real TMP75 and LM75B temperature sensors
The Fuji BMC instantiates many ti,tmp75 sensors and several NXP LM75B
sensors; the original board code approximated both with a plain TMP105
via local TYPE_TMP75 and TYPE_LM75 aliases (the latter mislabelling the
LM75B parts as LM75).
Now that hw/sensor/tmp105.h provides proper TMP75 and LM75B models, drop
the local aliases (and their guards) and instantiate the accurate
devices.
Signed-off-by: Emmanuel Blot <emmanuel.blot@free.fr>
Reviewed-by: Cédric Le Goater <clg@redhat.com>
Link: https://lore.kernel.org/qemu-devel/20260731-sanmiguel-bmc-locator-v2-15-1266926ba769@free.fr
Signed-off-by: Cédric Le Goater <clg@redhat.com>
| -rw-r--r-- | hw/arm/aspeed_ast2600_fuji.c | 22 |
1 files changed, 7 insertions, 15 deletions
diff --git a/hw/arm/aspeed_ast2600_fuji.c b/hw/arm/aspeed_ast2600_fuji.c index 6318aa606b..dae0239387 100644 --- a/hw/arm/aspeed_ast2600_fuji.c +++ b/hw/arm/aspeed_ast2600_fuji.c @@ -14,14 +14,6 @@ #include "hw/sensor/tmp105.h" #include "hw/nvram/eeprom_at24c.h" -/* - * Guard the aliases against the TYPE_TMP75 that hw/sensor/tmp105.h now defines; - * TYPE_LM75 is guarded too for consistency (no LM75 model exists yet). - */ -#undef TYPE_LM75 -#define TYPE_LM75 TYPE_TMP105 -#undef TYPE_TMP75 -#define TYPE_TMP75 TYPE_TMP105 #define TYPE_TMP422 "tmp422" /* Fuji hardware value */ @@ -62,8 +54,8 @@ static void fuji_bmc_i2c_init(AspeedMachineState *bmc) get_pca9548_channels(i2c[40 + i], 0x76, &i2c[80 + i * 8]); } - i2c_slave_create_simple(i2c[17], TYPE_LM75, 0x4c); - i2c_slave_create_simple(i2c[17], TYPE_LM75, 0x4d); + i2c_slave_create_simple(i2c[17], TYPE_LM75B, 0x4c); + i2c_slave_create_simple(i2c[17], TYPE_LM75B, 0x4d); /* * EEPROM 24c64 size is 64Kbits or 8 Kbytes @@ -73,15 +65,15 @@ static void fuji_bmc_i2c_init(AspeedMachineState *bmc) at24c_eeprom_init(i2c[20], 0x50, 256); at24c_eeprom_init(i2c[22], 0x52, 256); - i2c_slave_create_simple(i2c[3], TYPE_LM75, 0x48); - i2c_slave_create_simple(i2c[3], TYPE_LM75, 0x49); - i2c_slave_create_simple(i2c[3], TYPE_LM75, 0x4a); + i2c_slave_create_simple(i2c[3], TYPE_LM75B, 0x48); + i2c_slave_create_simple(i2c[3], TYPE_LM75B, 0x49); + i2c_slave_create_simple(i2c[3], TYPE_LM75B, 0x4a); i2c_slave_create_simple(i2c[3], TYPE_TMP422, 0x4c); at24c_eeprom_init(i2c[8], 0x51, 8 * KiB); - i2c_slave_create_simple(i2c[8], TYPE_LM75, 0x4a); + i2c_slave_create_simple(i2c[8], TYPE_LM75B, 0x4a); - i2c_slave_create_simple(i2c[50], TYPE_LM75, 0x4c); + i2c_slave_create_simple(i2c[50], TYPE_LM75B, 0x4c); at24c_eeprom_init(i2c[50], 0x52, 8 * KiB); i2c_slave_create_simple(i2c[51], TYPE_TMP75, 0x48); i2c_slave_create_simple(i2c[52], TYPE_TMP75, 0x49); |
