[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 1/8] hw/i2c: Clear ACK bit in NPCM7xx SMBus module
From: |
Hao Wu |
Subject: |
[PATCH 1/8] hw/i2c: Clear ACK bit in NPCM7xx SMBus module |
Date: |
Thu, 14 Jul 2022 11:27:40 -0700 |
The ACK bit in NPCM7XX SMBus module should be cleared each time it
sends out a NACK signal. This patch fixes the bug that it fails to
do so.
Signed-off-by: Hao Wu <wuhaotsh@google.com>
Reviewed-by: Titus Rwantare <titusr@google.com>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
---
hw/i2c/npcm7xx_smbus.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/hw/i2c/npcm7xx_smbus.c b/hw/i2c/npcm7xx_smbus.c
index e7e0ba66fe..f18e311556 100644
--- a/hw/i2c/npcm7xx_smbus.c
+++ b/hw/i2c/npcm7xx_smbus.c
@@ -270,7 +270,7 @@ static void npcm7xx_smbus_recv_byte(NPCM7xxSMBusState *s)
if (s->st & NPCM7XX_SMBCTL1_ACK) {
trace_npcm7xx_smbus_nack(DEVICE(s)->canonical_path);
i2c_nack(s->bus);
- s->st &= NPCM7XX_SMBCTL1_ACK;
+ s->st &= ~NPCM7XX_SMBCTL1_ACK;
}
trace_npcm7xx_smbus_recv_byte((DEVICE(s)->canonical_path), s->sda);
npcm7xx_smbus_update_irq(s);
--
2.37.0.170.g444d1eabd0-goog
- [PATCH 0/8] Misc NPCM7XX patches, Hao Wu, 2022/07/14
- [PATCH 1/8] hw/i2c: Clear ACK bit in NPCM7xx SMBus module, Hao Wu, 2022/07/14
- [PATCH 2/8] hw/i2c: Read FIFO during RXF_CTL change in NPCM7XX SMBus, Hao Wu, 2022/07/14
- [PATCH 6/8] hw/arm: npcm8xx_boards: EEPROMs can take bus as parameter, Hao Wu, 2022/07/14
- [PATCH 5/8] blockdev: Add a new IF type IF_OTHER, Hao Wu, 2022/07/14
- [PATCH 3/8] hw/adc: Fix CONV bit in NPCM7XX ADC CON register, Hao Wu, 2022/07/14
- [PATCH 7/8] hw/arm: Set drive property for at24c eeprom, Hao Wu, 2022/07/14
- [PATCH 8/8] hw/arm: quanta-gbs-bmc add i2c devices, Hao Wu, 2022/07/14
- [PATCH 4/8] hw/adc: Make adci[*] R/W in NPCM7XX ADC, Hao Wu, 2022/07/14