From patchwork Wed Mar 18 13:07:52 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gerd Hoffmann X-Patchwork-Id: 451437 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 75DDA14008F for ; Thu, 19 Mar 2015 00:13:11 +1100 (AEDT) Received: from localhost ([::1]:33471 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YYDmX-0007Ow-0v for incoming@patchwork.ozlabs.org; Wed, 18 Mar 2015 09:13:09 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:54918) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YYDhl-0006ZU-Pp for qemu-devel@nongnu.org; Wed, 18 Mar 2015 09:08:21 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YYDha-0005wf-Pp for qemu-devel@nongnu.org; Wed, 18 Mar 2015 09:08:13 -0400 Received: from mx1.redhat.com ([209.132.183.28]:56885) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YYDha-0005w2-Kd for qemu-devel@nongnu.org; Wed, 18 Mar 2015 09:08:02 -0400 Received: from int-mx13.intmail.prod.int.phx2.redhat.com (int-mx13.intmail.prod.int.phx2.redhat.com [10.5.11.26]) by mx1.redhat.com (Postfix) with ESMTPS id 5FB48306026; Wed, 18 Mar 2015 13:08:02 +0000 (UTC) Received: from nilsson.home.kraxel.org (ovpn-116-45.ams2.redhat.com [10.36.116.45]) by int-mx13.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id t2ID81E1021078; Wed, 18 Mar 2015 09:08:01 -0400 Received: by nilsson.home.kraxel.org (Postfix, from userid 500) id E6C5680E79; Wed, 18 Mar 2015 14:07:59 +0100 (CET) From: Gerd Hoffmann To: qemu-devel@nongnu.org Date: Wed, 18 Mar 2015 14:07:52 +0100 Message-Id: <1426684075-27224-11-git-send-email-kraxel@redhat.com> In-Reply-To: <1426684075-27224-1-git-send-email-kraxel@redhat.com> References: <1426684075-27224-1-git-send-email-kraxel@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.26 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 209.132.183.28 Cc: Thomas Huth , Gerd Hoffmann Subject: [Qemu-devel] [PULL 10/13] 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 From: Thomas Huth 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 is really necessary. Signed-off-by: Thomas Huth Signed-off-by: Gerd Hoffmann --- 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..7443e38 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 combined-packet.o bus.o libhw.o +common-obj-$(CONFIG_USB) += 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