Re:Re: [PATCH v3 1/3] hw/i2c/aspeed: Fix Tx count and Rx size error in buffer pool mode

2023-08-16 Thread Hang Yu
Hello! Thank you for your review!Sorry I forgot to cc other maintainers so I resend this mail. From: "Cédric Le Goater" Date: 2023-08-16 16:32:58 To: Hang Yu ,qemu-devel@nongnu.org Cc: koml...@google.com,pe...@pjd.dev,Peter Maydell ,Andrew Jeffery ,Joel Stanley ,"open l

[PATCH v3 0/3] hw/i2c/aspeed: Fix Tx and Rx error

2023-08-11 Thread Hang Yu
move it from I2CC_POOL_CTRL to I2CD_POOL_CTRL. Hang Yu. Hang Yu (3): hw/i2c/aspeed: Fix Tx count and Rx size error in buffer pool mode hw/i2c/aspeed: Fix TXBUF transmission start position error hw/i2c/aspeed: Add support for buffer organization hw/i2c/aspeed_i2c.c | 39

[PATCH v3 1/3] hw/i2c/aspeed: Fix Tx count and Rx size error in buffer pool mode

2023-08-11 Thread Hang Yu
to plus 1, and mistake Rx count for Rx size. Signed-off-by: Hang Yu Fixes: 3be3d6ccf2ad ("aspeed: i2c: Migrate to registerfields API") --- v2-->v3: 1. Merged patch1 and patch2 in v2 2. added fixes tag 3. Fixed typos hw/i2c/aspeed_i2c.c | 8 include/hw/i2c/asp

[PATCH v3 2/3] hw/i2c/aspeed: Fix TXBUF transmission start position error

2023-08-11 Thread Hang Yu
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 --- v2-->v3: No change. hw/i2c/aspeed_i2c.c | 30 ++ 1 file chan

[PATCH v3 3/3] hw/i2c/aspeed: Add support for buffer organization

2023-08-11 Thread Hang Yu
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 --- v2-->v3: 1. Fixed typos 2. Simplified the judgment logic of buffer organization

[PATCH v2 2/4] hw/i2c/aspeed: Fix Tx count and Rx size error

2023-08-10 Thread Hang Yu
According to the ast2600 datasheet,the actual Tx count is Transmit Data Byte Count plus 1, and the max Rx size is Receive Pool Buffer Size plus 1, both in Pool Buffer Control Register. The version before forgot to plus 1, and mistake Rx count for Rx size. Signed-off-by: Hang Yu --- hw/i2c

[PATCH v2 3/4] hw/i2c/aspeed: Fix TXBUF transmission start position error

2023-08-10 Thread Hang Yu
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 --- hw/i2c/aspeed_i2c.c | 30 ++ 1 file changed, 6 insertions(+), 24

[PATCH v2 1/4] hw/i2c/aspeed: Fix I2CD_POOL_CTRL register bit field defination

2023-08-10 Thread Hang Yu
Count and bit field [29:24]:Actual Received Pool Buffer Size according to the datasheet. Signed-off-by: Hang Yu --- include/hw/i2c/aspeed_i2c.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/hw/i2c/aspeed_i2c.h b/include/hw/i2c/aspeed_i2c.h index 51c944efea

[PATCH v2 4/4] hw/i2c/aspeed: Add support for BUFFER ORGANIZATION in new register mode

2023-08-10 Thread Hang Yu
Added support for the BUFFER ORGANIZATION option in reg I2CC_POOL_CTRL, 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 --- hw/i2c/aspeed_i2c.c | 7 ++- include/hw/i2c/aspeed_i2c.h | 1 + 2 files changed, 7

Re: [PATCH] Aspeed: i2c: Fixed Tx and Rx error in BUFF Mode

2023-08-10 Thread Hang Yu
Hello > Hello, >  > On 8/4/23 10:11, Hang Yu via wrote: > > 1. Fixed inconsistency between the bit field definition in register > > I2CD_POOL_CTRL and the ast2600 datasheet > > 2. Fixed issue of confusing RXSIZE and RXCOUNT, as well as forgetting > > to add

[PATCH] Aspeed: i2c: Fixed Tx and Rx error in BUFF Mode

2023-08-04 Thread Hang Yu via
4. Added support for the BUFFER ORGANIZATION option in reg I2CC_POOL_CTRL After adding these changes, QEMU can support driver code: https://github.com/AspeedTech-BMC/linux/blob/aspeed-master-v5.15 /drivers/i2c/busses/i2c-ast2600.c Signed-off-by: Hang Yu <1339236...@qq.com> --- hw/i2c/aspeed