hw/i2c/aspeed: support to set the different memory size
authorJamin Lin <jamin_lin@aspeedtech.com>
Thu, 18 Jul 2024 06:49:13 +0000 (14:49 +0800)
committerCédric Le Goater <clg@redhat.com>
Sun, 21 Jul 2024 05:46:38 +0000 (07:46 +0200)
commitf2202be27852eeb18d05ee6cebaba6f09ea74e55
tree013ca1e0f8cf61249c0b1f735be80a883bded1b7
parent11bea810f7c1215e36824ed291a64e8f4e6f28df
hw/i2c/aspeed: support to set the different memory size

According to the datasheet of ASPEED SOCs,
an I2C controller owns 8KB of register space for AST2700,
owns 4KB of register space for AST2600, AST2500 and AST2400,
and owns 64KB of register space for AST1030.

It set the memory region size 4KB by default and it does not compatible
register space for AST2700.

Introduce a new class attribute to set the I2C controller memory size
for different ASPEED SOCs.

Signed-off-by: Jamin Lin <jamin_lin@aspeedtech.com>
Reviewed-by: Cédric Le Goater <clg@redhat.com>
hw/i2c/aspeed_i2c.c
include/hw/i2c/aspeed_i2c.h