[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 5/5] aspeed: g220a-bmc: Add an FRU
From: |
Cédric Le Goater |
Subject: |
[PULL 5/5] aspeed: g220a-bmc: Add an FRU |
Date: |
Thu, 10 Dec 2020 13:51:15 +0100 |
From: John Wang <wangzhiqiang.bj@bytedance.com>
Add an eeprom device and fill it with fru
information
$ ipmitool fru print 0
Product Manufacturer : Bytedance
Product Name : G220A
Signed-off-by: John Wang <wangzhiqiang.bj@bytedance.com>
Reviewed-by: Cédric Le Goater <clg@kaod.org>
Message-Id: <20201210103607.556-1-wangzhiqiang.bj@bytedance.com>
Signed-off-by: Cédric Le Goater <clg@kaod.org>
---
hw/arm/aspeed.c | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/hw/arm/aspeed.c b/hw/arm/aspeed.c
index aee00ba8d682..bfe2051cfed4 100644
--- a/hw/arm/aspeed.c
+++ b/hw/arm/aspeed.c
@@ -615,6 +615,18 @@ static void g220a_bmc_i2c_init(AspeedMachineState *bmc)
object_property_set_int(OBJECT(dev), "temperature0", 31000, &error_abort);
object_property_set_int(OBJECT(dev), "temperature1", 28000, &error_abort);
object_property_set_int(OBJECT(dev), "temperature2", 20000, &error_abort);
+
+ static uint8_t eeprom_buf[2 * 1024] = {
+ 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0xfe,
+ 0x01, 0x06, 0x00, 0xc9, 0x42, 0x79, 0x74, 0x65,
+ 0x64, 0x61, 0x6e, 0x63, 0x65, 0xc5, 0x47, 0x32,
+ 0x32, 0x30, 0x41, 0xc4, 0x41, 0x41, 0x42, 0x42,
+ 0xc4, 0x43, 0x43, 0x44, 0x44, 0xc4, 0x45, 0x45,
+ 0x46, 0x46, 0xc4, 0x48, 0x48, 0x47, 0x47, 0xc1,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa7,
+ };
+ smbus_eeprom_init_one(aspeed_i2c_get_bus(&soc->i2c, 4), 0x57,
+ eeprom_buf);
}
static bool aspeed_get_mmio_exec(Object *obj, Error **errp)
--
2.26.2
- [PULL 0/5] aspeed queue, Cédric Le Goater, 2020/12/10
- [PULL 5/5] aspeed: g220a-bmc: Add an FRU,
Cédric Le Goater <=
- [PULL 2/5] aspeed: Add support for the g220a-bmc board, Cédric Le Goater, 2020/12/10
- [PULL 1/5] hw/misc: add an EMC141{3,4} device model, Cédric Le Goater, 2020/12/10
- [PULL 4/5] aspeed/smc: Add support for address lane disablement, Cédric Le Goater, 2020/12/10
- [PULL 3/5] ast2600: SRAM is 89KB, Cédric Le Goater, 2020/12/10
- Re: [PULL 0/5] aspeed queue, Peter Maydell, 2020/12/10