hw/arm/raspi: fix CPRMAN base address
[qemu.git] / hw / virtio / virtio-input-host-pci.c
1 /*
2 * Virtio input host PCI Bindings
3 *
4 * This work is licensed under the terms of the GNU GPL, version 2 or
5 * (at your option) any later version. See the COPYING file in the
6 * top-level directory.
7 */
8
9 #include "qemu/osdep.h"
10
11 #include "virtio-pci.h"
12 #include "hw/virtio/virtio-input.h"
13 #include "qemu/module.h"
14 #include "qom/object.h"
15
16 typedef struct VirtIOInputHostPCI VirtIOInputHostPCI;
17
18 #define TYPE_VIRTIO_INPUT_HOST_PCI "virtio-input-host-pci"
19 DECLARE_INSTANCE_CHECKER(VirtIOInputHostPCI, VIRTIO_INPUT_HOST_PCI,
20 TYPE_VIRTIO_INPUT_HOST_PCI)
21
22 struct VirtIOInputHostPCI {
23 VirtIOPCIProxy parent_obj;
24 VirtIOInputHost vdev;
25 };
26
27 static void virtio_host_initfn(Object *obj)
28 {
29 VirtIOInputHostPCI *dev = VIRTIO_INPUT_HOST_PCI(obj);
30
31 virtio_instance_init_common(obj, &dev->vdev, sizeof(dev->vdev),
32 TYPE_VIRTIO_INPUT_HOST);
33 }
34
35 static const VirtioPCIDeviceTypeInfo virtio_input_host_pci_info = {
36 .generic_name = TYPE_VIRTIO_INPUT_HOST_PCI,
37 .parent = TYPE_VIRTIO_INPUT_PCI,
38 .instance_size = sizeof(VirtIOInputHostPCI),
39 .instance_init = virtio_host_initfn,
40 };
41
42 static void virtio_input_host_pci_register(void)
43 {
44 virtio_pci_types_register(&virtio_input_host_pci_info);
45 }
46
47 type_init(virtio_input_host_pci_register)