]> xenbits.xensource.com Git - qemu-xen.git/commitdiff
hw/adc: Fix CONV bit in NPCM7XX ADC CON register
authorHao Wu <wuhaotsh@google.com>
Thu, 14 Jul 2022 18:28:31 +0000 (11:28 -0700)
committerPeter Maydell <peter.maydell@linaro.org>
Mon, 18 Jul 2022 12:20:14 +0000 (13:20 +0100)
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>
Message-id: 20220714182836.89602-4-wuhaotsh@google.com
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
hw/adc/npcm7xx_adc.c
tests/qtest/npcm7xx_adc-test.c

index 0f0a9f63e206fce4ba4d7052a8fb14065e8f9d37..47fb9e5f74c2b6c0b19d1b4c3394b72eb11a13b5 100644 (file)
@@ -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
index 3fa6d9ece0bd881495fc59abd9af49867589cfe9..8048044d28108d3ba95fd865e100077fdf73959b 100644 (file)
@@ -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)