[Qemu-devel] [PATCH 0/3] aspeed/i2c: fix receive done interrupt model

Cédric Le Goater posted 3 patches 7 years, 1 month ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20180914063506.20815-1-clg@kaod.org
Test docker-clang@ubuntu failed
Test checkpatch passed
hw/i2c/aspeed_i2c.c | 68 +++++++++++++++++++++++++++++++--------------
1 file changed, 47 insertions(+), 21 deletions(-)
[Qemu-devel] [PATCH 0/3] aspeed/i2c: fix receive done interrupt model
Posted by Cédric Le Goater 7 years, 1 month ago
Hello,

The interrupt model of the Aspeed I2C controller does handle correctly
the RX_DONE bit. As indicated in the AST2500 datasheet, the RX_DONE
bit needs to be cleared to allow mode data to be received. This series
fixes the behavior and delays the data reception until the bit has
been cleared.

Revealed by :

  [PATCH i2c-next v6] i2c: aspeed: Handle master/slave combined irq events
  https://lkml.org/lkml/2018/8/23/1366

which fixes irq handling in Linux at high bus frequencies.

Thanks,

C.

Cédric Le Goater (1):
  aspeed/i2c: interrupts should be cleared by software only

Guenter Roeck (2):
  aspeed/i2c: Handle receive command in separate function
  aspeed/i2c: Fix receive done interrupt handling

 hw/i2c/aspeed_i2c.c | 68 +++++++++++++++++++++++++++++++--------------
 1 file changed, 47 insertions(+), 21 deletions(-)

-- 
2.17.1


Re: [Qemu-devel] [PATCH 0/3] aspeed/i2c: fix receive done interrupt model
Posted by Peter Maydell 7 years, 1 month ago
On 14 September 2018 at 07:35, Cédric Le Goater <clg@kaod.org> wrote:
> Hello,
>
> The interrupt model of the Aspeed I2C controller does handle correctly
> the RX_DONE bit. As indicated in the AST2500 datasheet, the RX_DONE
> bit needs to be cleared to allow mode data to be received. This series
> fixes the behavior and delays the data reception until the bit has
> been cleared.
>
> Revealed by :
>
>   [PATCH i2c-next v6] i2c: aspeed: Handle master/slave combined irq events
>   https://lkml.org/lkml/2018/8/23/1366
>
> which fixes irq handling in Linux at high bus frequencies.

Applied to target-arm.next (with patch 1's TODO comment removed
and the commit message tweaked), thanks.

-- PMM