From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Np0Wt-0006qL-QQ for qemu-devel@nongnu.org; Tue, 09 Mar 2010 09:35:28 -0500 Received: from [199.232.76.173] (port=44126 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Np0Wp-0006mN-Iv for qemu-devel@nongnu.org; Tue, 09 Mar 2010 09:35:23 -0500 Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60) (envelope-from ) id 1Np0MY-0006pz-4R for qemu-devel@nongnu.org; Tue, 09 Mar 2010 09:24:47 -0500 Received: from mail-qy0-f190.google.com ([209.85.221.190]:60216) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Np0MX-0006pt-RA for qemu-devel@nongnu.org; Tue, 09 Mar 2010 09:24:45 -0500 Received: by qyk28 with SMTP id 28so7483775qyk.14 for ; Tue, 09 Mar 2010 06:24:45 -0800 (PST) Message-ID: <4B965A26.5020302@codemonkey.ws> Date: Tue, 09 Mar 2010 08:24:38 -0600 From: Anthony Liguori MIME-Version: 1.0 Subject: Re: [Qemu-devel] [PATCH] adding helper pci functions References: <1267087285-15582-1-git-send-email-kraxel@redhat.com> In-Reply-To: <1267087285-15582-1-git-send-email-kraxel@redhat.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Gerd Hoffmann Cc: Izik Eidus , qemu-devel@nongnu.org On 02/25/2010 02:41 AM, Gerd Hoffmann wrote: > From: Izik Eidus > > Signed-off-by: Izik Eidus > Signed-off-by: Gerd Hoffmann > 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; >