summaryrefslogtreecommitdiffstats
path: root/hw/pci.h
diff options
context:
space:
mode:
authorMichael S. Tsirkin2009-06-21 18:50:57 +0200
committerAnthony Liguori2009-06-24 16:09:15 +0200
commit64d50b8b0ab32260610978434af3c25f15524a72 (patch)
tree175a5ee2995cae34ff49bae12a8d28820ac9a064 /hw/pci.h
parentqemu/virtio: virtio save/load bindings (diff)
downloadqemu-64d50b8b0ab32260610978434af3c25f15524a72.tar.gz
qemu-64d50b8b0ab32260610978434af3c25f15524a72.tar.xz
qemu-64d50b8b0ab32260610978434af3c25f15524a72.zip
qemu/pci: add pci_get/set_byte
Add pci_get/set_byte to keep *_word and *_long access functions company. They are unused for now. Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'hw/pci.h')
-rw-r--r--hw/pci.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/hw/pci.h b/hw/pci.h
index 87b5a3cf24..fcf7b3bfd3 100644
--- a/hw/pci.h
+++ b/hw/pci.h
@@ -259,6 +259,18 @@ PCIBus *pci_bridge_init(PCIBus *bus, int devfn, uint16_t vid, uint16_t did,
pci_map_irq_fn map_irq, const char *name);
static inline void
+pci_set_byte(uint8_t *config, uint8_t val)
+{
+ *config = val;
+}
+
+static inline uint8_t
+pci_get_byte(uint8_t *config)
+{
+ return *config;
+}
+
+static inline void
pci_set_word(uint8_t *config, uint16_t val)
{
cpu_to_le16wu((uint16_t *)config, val);