qemu-arm
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 6/6] hw/arm/aspeed: Init fby35 BMC FRUID EEPROM


From: Philippe Mathieu-Daudé
Subject: Re: [PATCH 6/6] hw/arm/aspeed: Init fby35 BMC FRUID EEPROM
Date: Mon, 16 Jan 2023 13:30:19 +0100
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.6.1

On 14/1/23 18:01, Peter Delevoryas wrote:
Signed-off-by: Peter Delevoryas <peter@pjd.dev>
---
  hw/arm/aspeed.c | 49 +++++++++++++++++++++++++++++++++++++++++++++++++
  1 file changed, 49 insertions(+)

diff --git a/hw/arm/aspeed.c b/hw/arm/aspeed.c
index c929c61d582a..4ac8ff11a835 100644
--- a/hw/arm/aspeed.c
+++ b/hw/arm/aspeed.c
@@ -922,6 +922,52 @@ static void bletchley_bmc_i2c_init(AspeedMachineState *bmc)
      i2c_slave_create_simple(i2c[12], TYPE_PCA9552, 0x67);
  }
+static const uint8_t fby35_bmc_fruid[] = {
[...]

+};
+
  static void fby35_i2c_init(AspeedMachineState *bmc)
  {
      AspeedSoCState *soc = &bmc->soc;
@@ -1363,6 +1409,9 @@ static void fby35_reset(MachineState *state, 
ShutdownCause reason)
      object_property_set_bool(OBJECT(gpio), "gpioB3", false, &error_fatal);
      object_property_set_bool(OBJECT(gpio), "gpioB4", false, &error_fatal);
      object_property_set_bool(OBJECT(gpio), "gpioB5", false, &error_fatal);
+
+    at24c_eeprom_write(aspeed_i2c_get_bus(&bmc->soc.i2c, 11),
+                       0x54, 0, fby35_bmc_fruid, sizeof(fby35_bmc_fruid));

Why transfer the prom content on the i2c bus at each reset?

In particular this looks wrong if the prom is initialized with a 'drive'
block backend (using -global).

  }





reply via email to

[Prev in Thread] Current Thread [Next in Thread]