Received: from eggs.gnu.org ([140.186.70.92]:59727) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qf7im-0005d8-4v for qemu-devel@nongnu.org; Fri, 08 Jul 2011 05:51:41 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Qf7ik-0004mP-6g for qemu-devel@nongnu.org; Fri, 08 Jul 2011 05:51:39 -0400 Received: from mx1.redhat.com ([209.132.183.28]:61216) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qf7ij-0004iW-Ks for qemu-devel@nongnu.org; Fri, 08 Jul 2011 05:51:38 -0400 Received: from int-mx02.intmail.prod.int.phx2.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id p689pac5019552 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Fri, 8 Jul 2011 05:51:36 -0400 From: Gerd Hoffmann Date: Fri, 8 Jul 2011 11:51:08 +0200 Message-Id: <1310118673-26196-19-git-send-email-kraxel@redhat.com> In-Reply-To: <1310118673-26196-1-git-send-email-kraxel@redhat.com> References: <1310118673-26196-1-git-send-email-kraxel@redhat.com> Subject: [Qemu-devel] [PATCH 18/23] ehci: add ich9 controller. List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Gerd Hoffmann Signed-off-by: Gerd Hoffmann --- hw/usb-ehci.c | 43 +++++++++++++++++++++++++++++-------------- 1 files changed, 29 insertions(+), 14 deletions(-) diff --git a/hw/usb-ehci.c b/hw/usb-ehci.c index 0b959ca..a4758f9 100644 --- a/hw/usb-ehci.c +++ b/hw/usb-ehci.c @@ -2244,19 +2244,34 @@ static USBBusOps ehci_bus_ops = { .register_companion = ehci_register_companion, }; -static PCIDeviceInfo ehci_info = { - .qdev.name = "usb-ehci", - .qdev.size = sizeof(EHCIState), - .init = usb_ehci_initfn, - .vendor_id = PCI_VENDOR_ID_INTEL, - .device_id = PCI_DEVICE_ID_INTEL_82801D, - .revision = 0x10, - .class_id = PCI_CLASS_SERIAL_USB, - .qdev.props = (Property[]) { - DEFINE_PROP_UINT32("freq", EHCIState, freq, FRAME_TIMER_FREQ), - DEFINE_PROP_UINT32("maxframes", EHCIState, maxframes, 128), - DEFINE_PROP_END_OF_LIST(), - }, +static Property ehci_properties[] = { + DEFINE_PROP_UINT32("freq", EHCIState, freq, FRAME_TIMER_FREQ), + DEFINE_PROP_UINT32("maxframes", EHCIState, maxframes, 128), + DEFINE_PROP_END_OF_LIST(), +}; + +static PCIDeviceInfo ehci_info[] = { + { + .qdev.name = "usb-ehci", + .qdev.size = sizeof(EHCIState), + .init = usb_ehci_initfn, + .vendor_id = PCI_VENDOR_ID_INTEL, + .device_id = PCI_DEVICE_ID_INTEL_82801D, /* ich4 */ + .revision = 0x10, + .class_id = PCI_CLASS_SERIAL_USB, + .qdev.props = ehci_properties, + },{ + .qdev.name = "ich9-usb-ehci1", + .qdev.size = sizeof(EHCIState), + .init = usb_ehci_initfn, + .vendor_id = PCI_VENDOR_ID_INTEL, + .device_id = PCI_DEVICE_ID_INTEL_82801I_EHCI1, + .revision = 0x03, + .class_id = PCI_CLASS_SERIAL_USB, + .qdev.props = ehci_properties, + },{ + /* end of list */ + } }; static int usb_ehci_initfn(PCIDevice *dev) @@ -2335,7 +2350,7 @@ static int usb_ehci_initfn(PCIDevice *dev) static void ehci_register(void) { - pci_qdev_register(&ehci_info); + pci_qdev_register_many(ehci_info); } device_init(ehci_register); -- 1.7.1