mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-04 00:03:54 -06:00
hw/i2c/aspeed: Add support for buffer organization
Added support for the buffer organization option in pool buffer control register.when set to 1,The buffer is split into two parts: Lower 16 bytes for Tx and higher 16 bytes for Rx. Signed-off-by: Hang Yu <francis_yuu@stu.pku.edu.cn> Reviewed-by: Cédric Le Goater <clg@kaod.org> [ clg: checkpatch fixes ] Signed-off-by: Cédric Le Goater <clg@kaod.org>
This commit is contained in:
parent
961faf3ddb
commit
acc3d20ab2
2 changed files with 5 additions and 0 deletions
|
@ -297,6 +297,10 @@ static void aspeed_i2c_bus_recv(AspeedI2CBus *bus)
|
|||
|
||||
if (SHARED_ARRAY_FIELD_EX32(bus->regs, reg_cmd, RX_BUFF_EN)) {
|
||||
uint8_t *pool_base = aic->bus_pool_base(bus);
|
||||
if (SHARED_ARRAY_FIELD_EX32(bus->regs, reg_pool_ctrl,
|
||||
BUF_ORGANIZATION)) {
|
||||
pool_base += 16;
|
||||
}
|
||||
|
||||
for (i = 0; i < pool_rx_count; i++) {
|
||||
pool_base[i] = i2c_recv(bus->bus);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue