[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 38/67] hw/misc/xlnx-versal-trng: Constify trng_props
From: |
Richard Henderson |
Subject: |
[PULL 38/67] hw/misc/xlnx-versal-trng: Constify trng_props |
Date: |
Sun, 15 Dec 2024 13:05:04 -0600 |
Use DEFINE_PROP_UNSIGNED instead of DEFINE_PROP_UINT64
so that we can set the PropertyInfo during initialization,
instead of updating within trng_class_init.
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
hw/misc/xlnx-versal-trng.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/hw/misc/xlnx-versal-trng.c b/hw/misc/xlnx-versal-trng.c
index 86905479b8..2f6af4f680 100644
--- a/hw/misc/xlnx-versal-trng.c
+++ b/hw/misc/xlnx-versal-trng.c
@@ -660,8 +660,9 @@ static const PropertyInfo trng_prop_fault_events = {
static PropertyInfo trng_prop_uint64; /* to extend qdev_prop_uint64 */
-static Property trng_props[] = {
- DEFINE_PROP_UINT64("forced-prng", XlnxVersalTRng, forced_prng_seed, 0),
+static const Property trng_props[] = {
+ DEFINE_PROP_UNSIGNED("forced-prng", XlnxVersalTRng, forced_prng_seed,
+ 0, trng_prop_uint64, uint64_t),
DEFINE_PROP_UINT32("hw-version", XlnxVersalTRng, hw_version, 0x0200),
DEFINE_PROP("fips-fault-events", XlnxVersalTRng, forced_faults,
trng_prop_fault_events, uint32_t),
@@ -694,7 +695,6 @@ static void trng_class_init(ObjectClass *klass, void *data)
/* Clone uint64 property with set allowed after realized */
trng_prop_uint64 = qdev_prop_uint64;
trng_prop_uint64.realized_set_allowed = true;
- trng_props[0].info = &trng_prop_uint64;
device_class_set_props(dc, trng_props);
}
--
2.43.0
- [PULL 25/67] hw/gpio: Constify all Property, (continued)
- [PULL 25/67] hw/gpio: Constify all Property, Richard Henderson, 2024/12/15
- [PULL 29/67] hw/ide: Constify all Property, Richard Henderson, 2024/12/15
- [PULL 33/67] hw/ipmi: Constify all Property, Richard Henderson, 2024/12/15
- [PULL 34/67] hw/isa: Constify all Property, Richard Henderson, 2024/12/15
- [PULL 37/67] hw/mips: Constify all Property, Richard Henderson, 2024/12/15
- [PULL 27/67] hw/i2c: Constify all Property, Richard Henderson, 2024/12/15
- [PULL 24/67] hw/dma: Constify all Property, Richard Henderson, 2024/12/15
- [PULL 31/67] hw/intc: Constify all Property, Richard Henderson, 2024/12/15
- [PULL 32/67] hw/ipack: Constify all Property, Richard Henderson, 2024/12/15
- [PULL 35/67] hw/m68k: Constify all Property, Richard Henderson, 2024/12/15
- [PULL 38/67] hw/misc/xlnx-versal-trng: Constify trng_props,
Richard Henderson <=
- [PULL 26/67] hw/hyperv: Constify all Property, Richard Henderson, 2024/12/15
- [PULL 39/67] hw/misc: Constify all Property, Richard Henderson, 2024/12/15
- [PULL 41/67] hw/nubus: Constify all Property, Richard Henderson, 2024/12/15
- [PULL 40/67] hw/net: Constify all Property, Richard Henderson, 2024/12/15
- [PULL 43/67] hw/nvram: Constify all Property, Richard Henderson, 2024/12/15
- [PULL 44/67] hw/pci-bridge: Constify all Property, Richard Henderson, 2024/12/15
- [PULL 45/67] hw/pci-host: Constify all Property, Richard Henderson, 2024/12/15
- [PULL 46/67] hw/pci: Constify all Property, Richard Henderson, 2024/12/15
- [PULL 47/67] hw/ppc: Constify all Property, Richard Henderson, 2024/12/15
- [PULL 42/67] hw/nvme: Constify all Property, Richard Henderson, 2024/12/15