hw/arm/xlnx-zynqmp: Remove obsolete 'has_rpu' property
[qemu/ar7.git] / include / hw / remote / iohub.h
blob0bf98e0d78c75bb51c98579b6fe01173cadf4b2a
1 /*
2 * IO Hub for remote device
4 * Copyright © 2018, 2021 Oracle and/or its affiliates.
6 * This work is licensed under the terms of the GNU GPL, version 2 or later.
7 * See the COPYING file in the top-level directory.
9 */
11 #ifndef REMOTE_IOHUB_H
12 #define REMOTE_IOHUB_H
14 #include "hw/pci/pci.h"
15 #include "qemu/event_notifier.h"
16 #include "qemu/thread-posix.h"
17 #include "hw/remote/mpqemu-link.h"
19 #define REMOTE_IOHUB_NB_PIRQS PCI_DEVFN_MAX
21 typedef struct ResampleToken {
22 void *iohub;
23 int pirq;
24 } ResampleToken;
26 typedef struct RemoteIOHubState {
27 PCIDevice d;
28 EventNotifier irqfds[REMOTE_IOHUB_NB_PIRQS];
29 EventNotifier resamplefds[REMOTE_IOHUB_NB_PIRQS];
30 unsigned int irq_level[REMOTE_IOHUB_NB_PIRQS];
31 ResampleToken token[REMOTE_IOHUB_NB_PIRQS];
32 QemuMutex irq_level_lock[REMOTE_IOHUB_NB_PIRQS];
33 } RemoteIOHubState;
35 int remote_iohub_map_irq(PCIDevice *pci_dev, int intx);
36 void remote_iohub_set_irq(void *opaque, int pirq, int level);
37 void process_set_irqfd_msg(PCIDevice *pci_dev, MPQemuMsg *msg);
39 void remote_iohub_init(RemoteIOHubState *iohub);
40 void remote_iohub_finalize(RemoteIOHubState *iohub);
42 #endif