From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NInWw-0005cs-RJ for qemu-devel@nongnu.org; Thu, 10 Dec 2009 13:14:22 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NInWs-0005aI-1M for qemu-devel@nongnu.org; Thu, 10 Dec 2009 13:14:22 -0500 Received: from [199.232.76.173] (port=41860 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NInWr-0005Zt-PZ for qemu-devel@nongnu.org; Thu, 10 Dec 2009 13:14:17 -0500 Received: from mx1.redhat.com ([209.132.183.28]:45647) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NInWs-0003kN-Ap for qemu-devel@nongnu.org; Thu, 10 Dec 2009 13:14:18 -0500 Date: Thu, 10 Dec 2009 20:11:32 +0200 From: "Michael S. Tsirkin" Message-ID: <20091210181132.GP25707@redhat.com> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Subject: [Qemu-devel] [PATCH 15/17] usb-uhci: symbolic names for pci registers List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Anthony Liguori , qemu-devel@nongnu.org No functional changes. I verified that the generated binary does not change. Signed-off-by: Michael S. Tsirkin --- hw/usb-uhci.c | 7 ++++--- 1 files changed, 4 insertions(+), 3 deletions(-) diff --git a/hw/usb-uhci.c b/hw/usb-uhci.c index ba26a4e..70a98c6 100644 --- a/hw/usb-uhci.c +++ b/hw/usb-uhci.c @@ -1065,11 +1065,12 @@ static int usb_uhci_common_initfn(UHCIState *s) uint8_t *pci_conf = s->dev.config; int i; - pci_conf[0x08] = 0x01; // revision number - pci_conf[0x09] = 0x00; + pci_conf[PCI_REVISION_ID] = 0x01; // revision number + pci_conf[PCI_CLASS_PROG] = 0x00; pci_config_set_class(pci_conf, PCI_CLASS_SERIAL_USB); pci_conf[PCI_HEADER_TYPE] = PCI_HEADER_TYPE_NORMAL; // header_type - pci_conf[0x3d] = 4; // interrupt pin 3 + /* TODO: reset value should be 0. */ + pci_conf[PCI_INTERRUPT_PIN] = 4; // interrupt pin 3 pci_conf[0x60] = 0x10; // release number usb_bus_new(&s->bus, &s->dev.qdev); -- 1.6.6.rc1.43.gf55cc