From f2202be27852eeb18d05ee6cebaba6f09ea74e55 Mon Sep 17 00:00:00 2001 From: Jamin Lin Date: Thu, 18 Jul 2024 14:49:13 +0800 Subject: hw/i2c/aspeed: support to set the different memory size MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Reviewed-by: Cédric Le Goater --- include/hw/i2c/aspeed_i2c.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include/hw/i2c') diff --git a/include/hw/i2c/aspeed_i2c.h b/include/hw/i2c/aspeed_i2c.h index a064479e59..065b636d29 100644 --- a/include/hw/i2c/aspeed_i2c.h +++ b/include/hw/i2c/aspeed_i2c.h @@ -283,7 +283,7 @@ struct AspeedI2CClass { uint8_t *(*bus_pool_base)(AspeedI2CBus *); bool check_sram; bool has_dma; - + uint64_t mem_size; }; static inline bool aspeed_i2c_is_new_mode(AspeedI2CState *s) -- cgit 1.4.1