hw/i2c/aspeed: Fix TXBUF transmission start position error
commit961faf3ddbd8ffcdf776bbcf88af0bc97218114a
authorHang Yu <francis_yuu@stu.pku.edu.cn>
Sat, 12 Aug 2023 06:52:29 +0000 (12 14:52 +0800)
committerCédric Le Goater <clg@kaod.org>
Fri, 1 Sep 2023 09:40:04 +0000 (1 11:40 +0200)
tree4b6f7254ac1374b8be880f9acf35d49b4aab9d3f
parent97b8aa5ae9ff197394395eda5062ea3681e09c28
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>
hw/i2c/aspeed_i2c.c