From nobody Fri Nov 7 04:11:24 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=intel.com Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1545893534431387.1148964921965; Wed, 26 Dec 2018 22:52:14 -0800 (PST) Received: from localhost ([127.0.0.1]:49845 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gcPWf-0006go-2O for importer@patchew.org; Thu, 27 Dec 2018 01:52:13 -0500 Received: from eggs.gnu.org ([208.118.235.92]:54818) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gcPGd-0003FB-4w for qemu-devel@nongnu.org; Thu, 27 Dec 2018 01:35:43 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gcPGO-0004O5-L0 for qemu-devel@nongnu.org; Thu, 27 Dec 2018 01:35:30 -0500 Received: from mga11.intel.com ([192.55.52.93]:57858) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gcPGO-0004B3-Bl for qemu-devel@nongnu.org; Thu, 27 Dec 2018 01:35:24 -0500 Received: from orsmga006.jf.intel.com ([10.7.209.51]) by fmsmga102.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 26 Dec 2018 22:35:19 -0800 Received: from he.bj.intel.com ([10.238.157.85]) by orsmga006.jf.intel.com with ESMTP; 26 Dec 2018 22:35:17 -0800 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.56,404,1539673200"; d="scan'208";a="103617316" From: Yang Zhong To: qemu-devel@nongnu.org Date: Thu, 27 Dec 2018 14:34:06 +0800 Message-Id: <20181227063419.12981-13-yang.zhong@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20181227063419.12981-1-yang.zhong@intel.com> References: <20181227063419.12981-1-yang.zhong@intel.com> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 192.55.52.93 Subject: [Qemu-devel] [RFC PATCH 12/25] build: convert usb.mak to Kconfig X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: yang.zhong@intel.com, peter.maydell@linaro.org, thuth@redhat.com, sameo@linux.intel.com, pbonzini@redhat.com, ehabkost@redhat.com Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" From: Paolo Bonzini Instead of including the same list of devices for each target, let the host controllers select CONFIG_USB and make the devices default to present whenever USB is available. Done with the following script: while read i; do i=3D${i%=3Dy}; i=3D${i#CONFIG_} sed -i -e'/^config '$i'$/!b' -en \ -e'a\' -e' default y\' -e' depends on USB' \ `grep -lw $i hw/*/Kconfig` done < default-configs/usb.mak followed by adding "select USB" on the host controllers. Signed-off-by: Paolo Bonzini Signed-off-by: Yang Zhong Reviewed-by: Thomas Huth --- default-configs/i386-softmmu.mak | 1 - default-configs/usb.mak | 11 ----------- hw/usb/Kconfig | 26 ++++++++++++++++++++++++++ 3 files changed, 26 insertions(+), 12 deletions(-) delete mode 100644 default-configs/usb.mak diff --git a/default-configs/i386-softmmu.mak b/default-configs/i386-softmm= u.mak index 275e72f3c6..e152590d15 100644 --- a/default-configs/i386-softmmu.mak +++ b/default-configs/i386-softmmu.mak @@ -2,7 +2,6 @@ =20 CONFIG_PCI=3Dy CONFIG_ISA=3Dy -include usb.mak include hyperv.mak CONFIG_VGA_ISA=3Dy CONFIG_VGA_CIRRUS=3Dy diff --git a/default-configs/usb.mak b/default-configs/usb.mak deleted file mode 100644 index e42cfeabbe..0000000000 --- a/default-configs/usb.mak +++ /dev/null @@ -1,11 +0,0 @@ -CONFIG_USB=3Dy -CONFIG_USB_TABLET_WACOM=3Dy -CONFIG_USB_STORAGE_BOT=3Dy -CONFIG_USB_STORAGE_UAS=3Dy -CONFIG_USB_STORAGE_MTP=3Dy -CONFIG_SCSI=3Dy -CONFIG_USB_SMARTCARD=3Dy -CONFIG_USB_AUDIO=3Dy -CONFIG_USB_SERIAL=3Dy -CONFIG_USB_NETWORK=3Dy -CONFIG_USB_BLUETOOTH=3Dy diff --git a/hw/usb/Kconfig b/hw/usb/Kconfig index f23c542d27..0b8f41040e 100644 --- a/hw/usb/Kconfig +++ b/hw/usb/Kconfig @@ -5,59 +5,85 @@ config USB_UHCI bool default y depends on PCI + select USB =20 config USB_OHCI bool default y depends on PCI + select USB =20 config USB_EHCI bool default y depends on PCI + select USB =20 config USB_EHCI_SYSBUS bool + select USB =20 config USB_XHCI bool default y depends on PCI + select USB =20 config USB_XHCI_NEC bool default y depends on PCI + select USB =20 config USB_MUSB bool + select USB =20 config TUSB6010 bool + select USB_MUSB =20 config USB_TABLET_WACOM bool + default y + depends on USB =20 config USB_STORAGE_BOT bool + default y + depends on USB =20 config USB_STORAGE_UAS bool + default y + depends on USB =20 config USB_AUDIO bool + default y + depends on USB =20 config USB_SERIAL bool + default y + depends on USB =20 config USB_NETWORK bool + default y + depends on USB =20 config USB_BLUETOOTH bool + default y + depends on USB =20 config USB_SMARTCARD bool + default y + depends on USB =20 config USB_STORAGE_MTP bool + default y + depends on USB --=20 2.17.1