diff options
author | Paolo Bonzini <pbonzini@redhat.com> | 2025-02-12 12:23:59 +0100 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2025-02-25 16:18:12 +0100 |
commit | 3212da0033530ae896d31d90d5e81a772fc37088 (patch) | |
tree | 07df8b7bb6e44cad8b378633df534007ddd7577c /rust/hw/char | |
parent | ac5699c5da51fa9d39bc964e81645953796f7ad1 (diff) | |
download | qemu-3212da0033530ae896d31d90d5e81a772fc37088.zip qemu-3212da0033530ae896d31d90d5e81a772fc37088.tar.gz qemu-3212da0033530ae896d31d90d5e81a772fc37088.tar.bz2 |
rust: add SysBusDeviceImpl
The only function, right now, is to ensure that anything with a
SysBusDeviceClass class is a SysBusDevice.
Reviewed-by: Zhao Liu <zhao1.liu@intel.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'rust/hw/char')
-rw-r--r-- | rust/hw/char/pl011/src/device.rs | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/rust/hw/char/pl011/src/device.rs b/rust/hw/char/pl011/src/device.rs index 59a689f..bea9723 100644 --- a/rust/hw/char/pl011/src/device.rs +++ b/rust/hw/char/pl011/src/device.rs @@ -20,7 +20,7 @@ use qemu_api::{ prelude::*, qdev::{Clock, ClockEvent, DeviceImpl, DeviceState, Property, ResetType, ResettablePhasesImpl}, qom::{ClassInitImpl, ObjectImpl, Owned, ParentField}, - sysbus::{SysBusDevice, SysBusDeviceClass}, + sysbus::{SysBusDevice, SysBusDeviceClass, SysBusDeviceImpl}, vmstate::VMStateDescription, }; @@ -176,6 +176,8 @@ impl ResettablePhasesImpl for PL011State { const HOLD: Option<fn(&Self, ResetType)> = Some(Self::reset_hold); } +impl SysBusDeviceImpl for PL011State {} + impl PL011Registers { pub(self) fn read(&mut self, offset: RegisterOffset) -> (bool, u32) { use RegisterOffset::*; @@ -746,3 +748,4 @@ impl ObjectImpl for PL011Luminary { impl DeviceImpl for PL011Luminary {} impl ResettablePhasesImpl for PL011Luminary {} +impl SysBusDeviceImpl for PL011Luminary {} |