]> git.ipfire.org Git - thirdparty/qemu.git/commit
hw/i2c/aspeed: Fix TXBUF transmission start position error
authorHang Yu <francis_yuu@stu.pku.edu.cn>
Sat, 12 Aug 2023 06:52:29 +0000 (14:52 +0800)
committerMichael Tokarev <mjt@tls.msk.ru>
Thu, 21 Sep 2023 16:35:19 +0000 (19:35 +0300)
commit25ec23ab3fbf953fbbb38062042c8da3b00887ee
treeaf7659d01b2345c69a7c8d72a084ca0c94554d43
parent9dc6f05cc82601bc743bbce2404cfcafc1b9484b
hw/i2c/aspeed: Fix TXBUF transmission start position error

According to the ast2600 datasheet and the linux aspeed i2c driver,
the TXBUF transmission start position should be TXBUF[0] instead
of TXBUF[1],so the arg pool_start is useless,and the address is not
included in TXBUF.So even if Tx Count equals zero,there is at least
1 byte data needs to be transmitted,and M_TX_CMD should not be cleared
at this condition.The driver url is:
https://github.com/AspeedTech-BMC/linux/blob/aspeed-master-v5.15/drivers/i2c/busses/i2c-ast2600.c

Signed-off-by: Hang Yu <francis_yuu@stu.pku.edu.cn>
Fixes: 6054fc73e8f4 ("aspeed/i2c: Add support for pool buffer transfers")
Reviewed-by: Cédric Le Goater <clg@kaod.org>
Signed-off-by: Cédric Le Goater <clg@kaod.org>
(cherry picked from commit 961faf3ddbd8ffcdf776bbcf88af0bc97218114a)
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
hw/i2c/aspeed_i2c.c