Skip to content

RFC aspeed: i2c: Add new mode support

Joe Komlodi qemu-devel 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 RFC Latest7 patches 5 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/7hw/registerfields: Add shared fields macrosinclude/hw/registerfields.h+70 -01 reply
2/7aspeed: i2c: Add ctrl_global_rsvd propertyhw/arm/aspeed_ast2600.c hw/i2c/aspeed_i2c.c include/hw/i2c/aspeed_i2c.h+8 -01 reply
3/7aspeed: i2c: Migrate to registerfields APIhw/i2c/aspeed_i2c.c+196 -1970 replies
4/7aspeed: i2c: Use reg array instead of individual varshw/i2c/aspeed_i2c.c include/hw/i2c/aspeed_i2c.h+133 -1641 reply
5/7aspeed: i2c: Add new mode supporthw/i2c/aspeed_i2c.c include/hw/i2c/aspeed_i2c.h+653 -1950 replies
6/7aspeed: i2c: Add PKT_DONE IRQ to tracehw/i2c/aspeed_i2c.c hw/i2c/trace-events+4 -11 reply
7/7aspeed: i2c: Move regs and helpers to header filehw/i2c/aspeed_i2c.c include/hw/i2c/aspeed_i2c.h+267 -2660 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [RFC PATCH 0/7] aspeed: i2c: Add new mode support

Hi all,

This series migrates the Aspeed I2C controller to use the register API, and then adds new mode support.

New mode has some behavior changes and a register layout change compared to old mode.

The series starts by adding "shared field" macros to help simplify logic when adding new mode.
Generally, the macros are to be used in cases where register locations change depending on what mode a peripheral is operating in, but the fields in those registers have the same offsets. Specifically, this happens very frequently with new and old I2C modes on Aspeed I2C.

After that we migrate over to the register API and then add new mode support.

Thanks!
Joe

Joe Komlodi (7):
hw/registerfields: Add shared fields macros
aspeed: i2c: Add ctrl_global_rsvd property
aspeed: i2c: Migrate to registerfields API
aspeed: i2c: Use reg array instead of individual vars
aspeed: i2c: Add new mode support
aspeed: i2c: Add PKT_DONE IRQ to trace
aspeed: i2c: Move regs and helpers to header file

 hw/arm/aspeed_ast2600.c     |   2 +
 hw/i2c/aspeed_i2c.c         | 792 ++++++++++++++++++++++--------------
 hw/i2c/trace-events         |   2 +-
 include/hw/i2c/aspeed_i2c.h | 282 ++++++++++++-
 include/hw/registerfields.h |  70 ++++
 5 files changed, 828 insertions(+), 320 deletions(-)
Signature · 1 line
2.35.1.1021.g381101b075-goog