Commit 64d50b8b0ab32260610978434af3c25f15524a72
Committed by
Anthony Liguori
1 parent
ff24bd58
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>
Showing
1 changed file
with
12 additions
and
0 deletions
hw/pci.h
| ... | ... | @@ -259,6 +259,18 @@ PCIBus *pci_bridge_init(PCIBus *bus, int devfn, uint16_t vid, uint16_t did, |
| 259 | 259 | pci_map_irq_fn map_irq, const char *name); |
| 260 | 260 | |
| 261 | 261 | static inline void |
| 262 | +pci_set_byte(uint8_t *config, uint8_t val) | |
| 263 | +{ | |
| 264 | + *config = val; | |
| 265 | +} | |
| 266 | + | |
| 267 | +static inline uint8_t | |
| 268 | +pci_get_byte(uint8_t *config) | |
| 269 | +{ | |
| 270 | + return *config; | |
| 271 | +} | |
| 272 | + | |
| 273 | +static inline void | |
| 262 | 274 | pci_set_word(uint8_t *config, uint16_t val) |
| 263 | 275 | { |
| 264 | 276 | cpu_to_le16wu((uint16_t *)config, val); | ... | ... |