diff options
author | Richard Henderson <richard.henderson@linaro.org> | 2024-12-13 16:23:55 +0000 |
---|---|---|
committer | Richard Henderson <richard.henderson@linaro.org> | 2024-12-15 12:55:33 -0600 |
commit | 56d8d2b34288c3ea6b62d9e0069cc927d542ea93 (patch) | |
tree | 177bfdbd71d984b7865c9d5dc3a4836a1d65de67 | |
parent | ce385ef3cceeb9e6d1a80b1ef6f96133b060bd58 (diff) | |
download | qemu-56d8d2b34288c3ea6b62d9e0069cc927d542ea93.zip qemu-56d8d2b34288c3ea6b62d9e0069cc927d542ea93.tar.gz qemu-56d8d2b34288c3ea6b62d9e0069cc927d542ea93.tar.bz2 |
hw/misc/xlnx-versal-trng: Constify trng_props
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>
-rw-r--r-- | hw/misc/xlnx-versal-trng.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/hw/misc/xlnx-versal-trng.c b/hw/misc/xlnx-versal-trng.c index 8690547..2f6af4f 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); } |