From patchwork Fri Oct 19 20:43:41 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jason Baron X-Patchwork-Id: 192868 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 16DD42C0040 for ; Sat, 20 Oct 2012 09:43:15 +1100 (EST) Received: from localhost ([::1]:57745 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TPJR9-0006mH-RM for incoming@patchwork.ozlabs.org; Fri, 19 Oct 2012 16:44:55 -0400 Received: from eggs.gnu.org ([208.118.235.92]:49948) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TPJQ1-00055M-NG for qemu-devel@nongnu.org; Fri, 19 Oct 2012 16:43:46 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TPJQ0-0006cA-PF for qemu-devel@nongnu.org; Fri, 19 Oct 2012 16:43:45 -0400 Received: from mx1.redhat.com ([209.132.183.28]:38153) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TPJQ0-0006bi-FM for qemu-devel@nongnu.org; Fri, 19 Oct 2012 16:43:44 -0400 Received: from int-mx12.intmail.prod.int.phx2.redhat.com (int-mx12.intmail.prod.int.phx2.redhat.com [10.5.11.25]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id q9JKhgbP014426 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Fri, 19 Oct 2012 16:43:42 -0400 Received: from redhat.com (dhcp-185-114.bos.redhat.com [10.16.185.114]) by int-mx12.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id q9JKhflQ004878; Fri, 19 Oct 2012 16:43:42 -0400 Date: Fri, 19 Oct 2012 16:43:41 -0400 From: Jason Baron To: qemu-devel@nongnu.org Message-Id: In-Reply-To: References: X-Scanned-By: MIMEDefang 2.68 on 10.5.11.25 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 209.132.183.28 Cc: aliguori@us.ibm.com, juzhang@redhat.com, mst@redhat.com, jan.kiszka@siemens.com, armbru@redhat.com, agraf@suse.de, blauwirbel@gmail.com, yamahata@valinux.co.jp, alex.williamson@redhat.com, kevin@koconnor.net, avi@redhat.com, mkletzan@redhat.com, pbonzini@redhat.com, lcapitulino@redhat.com, afaerber@suse.de, kraxel@redhat.com Subject: [Qemu-devel] [PATCH v3 25/26] q35: fill in usb pci slots with -usb X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org From: Jason Baron This fills out the usb slots on q35, when -usb is passed. We now have (lspci output): 00:1d.0 USB Controller: Intel Corporation 82801I (ICH9 Family) USB UHCI Controller #1 (rev 03) 00:1d.1 USB Controller: Intel Corporation 82801I (ICH9 Family) USB UHCI Controller #2 (rev 03) 00:1d.2 USB Controller: Intel Corporation 82801I (ICH9 Family) USB UHCI Controller #3 (rev 03) 00:1d.7 USB Controller: Intel Corporation 82801I (ICH9 Family) USB2 EHCI Controller #1 (rev 03) Signed-off-by: Jason Baron --- hw/ich9.h | 5 ++++- hw/pc_q35.c | 11 ++++++++++- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/hw/ich9.h b/hw/ich9.h index de49135..9e19266 100644 --- a/hw/ich9.h +++ b/hw/ich9.h @@ -87,8 +87,11 @@ typedef struct ICH9LPCState { /* D29:F0 USB UHCI Controller #1 */ -#define ICH9_USB_UHCI1_DEV 29 +#define ICH9_USB_DEV 29 #define ICH9_USB_UHCI1_FUNC 0 +#define ICH9_USB_UHCI2_FUNC 1 +#define ICH9_USB_UHCI3_FUNC 2 +#define ICH9_USB_EHCI1_FUNC 7 /* D30:F0 DMI-to-PCI brdige */ #define ICH9_D2P_BRIDGE "ICH9 D2P BRIDGE" diff --git a/hw/pc_q35.c b/hw/pc_q35.c index ca30b65..bde3749 100644 --- a/hw/pc_q35.c +++ b/hw/pc_q35.c @@ -185,8 +185,17 @@ static void pc_q35_init_late(BusState **idebus, ISADevice *rtc_state, if (usb_enabled) { /* Should we create 6 UHCI according to ich9 spec? */ pci_create_simple_multifunction( - host_bus, PCI_DEVFN(ICH9_USB_UHCI1_DEV, ICH9_USB_UHCI1_FUNC), + host_bus, PCI_DEVFN(ICH9_USB_DEV, ICH9_USB_UHCI1_FUNC), true, "ich9-usb-uhci1"); + pci_create_simple_multifunction( + host_bus, PCI_DEVFN(ICH9_USB_DEV, ICH9_USB_UHCI2_FUNC), + true, "ich9-usb-uhci2"); + pci_create_simple_multifunction( + host_bus, PCI_DEVFN(ICH9_USB_DEV, ICH9_USB_UHCI3_FUNC), + true, "ich9-usb-uhci3"); + pci_create_simple_multifunction( + host_bus, PCI_DEVFN(ICH9_USB_DEV, ICH9_USB_EHCI1_FUNC), + true, "ich9-usb-ehci1"); /* XXX: EHCI */ }