]> git.ipfire.org Git - thirdparty/qemu.git/commit
hw/i2c/aspeed: Add support for 64 bit addresses
authorJamin Lin <jamin_lin@aspeedtech.com>
Tue, 3 Sep 2024 08:35:24 +0000 (16:35 +0800)
committerCédric Le Goater <clg@redhat.com>
Mon, 16 Sep 2024 15:44:08 +0000 (17:44 +0200)
commitbe8c15118a24491ccb2e7451f74f8efca1dd149c
treeef1c8ce19ea209b3b49fcb62d40b5c2a4961c946
parent3dbab141d5c51de97cf514f0b6187f5f54fd922c
hw/i2c/aspeed: Add support for 64 bit addresses

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.

The AST2700 support the maximum DRAM size is 8 GB.
The DRAM physical address range is from "0x4_0000_0000" to
"0x5_FFFF_FFFF".

The DRAM offset range is from "0x0_0000_0000" to
"0x1_FFFF_FFFF" and it is enough to use bits [33:0]
saving the dram offset.

Therefore, save the high part physical address bit[1:0]
of Tx/Rx buffer address as dma_dram_offset bit[33:32].
It does not need to decrease the dram physical
high part address for DMA operation.
(high part physical address bit[7:0] – 4)

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