riscv: sifive_u: Remove handcrafted clock nodes for UART and ethernet
[qemu/ar7.git] / hw / virtio / vhost-user-input-pci.c
blobae9cff9aed5e10b8b1fe5d238fefc64065de9bca
1 /*
2 * This work is licensed under the terms of the GNU LGPL, version 2 or
3 * later. See the COPYING.LIB file in the top-level directory.
4 */
6 #include "qemu/osdep.h"
8 #include "hw/virtio/virtio.h"
9 #include "hw/virtio/virtio-input.h"
10 #include "qapi/error.h"
11 #include "qemu/error-report.h"
12 #include "virtio-pci.h"
14 typedef struct VHostUserInputPCI VHostUserInputPCI;
16 #define TYPE_VHOST_USER_INPUT_PCI "vhost-user-input-pci"
18 #define VHOST_USER_INPUT_PCI(obj) \
19 OBJECT_CHECK(VHostUserInputPCI, (obj), TYPE_VHOST_USER_INPUT_PCI)
21 struct VHostUserInputPCI {
22 VirtIOPCIProxy parent_obj;
23 VHostUserInput vhi;
26 static void vhost_user_input_pci_instance_init(Object *obj)
28 VHostUserInputPCI *dev = VHOST_USER_INPUT_PCI(obj);
30 virtio_instance_init_common(obj, &dev->vhi, sizeof(dev->vhi),
31 TYPE_VHOST_USER_INPUT);
33 object_property_add_alias(obj, "chardev",
34 OBJECT(&dev->vhi), "chardev",
35 &error_abort);
38 static const VirtioPCIDeviceTypeInfo vhost_user_input_pci_info = {
39 .generic_name = TYPE_VHOST_USER_INPUT_PCI,
40 .parent = TYPE_VIRTIO_INPUT_PCI,
41 .instance_size = sizeof(VHostUserInputPCI),
42 .instance_init = vhost_user_input_pci_instance_init,
45 static void vhost_user_input_pci_register(void)
47 virtio_pci_types_register(&vhost_user_input_pci_info);
50 type_init(vhost_user_input_pci_register)