]> xenbits.xensource.com Git - qemu-xen.git/commitdiff
build: convert usb.mak to Kconfig
authorPaolo Bonzini <pbonzini@redhat.com>
Wed, 23 Jan 2019 06:56:06 +0000 (14:56 +0800)
committerPaolo Bonzini <pbonzini@redhat.com>
Thu, 7 Mar 2019 20:45:53 +0000 (21:45 +0100)
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=${i%=y}; i=${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 <pbonzini@redhat.com>
Signed-off-by: Yang Zhong <yang.zhong@intel.com>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Message-Id: <20190123065618.3520-33-yang.zhong@intel.com>
Acked-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
14 files changed:
default-configs/alpha-softmmu.mak
default-configs/arm-softmmu.mak
default-configs/hppa-softmmu.mak
default-configs/i386-softmmu.mak
default-configs/mips-softmmu-common.mak
default-configs/ppc-softmmu.mak
default-configs/riscv32-softmmu.mak
default-configs/riscv64-softmmu.mak
default-configs/sh4-softmmu.mak
default-configs/sh4eb-softmmu.mak
default-configs/sparc64-softmmu.mak
default-configs/usb.mak [deleted file]
hw/usb/Kconfig
hw/usb/Makefile.objs

index d19d920fc31f189b3d274200f59afceef86f856b..e1017aad65b2af67ecd499dc416705b1def89a00 100644 (file)
@@ -1,6 +1,5 @@
 # Default configuration for alpha-softmmu
 
-include usb.mak
 CONFIG_PCI=y
 CONFIG_PCI_DEVICES=y
 CONFIG_SERIAL=y
index e9a972f9c882d085dfbc1ef056aaee768ec003fc..0d2aa65266d4df4fc8e165824c57a0adf300f8ce 100644 (file)
@@ -1,6 +1,5 @@
 # Default configuration for arm-softmmu
 
-include usb.mak
 CONFIG_PCI=y
 CONFIG_PCI_DEVICES=y
 CONFIG_VGA=y
@@ -38,7 +37,6 @@ 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
index 85a201184aedcdf45a89bd382d87dd5287d60e76..5089a94866c8f0848ef2d6fac54360f5f445d0a7 100644 (file)
@@ -1,4 +1,3 @@
-include usb.mak
 CONFIG_PCI=y
 CONFIG_PCI_DEVICES=y
 CONFIG_SERIAL=y
index db841b68852d81c85752a2f921a61f82d9244c69..60356edbf00dec9f72e225319324c9a81777f32e 100644 (file)
@@ -3,7 +3,6 @@
 CONFIG_PCI=y
 CONFIG_PCI_DEVICES=y
 CONFIG_ISA_BUS=y
-include usb.mak
 include hyperv.mak
 CONFIG_TEST_DEVICES=y
 CONFIG_VGA_ISA=y
index 4a489604eb466f7f604bb252c615ef1c626063a2..90a2412e26742aa35708fdc62a485f6a2ac54315 100644 (file)
@@ -1,6 +1,5 @@
 # Common mips*-softmmu CONFIG defines
 
-include usb.mak
 CONFIG_ISA_BUS=y
 CONFIG_PCI=y
 CONFIG_PCI_DEVICES=y
index f1d06f43fcee46bc06069489c1f784fefd478636..f5df65f06fd15d70e86197d0fbf27f5b1bb51e9c 100644 (file)
@@ -1,6 +1,5 @@
 # Default configuration for ppc-softmmu
 
-include usb.mak
 CONFIG_ISA_BUS=y
 CONFIG_PCI=y
 CONFIG_PCI_DEVICES=y
index 5501c1b884d8a77943535b7eed68a4f4925c4444..fd91efb3e34110923481c9633a945ee1e6d01931 100644 (file)
@@ -1,6 +1,5 @@
 # Default configuration for riscv-softmmu
 
-include usb.mak
 CONFIG_PCI=y
 CONFIG_PCI_DEVICES=y
 CONFIG_SERIAL=y
index 5501c1b884d8a77943535b7eed68a4f4925c4444..fd91efb3e34110923481c9633a945ee1e6d01931 100644 (file)
@@ -1,6 +1,5 @@
 # Default configuration for riscv-softmmu
 
-include usb.mak
 CONFIG_PCI=y
 CONFIG_PCI_DEVICES=y
 CONFIG_SERIAL=y
index 4c33d341d97b60e345529c87065c14b7e31ac12c..651fe1a3057358a61155a71f940dffba722e70ad 100644 (file)
@@ -1,6 +1,5 @@
 # Default configuration for sh4-softmmu
 
-include usb.mak
 CONFIG_PCI=y
 CONFIG_PCI_DEVICES=y
 CONFIG_SERIAL=y
index 71f81dad1357596261619789635d11ca16c1ae0c..fa3e07e86d6adb4d8349d60aba9bbccbbc0e2af8 100644 (file)
@@ -1,6 +1,5 @@
 # Default configuration for sh4eb-softmmu
 
-include usb.mak
 CONFIG_PCI=y
 CONFIG_PCI_DEVICES=y
 CONFIG_SERIAL=y
index cb707983888c9a32e0fcab07361bced8447f4a8e..24d738991a182614b293dc38da3eb363cfc0609d 100644 (file)
@@ -1,6 +1,5 @@
 # Default configuration for sparc64-softmmu
 
-include usb.mak
 CONFIG_PCI=y
 CONFIG_PCI_DEVICES=y
 CONFIG_M48T59=y
diff --git a/default-configs/usb.mak b/default-configs/usb.mak
deleted file mode 100644 (file)
index e42cfea..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-CONFIG_USB=y
-CONFIG_USB_TABLET_WACOM=y
-CONFIG_USB_STORAGE_BOT=y
-CONFIG_USB_STORAGE_UAS=y
-CONFIG_USB_STORAGE_MTP=y
-CONFIG_SCSI=y
-CONFIG_USB_SMARTCARD=y
-CONFIG_USB_AUDIO=y
-CONFIG_USB_SERIAL=y
-CONFIG_USB_NETWORK=y
-CONFIG_USB_BLUETOOTH=y
index 86ee615022f51473fc153c2688fd4f43450b49b2..e20670aa5d19f6d6f9a65c1eebcce91ae3b52a2c 100644 (file)
@@ -5,59 +5,85 @@ config USB_UHCI
     bool
     default y if PCI_DEVICES
     depends on PCI
+    select USB
 
 config USB_OHCI
     bool
     default y if PCI_DEVICES
     depends on PCI
+    select USB
 
 config USB_EHCI
     bool
     default y if PCI_DEVICES
     depends on PCI
+    select USB
 
 config USB_EHCI_SYSBUS
     bool
+    select USB
 
 config USB_XHCI
     bool
     default y if PCI_DEVICES
     depends on PCI
+    select USB
 
 config USB_XHCI_NEC
     bool
     default y if PCI_DEVICES
     depends on PCI
+    select USB
 
 config USB_MUSB
     bool
+    select USB
 
 config TUSB6010
     bool
+    select USB_MUSB
 
 config USB_TABLET_WACOM
     bool
+    default y
+    depends on USB
 
 config USB_STORAGE_BOT
     bool
+    default y
+    depends on USB
 
 config USB_STORAGE_UAS
     bool
+    default y
+    depends on USB
 
 config USB_AUDIO
     bool
+    default y
+    depends on USB
 
 config USB_SERIAL
     bool
+    default y
+    depends on USB
 
 config USB_NETWORK
     bool
+    default y
+    depends on USB
 
 config USB_BLUETOOTH
     bool
+    default y
+    depends on USB
 
 config USB_SMARTCARD
     bool
+    default y
+    depends on USB
 
 config USB_STORAGE_MTP
     bool
+    default y
+    depends on USB
index 41be700812a920e00a61b969cc0f07f312d87ded..2b929649acd03e8ec98cae7dc51ba754e5c730c6 100644 (file)
@@ -6,7 +6,7 @@ common-obj-$(CONFIG_USB) += desc.o desc-msos.o
 common-obj-$(CONFIG_USB_UHCI) += hcd-uhci.o
 common-obj-$(CONFIG_USB_OHCI) += hcd-ohci.o
 common-obj-$(CONFIG_USB_EHCI) += hcd-ehci.o hcd-ehci-pci.o
-common-obj-$(CONFIG_USB_EHCI_SYSBUS) += hcd-ehci-sysbus.o
+common-obj-$(CONFIG_USB_EHCI_SYSBUS) += hcd-ehci.o hcd-ehci-sysbus.o
 common-obj-$(CONFIG_USB_XHCI) += hcd-xhci.o
 common-obj-$(CONFIG_USB_XHCI_NEC) += hcd-xhci-nec.o
 common-obj-$(CONFIG_USB_MUSB) += hcd-musb.o