diff options
| author | Klaus Jensen <k.jensen@samsung.com> | 2023-03-02 13:57:50 +0100 |
|---|---|---|
| committer | Cédric Le Goater <clg@kaod.org> | 2023-03-02 13:57:50 +0100 |
| commit | 791cb95f23045f2d69364786edf61d289889199d (patch) | |
| tree | 5182af8a274a8fde5e5c18e5e593a88339fc72aa /hw/i2c/aspeed_i2c.c | |
| parent | 9b29a468bd0ca6994dc3d347a01af743c8fe76a7 (diff) | |
| download | focaccia-qemu-791cb95f23045f2d69364786edf61d289889199d.tar.gz focaccia-qemu-791cb95f23045f2d69364786edf61d289889199d.zip | |
hw/i2c: only schedule pending master when bus is idle
It is not given that the current master will release the bus after a
transfer ends. Only schedule a pending master if the bus is idle.
Fixes: 37fa5ca42623 ("hw/i2c: support multiple masters")
Signed-off-by: Klaus Jensen <k.jensen@samsung.com>
Acked-by: Corey Minyard <cminyard@mvista.com>
Message-Id: <20221116084312.35808-2-its@irrelevant.dk>
Signed-off-by: Cédric Le Goater <clg@kaod.org>
Diffstat (limited to 'hw/i2c/aspeed_i2c.c')
| -rw-r--r-- | hw/i2c/aspeed_i2c.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/hw/i2c/aspeed_i2c.c b/hw/i2c/aspeed_i2c.c index c166fd20fa..1f071a3811 100644 --- a/hw/i2c/aspeed_i2c.c +++ b/hw/i2c/aspeed_i2c.c @@ -550,6 +550,8 @@ static void aspeed_i2c_bus_handle_cmd(AspeedI2CBus *bus, uint64_t value) } SHARED_ARRAY_FIELD_DP32(bus->regs, reg_cmd, M_STOP_CMD, 0); aspeed_i2c_set_state(bus, I2CD_IDLE); + + i2c_schedule_pending_master(bus->bus); } if (aspeed_i2c_bus_pkt_mode_en(bus)) { |