qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH] adding helper pci functions


From: Anthony Liguori
Subject: Re: [Qemu-devel] [PATCH] adding helper pci functions
Date: Tue, 09 Mar 2010 08:24:29 -0600
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.5) Gecko/20091209 Fedora/3.0-4.fc12 Lightning/1.0pre Thunderbird/3.0

On 02/25/2010 02:41 AM, Gerd Hoffmann wrote:
From: Izik Eidus<address@hidden>

Signed-off-by: Izik Eidus<address@hidden>
Signed-off-by: Gerd Hoffmann<address@hidden>

Applied.  Thanks.

Regards,

Anthony Liguori
---
  hw/pci.h |   18 ++++++++++++++++++
  1 files changed, 18 insertions(+), 0 deletions(-)

diff --git a/hw/pci.h b/hw/pci.h
index 37ebdc4..20c670e 100644
--- a/hw/pci.h
+++ b/hw/pci.h
@@ -301,11 +301,29 @@ pci_config_set_device_id(uint8_t *pci_config, uint16_t 
val)
  }

  static inline void
+pci_config_set_revision(uint8_t *pci_config, uint8_t val)
+{
+    pci_set_byte(&pci_config[PCI_REVISION_ID], val);
+}
+
+static inline void
  pci_config_set_class(uint8_t *pci_config, uint16_t val)
  {
      pci_set_word(&pci_config[PCI_CLASS_DEVICE], val);
  }

+static inline void
+pci_config_set_prog_interface(uint8_t *pci_config, uint8_t val)
+{
+    pci_set_byte(&pci_config[PCI_CLASS_PROG], val);
+}
+
+static inline void
+pci_config_set_interrupt_pin(uint8_t *pci_config, uint8_t val)
+{
+    pci_set_byte(&pci_config[PCI_INTERRUPT_PIN], val);
+}
+
  typedef int (*pci_qdev_initfn)(PCIDevice *dev);
  typedef struct {
      DeviceInfo qdev;





reply via email to

[Prev in Thread] Current Thread [Next in Thread]