[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 3/8] hw/adc: Fix CONV bit in NPCM7XX ADC CON register
From: |
Hao Wu |
Subject: |
[PATCH 3/8] hw/adc: Fix CONV bit in NPCM7XX ADC CON register |
Date: |
Thu, 14 Jul 2022 11:00:01 -0700 |
The correct bit for the CONV bit in NPCM7XX ADC is bit 13. This patch
fixes that in the module, and also lower the IRQ when the guest
is done handling an interrupt event from the ADC module.
Signed-off-by: Hao Wu <wuhaotsh@google.com>
Reviewed-by: Patrick Venture<venture@google.com>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
---
hw/adc/npcm7xx_adc.c | 2 +-
tests/qtest/npcm7xx_adc-test.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/hw/adc/npcm7xx_adc.c b/hw/adc/npcm7xx_adc.c
index 0f0a9f63e2..47fb9e5f74 100644
--- a/hw/adc/npcm7xx_adc.c
+++ b/hw/adc/npcm7xx_adc.c
@@ -36,7 +36,7 @@ REG32(NPCM7XX_ADC_DATA, 0x4)
#define NPCM7XX_ADC_CON_INT BIT(18)
#define NPCM7XX_ADC_CON_EN BIT(17)
#define NPCM7XX_ADC_CON_RST BIT(16)
-#define NPCM7XX_ADC_CON_CONV BIT(14)
+#define NPCM7XX_ADC_CON_CONV BIT(13)
#define NPCM7XX_ADC_CON_DIV(rv) extract32(rv, 1, 8)
#define NPCM7XX_ADC_MAX_RESULT 1023
diff --git a/tests/qtest/npcm7xx_adc-test.c b/tests/qtest/npcm7xx_adc-test.c
index 3fa6d9ece0..8048044d28 100644
--- a/tests/qtest/npcm7xx_adc-test.c
+++ b/tests/qtest/npcm7xx_adc-test.c
@@ -50,7 +50,7 @@
#define CON_INT BIT(18)
#define CON_EN BIT(17)
#define CON_RST BIT(16)
-#define CON_CONV BIT(14)
+#define CON_CONV BIT(13)
#define CON_DIV(rv) extract32(rv, 1, 8)
#define FST_RDST BIT(1)
--
2.37.0.170.g444d1eabd0-goog
- [PATCH 0/8] Misc NPCM7XX patches, 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 1/8] hw/i2c: Clear ACK bit in NPCM7xx SMBus module, Hao Wu, 2022/07/14
- [PATCH 8/8] hw/arm: quanta-gbs-bmc add i2c devices, Hao Wu, 2022/07/14
- [PATCH 3/8] hw/adc: Fix CONV bit in NPCM7XX ADC CON register,
Hao Wu <=
- [PATCH 5/8] blockdev: Add a new IF type IF_OTHER, Hao Wu, 2022/07/14
- [PATCH 6/8] hw/arm: npcm8xx_boards: EEPROMs can take bus as parameter, Hao Wu, 2022/07/14
- [PATCH 4/8] hw/adc: Make adci[*] R/W in NPCM7XX ADC, Hao Wu, 2022/07/14
- [PATCH 7/8] hw/arm: Set drive property for at24c eeprom, Hao Wu, 2022/07/14
- [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 3/8] hw/adc: Fix CONV bit in NPCM7XX ADC CON register, Hao Wu, 2022/07/14
- [PATCH 4/8] hw/adc: Make adci[*] R/W in NPCM7XX ADC, Hao Wu, 2022/07/14
- [PATCH 5/8] blockdev: Add a new IF type IF_OTHER, Hao Wu, 2022/07/14