1 | /* SPDX-License-Identifier: GPL-2.0 */ |
---|---|
2 | #ifndef _LINUX_VIRTIO_PCI_LEGACY_H |
3 | #define _LINUX_VIRTIO_PCI_LEGACY_H |
4 | |
5 | #include "linux/mod_devicetable.h" |
6 | #include <linux/pci.h> |
7 | #include <linux/virtio_pci.h> |
8 | |
9 | struct virtio_pci_legacy_device { |
10 | struct pci_dev *pci_dev; |
11 | |
12 | /* Where to read and clear interrupt */ |
13 | u8 __iomem *isr; |
14 | /* The IO mapping for the PCI config space (legacy mode only) */ |
15 | void __iomem *ioaddr; |
16 | |
17 | struct virtio_device_id id; |
18 | }; |
19 | |
20 | u64 vp_legacy_get_features(struct virtio_pci_legacy_device *ldev); |
21 | u64 vp_legacy_get_driver_features(struct virtio_pci_legacy_device *ldev); |
22 | void vp_legacy_set_features(struct virtio_pci_legacy_device *ldev, |
23 | u32 features); |
24 | u8 vp_legacy_get_status(struct virtio_pci_legacy_device *ldev); |
25 | void vp_legacy_set_status(struct virtio_pci_legacy_device *ldev, |
26 | u8 status); |
27 | u16 vp_legacy_queue_vector(struct virtio_pci_legacy_device *ldev, |
28 | u16 idx, u16 vector); |
29 | u16 vp_legacy_config_vector(struct virtio_pci_legacy_device *ldev, |
30 | u16 vector); |
31 | void vp_legacy_set_queue_address(struct virtio_pci_legacy_device *ldev, |
32 | u16 index, u32 queue_pfn); |
33 | bool vp_legacy_get_queue_enable(struct virtio_pci_legacy_device *ldev, |
34 | u16 idx); |
35 | u16 vp_legacy_get_queue_size(struct virtio_pci_legacy_device *ldev, |
36 | u16 idx); |
37 | int vp_legacy_probe(struct virtio_pci_legacy_device *ldev); |
38 | void vp_legacy_remove(struct virtio_pci_legacy_device *ldev); |
39 | |
40 | #endif |
41 |