On 12/5/24 07:07, Zhao Liu wrote:
Add HPET configuration in PC's Kconfig options, and select HPET device
(Rust version) if Rust is supported.
Signed-off-by: Zhao Liu <zhao1....@intel.com>
---
hw/i386/Kconfig | 2 ++
hw/timer/Kconfig | 1 -
rust/hw/Kconfig | 1 +
rust/hw/timer/Kconfig | 2 ++
4 files changed, 5 insertions(+), 1 deletion(-)
create mode 100644 rust/hw/timer/Kconfig
diff --git a/hw/i386/Kconfig b/hw/i386/Kconfig
index 32818480d263..83ab3222c4f0 100644
--- a/hw/i386/Kconfig
+++ b/hw/i386/Kconfig
@@ -39,6 +39,8 @@ config PC
select PCSPK
select I8257
select MC146818RTC
+ select HPET if !HAVE_RUST
+ select X_HPET_RUST if HAVE_RUST
HPET is optional, so you need to have...
config HPET
bool
- default y if PC
+default y if PC && !HAVE_RUST
with a matching "default y if PC && HAVE_RUST" for X_HPET_RUST.
Paolo
config I8254
bool
diff --git a/rust/hw/Kconfig b/rust/hw/Kconfig
index 4d934f30afe1..36f92ec02874 100644
--- a/rust/hw/Kconfig
+++ b/rust/hw/Kconfig
@@ -1,2 +1,3 @@
# devices Kconfig
source char/Kconfig
+source timer/Kconfig
diff --git a/rust/hw/timer/Kconfig b/rust/hw/timer/Kconfig
new file mode 100644
index 000000000000..afd980335037
--- /dev/null
+++ b/rust/hw/timer/Kconfig
@@ -0,0 +1,2 @@
+config X_HPET_RUST
+ bool