Skip to content

hw/nvram/eeprom_at24c: Cleanup + FRUID EEPROM init example

Peter Delevoryas qemu-arm qemu-devel 5 versions – New

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v5 Latest5 patches 0 repliesNew
  2. v45 patches 19 repliesSuperseded
  3. v35 patches 6 repliesSuperseded
Earlier versions · 2
VersionPostedPatchesRepliesStatus
v25 patches13 repliesSuperseded
v16 patches17 repliesSuperseded

Changes in v5 from the cover letter

- Added review tags from Corey
- Added tested-by tag from Ninad
- Switched back to i2c_slave_new in eeprom_at24c.c
- Switched back to "extern const size_t fby35_*_len" in aspeed_eeprom.h

Patches in v5 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/5hw/arm: Extract at24c_eeprom_init helper from Aspeed and Nuvoton boardshw/arm/aspeed.c hw/arm/npcm7xx_boards.c hw/nvram/eeprom_at24c.c +1 more+41 -240 replies
2/5hw/arm/aspeed: Replace aspeed_eeprom_init with at24c_eeprom_inithw/arm/aspeed.c+43 -520 replies
3/5hw/nvram/eeprom_at24c: Add init_rom field and at24c_eeprom_init_rom helperhw/nvram/eeprom_at24c.c include/hw/nvram/eeprom_at24c.h+47 -50 replies
4/5hw/arm/aspeed: Add aspeed_eeprom.chw/arm/aspeed.c hw/arm/aspeed_eeprom.c hw/arm/aspeed_eeprom.h +1 more+109 -30 replies
5/5hw/nvram/eeprom_at24c: Make reset behavior more like hardwarehw/nvram/eeprom_at24c.c+10 -120 replies

Reviews trailers per patch

All 5 patches have a Reviewed-by or Acked-by.

PatchCédric Le GoaterPhilippe Mathieu-DaudéJoel StanleyCorey MinyardNinad Palsule
1/5R-b R-b R-b
2/5R-b R-b R-b R-b
3/5R-b R-b R-b T-b
4/5R-b R-b R-b
5/5R-b R-b R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 5 reviewers.

Read the v5 thread

Cover letter [PATCH v5 0/5] hw/nvram/eeprom_at24c: Cleanup + FRUID EEPROM init example

v1: https://lore.kernel.org/qemu-devel/[email protected]/
v2:
- Squashed 3 commits from original series into extract helper commit
- Dropped last 2 commits from original series
- Changed at24c_eeprom_init to return the I2CSlave object
- Added commit to introduce at24c-eeprom "init_rom" attribute
- Added aspeed_eeprom.c and fby35-bmc BMC FRUID EEPROM initialization
- Added commit to change reset behavior for at24c-eeprom (optional)
v3:
- Added doc comments to function headers
- Added fby35 NIC and baseboard EEPROM's (to illustrate 2+ EEPROM's)
- Replaced "extern uint32 fby35_bmc_fruid_size" by adding explicit array sizes, e.g. "extern uint8_t fby35_bmc_fruid[200]".
- Fixed Meta Platforms licenses by adding SPDX-License-Identifier for GPL2.
- Moved ee->init_rom initialization code before ee->blk, so that -drive property overrides init_rom initialization. This gives more flexibility (people can override contents of an AT24C EEPROM using a file for debugging/prototyping) while still allowing the init_rom data to be specified for a board for default behavior.
v4:
- Moved at24c_eeprom_init_rom doc comment to the patch introducing the
function (moved from patch 4/5 to patch 3/5).
- Added review tags from Joel
v5:
- Added review tags from Corey
- Added tested-by tag from Ninad
- Switched back to i2c_slave_new in eeprom_at24c.c
- Switched back to "extern const size_t fby35_*_len" in aspeed_eeprom.h

NOTE: I rebased on the latest master and tlb exec segfaults in "Starting kernel" for fby35-bmc: I'll make a bug report separately. I've kept the base on 7c9236d6d61f because of this.

Thanks,
Peter

Peter Delevoryas (5):
hw/arm: Extract at24c_eeprom_init helper from Aspeed and Nuvoton
boards
hw/arm/aspeed: Replace aspeed_eeprom_init with at24c_eeprom_init hw/nvram/eeprom_at24c: Add init_rom field and at24c_eeprom_init_rom
helper
hw/arm/aspeed: Add aspeed_eeprom.c hw/nvram/eeprom_at24c: Make reset behavior more like hardware

 hw/arm/aspeed.c                 | 109 ++++++++++++++------------------
 hw/arm/aspeed_eeprom.c          |  82 ++++++++++++++++++++++++
 hw/arm/aspeed_eeprom.h          |  19 ++++++
 hw/arm/meson.build              |   1 +
 hw/arm/npcm7xx_boards.c         |  20 ++----
 hw/nvram/eeprom_at24c.c         |  58 +++++++++++++----
 include/hw/nvram/eeprom_at24c.h |  39 ++++++++++++
 7 files changed, 241 insertions(+), 87 deletions(-)
 create mode 100644 hw/arm/aspeed_eeprom.c
 create mode 100644 hw/arm/aspeed_eeprom.h
 create mode 100644 include/hw/nvram/eeprom_at24c.h
Signature · 1 line
2.39.0