]> git.ipfire.org Git - thirdparty/qemu.git/commit
hw/i2c/aspeed: Introduce a new dma_dram_offset attribute in AspeedI2Cbus
authorJamin Lin <jamin_lin@aspeedtech.com>
Tue, 3 Sep 2024 08:35:21 +0000 (16:35 +0800)
committerCédric Le Goater <clg@redhat.com>
Mon, 16 Sep 2024 15:44:08 +0000 (17:44 +0200)
commitc400c38854017eeccda63115814eba4c3ef2b51f
treee45cc137c7cb87c74e54a5964aabf7502aec318d
parentd46a4ba0f4e331ff21a82863a3d96a5cd8849025
hw/i2c/aspeed: Introduce a new dma_dram_offset attribute in AspeedI2Cbus

The "Current DMA Operating Address Status(0x50)" register of
I2C new mode has been removed in AST2700.
This register is used for debugging and it is a read only register.

To support AST2700 DMA mode, introduce a new
dma_dram_offset class attribute in AspeedI2Cbus to save the
current DMA operating address.

ASPEED AST2700 SOC is a 64 bits quad core CPUs (Cortex-a35)
And the base address of dram is "0x4 00000000" which
is 64bits address.

Set the dma_dram_offset data type to uint64_t for
64 bits dram address DMA support.

Both "DMA Mode Buffer Address Register(I2CD24 old mode)" and
"DMA Operating Address Status (I2CC50 new mode)" are used for showing the
low part dram offset bits [31:0], so change to read/write both register bits [31:0] in
bus register read/write functions.

The aspeed_i2c_bus_vmstate is changed again and version is not increased
because it was done earlier in the same series.

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