From: Hao Wu <wuhaotsh@google.com>
To: peter.maydell@linaro.org
Cc: richard.henderson@linaro.org, qemu-arm@nongnu.org,
qemu-devel@nongnu.org, wuhaotsh@google.com, venture@google.com,
Avi.Fishman@nuvoton.com, kfting@nuvoton.com,
hskinnemoen@google.com, f4bug@amsat.org, bin.meng@windriver.com,
qemu-block@nongnu.org, armbru@redhat.com, thuth@redhat.com
Subject: [PATCH v5 3/8] hw/adc: Fix CONV bit in NPCM7XX ADC CON register
Date: Thu, 14 Jul 2022 11:28:31 -0700 [thread overview]
Message-ID: <20220714182836.89602-4-wuhaotsh@google.com> (raw)
In-Reply-To: <20220714182836.89602-1-wuhaotsh@google.com>
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
next prev parent reply other threads:[~2022-07-14 18:42 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-07-14 18:28 [PATCH v5 0/8] Misc NPCM7XX patches Hao Wu
2022-07-14 18:28 ` [PATCH v5 1/8] hw/i2c: Clear ACK bit in NPCM7xx SMBus module Hao Wu
2022-07-14 18:28 ` [PATCH v5 2/8] hw/i2c: Read FIFO during RXF_CTL change in NPCM7XX SMBus Hao Wu
2022-07-15 15:37 ` Peter Maydell
2022-07-14 18:28 ` Hao Wu [this message]
2022-07-14 18:28 ` [PATCH v5 4/8] hw/adc: Make adci[*] R/W in NPCM7XX ADC Hao Wu
2022-07-14 18:28 ` [PATCH v5 5/8] blockdev: Add a new IF type IF_OTHER Hao Wu
2022-07-18 9:49 ` Markus Armbruster
2022-07-18 9:54 ` Thomas Huth
2022-07-27 19:03 ` Kevin Wolf
2022-07-28 9:46 ` Peter Maydell
2022-07-28 13:29 ` Kevin Wolf
2022-07-28 13:43 ` Peter Maydell
2022-07-28 13:57 ` Cédric Le Goater
2022-07-28 14:50 ` Markus Armbruster
2022-07-28 14:58 ` Peter Maydell
2022-08-04 14:27 ` Markus Armbruster
2022-07-28 17:08 ` Kevin Wolf
2022-08-04 14:34 ` Daniel P. Berrangé
2022-08-04 14:56 ` Markus Armbruster
2022-08-04 15:17 ` Daniel P. Berrangé
2022-08-04 15:30 ` Markus Armbruster
2022-08-04 15:44 ` Daniel P. Berrangé
2022-08-08 6:26 ` Markus Armbruster
2022-08-08 8:34 ` Kevin Wolf
2022-08-08 10:14 ` Markus Armbruster
2022-07-14 18:28 ` [PATCH v5 6/8] hw/arm: npcm8xx_boards: EEPROMs can take bus as parameter Hao Wu
2022-07-14 18:28 ` [PATCH v5 7/8] hw/arm: Set drive property for at24c eeprom Hao Wu
2022-07-18 9:51 ` Markus Armbruster
2022-07-14 18:28 ` [PATCH v5 8/8] hw/arm: quanta-gbs-bmc add i2c devices Hao Wu
2022-07-15 15:44 ` [PATCH v5 0/8] Misc NPCM7XX patches Peter Maydell
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220714182836.89602-4-wuhaotsh@google.com \
--to=wuhaotsh@google.com \
--cc=Avi.Fishman@nuvoton.com \
--cc=armbru@redhat.com \
--cc=bin.meng@windriver.com \
--cc=f4bug@amsat.org \
--cc=hskinnemoen@google.com \
--cc=kfting@nuvoton.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-arm@nongnu.org \
--cc=qemu-block@nongnu.org \
--cc=qemu-devel@nongnu.org \
--cc=richard.henderson@linaro.org \
--cc=thuth@redhat.com \
--cc=venture@google.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.