From patchwork Sat Mar 14 05:33:35 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Huth X-Patchwork-Id: 450157 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id D5E001400EA for ; Sat, 14 Mar 2015 16:34:07 +1100 (AEDT) Received: from localhost ([::1]:39653 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YWei4-0002tq-VQ for incoming@patchwork.ozlabs.org; Sat, 14 Mar 2015 01:34:04 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:56955) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YWeho-0002dM-DE for qemu-devel@nongnu.org; Sat, 14 Mar 2015 01:33:49 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YWehj-0002zT-CP for qemu-devel@nongnu.org; Sat, 14 Mar 2015 01:33:48 -0400 Received: from e06smtp13.uk.ibm.com ([195.75.94.109]:35381) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YWehj-0002xV-27 for qemu-devel@nongnu.org; Sat, 14 Mar 2015 01:33:43 -0400 Received: from /spool/local by e06smtp13.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Sat, 14 Mar 2015 05:33:40 -0000 Received: from d06dlp02.portsmouth.uk.ibm.com (9.149.20.14) by e06smtp13.uk.ibm.com (192.168.101.143) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Sat, 14 Mar 2015 05:33:37 -0000 Received: from b06cxnps4076.portsmouth.uk.ibm.com (d06relay13.portsmouth.uk.ibm.com [9.149.109.198]) by d06dlp02.portsmouth.uk.ibm.com (Postfix) with ESMTP id EACD6219004D; Sat, 14 Mar 2015 05:33:26 +0000 (GMT) Received: from d06av09.portsmouth.uk.ibm.com (d06av09.portsmouth.uk.ibm.com [9.149.37.250]) by b06cxnps4076.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id t2E5Xae77930278; Sat, 14 Mar 2015 05:33:36 GMT Received: from d06av09.portsmouth.uk.ibm.com (localhost [127.0.0.1]) by d06av09.portsmouth.uk.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id t2E5XaS4025289; Fri, 13 Mar 2015 23:33:36 -0600 Received: from oc7435384737.ibm.com (sig-9-84-84-76.evts.de.ibm.com [9.84.84.76]) by d06av09.portsmouth.uk.ibm.com (8.14.4/8.14.4/NCO v10.0 AVin) with ESMTP id t2E5XZ7i025274; Fri, 13 Mar 2015 23:33:35 -0600 From: Thomas Huth To: qemu-devel@nongnu.org, Gerd Hoffmann Date: Sat, 14 Mar 2015 06:33:35 +0100 Message-Id: <1426311215-12764-1-git-send-email-thuth@linux.vnet.ibm.com> X-Mailer: git-send-email 1.7.1 X-TM-AS-MML: disable X-Content-Scanned: Fidelis XPS MAILER x-cbid: 15031405-0013-0000-0000-0000034D577A X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 195.75.94.109 Cc: qemu-trivial@nongnu.org, Thomas Huth Subject: [Qemu-devel] [PATCH] hw/usb: Include USB files only if necessary 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 Boards that do not include an USB controller should not provide USB devices. However, when running "qemu-system-s390x -device help" for example, there's still a usb-hub, usb-kbd, usb-mouse and usb-tablet in the list of "supported" devices. Let's fix that by compiling and linking the USB files only if it's really necessary. Signed-off-by: Thomas Huth --- default-configs/arm-softmmu.mak | 1 + default-configs/usb.mak | 1 + hw/usb/Makefile.objs | 8 ++++---- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/default-configs/arm-softmmu.mak b/default-configs/arm-softmmu.mak index 87d4e34..a767e4b 100644 --- a/default-configs/arm-softmmu.mak +++ b/default-configs/arm-softmmu.mak @@ -32,6 +32,7 @@ CONFIG_DS1338=y CONFIG_PFLASH_CFI01=y CONFIG_PFLASH_CFI02=y CONFIG_MICRODRIVE=y +CONFIG_USB=y CONFIG_USB_MUSB=y CONFIG_USB_EHCI_SYSBUS=y CONFIG_PLATFORM_BUS=y diff --git a/default-configs/usb.mak b/default-configs/usb.mak index 73d8489..f4b8568 100644 --- a/default-configs/usb.mak +++ b/default-configs/usb.mak @@ -1,3 +1,4 @@ +CONFIG_USB=y CONFIG_USB_TABLET_WACOM=y CONFIG_USB_STORAGE_BOT=y CONFIG_USB_STORAGE_UAS=y diff --git a/hw/usb/Makefile.objs b/hw/usb/Makefile.objs index 0ccd477..c514831 100644 --- a/hw/usb/Makefile.objs +++ b/hw/usb/Makefile.objs @@ -1,6 +1,6 @@ # usb subsystem core -common-obj-y += core.o combined-packet.o bus.o desc.o desc-msos.o -common-obj-y += libhw.o +common-obj-y += core.o bus.o libhw.o +common-obj-$(CONFIG_USB) += combined-packet.o desc.o desc-msos.o # usb host adapters common-obj-$(CONFIG_USB_UHCI) += hcd-uhci.o @@ -11,8 +11,8 @@ common-obj-$(CONFIG_USB_XHCI) += hcd-xhci.o common-obj-$(CONFIG_USB_MUSB) += hcd-musb.o # emulated usb devices -common-obj-y += dev-hub.o -common-obj-y += dev-hid.o +common-obj-$(CONFIG_USB) += dev-hub.o +common-obj-$(CONFIG_USB) += dev-hid.o common-obj-$(CONFIG_USB_TABLET_WACOM) += dev-wacom.o common-obj-$(CONFIG_USB_STORAGE_BOT) += dev-storage.o common-obj-$(CONFIG_USB_STORAGE_UAS) += dev-uas.o