On 3/19/25 14:44, Peter Maydell wrote:
-    select PL011 # UART
+    select PL011 if !HAVE_RUST # UART
+    select X_PL011_RUST if HAVE_RUST # UART
      select PL031 # RTC
      select PL061 # GPIO
      select GPIO_PWR

Paolo: we seem to have quite a lot of this

     select PL011 if !HAVE_RUST # UART
     select X_PL011_RUST if HAVE_RUST # UART

duplicated for every PL011-using machine. Can we factor this out
in Kconfig? e.g.

config PL011
     select X_PL011_RUST if HAVE_RUST
     select PL011_C if !HAVE_RUST

(and update hw/char/meson.build to use CONFIG_PL011_C for pl011.c).
Then all the machines can go back to plain "select PL011" and
don't need to care whether it's the Rust or C version.

Or does that not work?

Yes, it works.

Paolo


Reply via email to