Re: [Qemu-devel] [RfC PATCH 1/2] usb: the big rename
Il 08/03/2012 10:16, Gerd Hoffmann ha scritto: Reorganize usb source files. Create a new hw/usb/ directory and move all usb source code to that place. Also make filenames a bit more descriptive. Host adapters are prefixed with hch- now Nice tribute to Christoph, but I think I prefer hcd- as is in the patch. :) , usb device emulations are prefixed with dev-. Fixup paths Makefile and include paths to make it compile. No code changes. Let's start using include/usb instead? Paolo
Re: [Qemu-devel] [RfC PATCH 1/2] usb: the big rename
Il 09/03/2012 09:42, Gerd Hoffmann ha scritto: emulations are prefixed with dev-. Fixup paths Makefile and include paths to make it compile. No code changes. Let's start using include/usb instead? I think that needs a few more cleanups beforehand, there is a single usb.h now, guess I better should split that into usb-private and external-interfaces first. Also IIRC include/ is (also?) meant for the data structures code generators (qapi, visitors) want look at. As I understood it, the idea is to make it simply Linux-like, with public headers in include/ and private headers elsewhere. So even interfaces that are private to the USB layer, but shared among multiple directories would be in include/. I suppose the external interfaces are just to support legacy command-line and the like? Paolo
Re: [Qemu-devel] [RfC PATCH 1/2] usb: the big rename
Hi, emulations are prefixed with dev-. Fixup paths Makefile and include paths to make it compile. No code changes. Let's start using include/usb instead? I think that needs a few more cleanups beforehand, there is a single usb.h now, guess I better should split that into usb-private and external-interfaces first. Also IIRC include/ is (also?) meant for the data structures code generators (qapi, visitors) want look at. cheers, Gerd
Re: [Qemu-devel] [RfC PATCH 1/2] usb: the big rename
Hi, As I understood it, the idea is to make it simply Linux-like, with public headers in include/ and private headers elsewhere. So even interfaces that are private to the USB layer, but shared among multiple directories would be in include/. I suppose the external interfaces are just to support legacy command-line and the like? Yes, I think legacy cmd line is there. Not much else. cheers, Gerd
[Qemu-devel] [RfC PATCH 1/2] usb: the big rename
Reorganize usb source files. Create a new hw/usb/ directory and move all usb source code to that place. Also make filenames a bit more descriptive. Host adapters are prefixed with hch- now, usb device emulations are prefixed with dev-. Fixup paths Makefile and include paths to make it compile. No code changes. Signed-off-by: Gerd Hoffmann kra...@redhat.com --- Makefile.objs | 22 -- Makefile.target|2 +- configure |4 +++- hw/{usb-bus.c = usb/bus.c}|6 +++--- hw/{usb.c = usb/core.c} |2 +- hw/{usb-desc.c = usb/desc.c} |4 ++-- hw/{usb-desc.h = usb/desc.h} |0 hw/{usb-audio.c = usb/dev-audio.c}|8 hw/{usb-bt.c = usb/dev-bluetooth.c} |6 +++--- hw/{usb-hid.c = usb/dev-hid.c}|8 hw/{usb-hub.c = usb/dev-hub.c}|4 ++-- hw/{usb-net.c = usb/dev-network.c}|4 ++-- hw/{usb-serial.c = usb/dev-serial.c} |4 ++-- hw/{usb-ccid.c = usb/dev-smartcard.c} |0 hw/{usb-msd.c = usb/dev-storage.c}|6 +++--- hw/{usb-wacom.c = usb/dev-wacom.c}|6 +++--- hw/{usb-ehci.c = usb/hcd-ehci.c} |6 +++--- hw/{usb-musb.c = usb/hcd-musb.c} |6 +++--- hw/{usb-ohci.c = usb/hcd-ohci.c} | 12 ++-- hw/{usb-uhci.c = usb/hcd-uhci.c} |8 hw/{usb-xhci.c = usb/hcd-xhci.c} | 10 +- usb-bsd.c = hw/usb/host-bsd.c |0 usb-linux.c = hw/usb/host-linux.c |0 usb-stub.c = hw/usb/host-stub.c |0 hw/{usb-libhw.c = usb/libhw.c}|2 +- usb-redir.c = hw/usb/redirect.c |0 26 files changed, 67 insertions(+), 63 deletions(-) rename hw/{usb-bus.c = usb/bus.c} (99%) rename hw/{usb.c = usb/core.c} (99%) rename hw/{usb-desc.c = usb/desc.c} (99%) rename hw/{usb-desc.h = usb/desc.h} (100%) rename hw/{usb-audio.c = usb/dev-audio.c} (99%) rename hw/{usb-bt.c = usb/dev-bluetooth.c} (99%) rename hw/{usb-hid.c = usb/dev-hid.c} (99%) rename hw/{usb-hub.c = usb/dev-hub.c} (99%) rename hw/{usb-net.c = usb/dev-network.c} (99%) rename hw/{usb-serial.c = usb/dev-serial.c} (99%) rename hw/{usb-ccid.c = usb/dev-smartcard.c} (100%) rename hw/{usb-msd.c = usb/dev-storage.c} (99%) rename hw/{usb-wacom.c = usb/dev-wacom.c} (99%) rename hw/{usb-ehci.c = usb/hcd-ehci.c} (99%) rename hw/{usb-musb.c = usb/hcd-musb.c} (99%) rename hw/{usb-ohci.c = usb/hcd-ohci.c} (99%) rename hw/{usb-uhci.c = usb/hcd-uhci.c} (99%) rename hw/{usb-xhci.c = usb/hcd-xhci.c} (99%) rename usb-bsd.c = hw/usb/host-bsd.c (100%) rename usb-linux.c = hw/usb/host-linux.c (100%) rename usb-stub.c = hw/usb/host-stub.c (100%) rename hw/{usb-libhw.c = usb/libhw.c} (99%) rename usb-redir.c = hw/usb/redirect.c (100%) diff --git a/Makefile.objs b/Makefile.objs index 808de6a..a97338b 100644 --- a/Makefile.objs +++ b/Makefile.objs @@ -103,13 +103,15 @@ common-obj-y += eeprom93xx.o common-obj-y += scsi-disk.o cdrom.o common-obj-y += scsi-generic.o scsi-bus.o common-obj-y += hid.o -common-obj-y += usb.o usb-hub.o usb-$(HOST_USB).o usb-hid.o usb-msd.o usb-wacom.o -common-obj-y += usb-serial.o usb-net.o usb-bus.o usb-desc.o usb-audio.o +common-obj-y += usb/core.o usb/bus.o usb/desc.o usb/dev-hub.o +common-obj-y += usb/host-$(HOST_USB).o +common-obj-y += usb/dev-hid.o usb/dev-storage.o usb/dev-wacom.o +common-obj-y += usb/dev-serial.o usb/dev-network.o usb/dev-audio.o common-obj-$(CONFIG_SSI) += ssi.o common-obj-$(CONFIG_SSI_SD) += ssi-sd.o common-obj-$(CONFIG_SD) += sd.o -common-obj-y += bt.o bt-host.o bt-vhci.o bt-l2cap.o bt-sdp.o bt-hci.o bt-hid.o usb-bt.o -common-obj-y += bt-hci-csr.o +common-obj-y += bt.o bt-host.o bt-vhci.o bt-l2cap.o bt-sdp.o bt-hci.o bt-hid.o +common-obj-y += bt-hci-csr.o usb/dev-bluetooth.o common-obj-y += buffered_file.o migration.o migration-tcp.o common-obj-y += qemu-char.o #aio.o common-obj-y += msmouse.o ps2.o @@ -190,7 +192,7 @@ user-obj-y += $(trace-obj-y) hw-obj-y = hw-obj-y += vl.o loader.o hw-obj-$(CONFIG_VIRTIO) += virtio-console.o -hw-obj-y += usb-libhw.o +hw-obj-y += usb/libhw.o hw-obj-$(CONFIG_VIRTIO_PCI) += virtio-pci.o hw-obj-y += fw_cfg.o hw-obj-$(CONFIG_PCI) += pci.o pci_bridge.o @@ -213,10 +215,10 @@ hw-obj-$(CONFIG_PARALLEL) += parallel.o hw-obj-$(CONFIG_I8254) += i8254.o hw-obj-$(CONFIG_PCSPK) += pcspk.o hw-obj-$(CONFIG_PCKBD) += pckbd.o -hw-obj-$(CONFIG_USB_UHCI) += usb-uhci.o -hw-obj-$(CONFIG_USB_OHCI) += usb-ohci.o -hw-obj-$(CONFIG_USB_EHCI) += usb-ehci.o -hw-obj-$(CONFIG_USB_XHCI) += usb-xhci.o +hw-obj-$(CONFIG_USB_UHCI) += usb/hcd-uhci.o +hw-obj-$(CONFIG_USB_OHCI) += usb/hcd-ohci.o +hw-obj-$(CONFIG_USB_EHCI) += usb/hcd-ehci.o +hw-obj-$(CONFIG_USB_XHCI) += usb/hcd-xhci.o hw-obj-$(CONFIG_FDC) += fdc.o hw-obj-$(CONFIG_ACPI) += acpi.o acpi_piix4.o hw-obj-$(CONFIG_APM) += pm_smbus.o apm.o @@ -226,7 +228,7 @@ hw-obj-$(CONFIG_HPET) += hpet.o hw-obj-$(CONFIG_APPLESMC)
Re: [Qemu-devel] [RfC PATCH 1/2] usb: the big rename
On Thu, Mar 08, 2012 at 10:16:21AM +0100, Gerd Hoffmann wrote: Reorganize usb source files. Create a new hw/usb/ directory and move all usb source code to that place. Also make filenames a bit more descriptive. Host adapters are prefixed with hch- now, usb device emulations are prefixed with dev-. Fixup paths Makefile and include paths to make it compile. No code changes. Signed-off-by: Gerd Hoffmann kra...@redhat.com --- Makefile.objs | 22 -- Makefile.target|2 +- configure |4 +++- hw/{usb-bus.c = usb/bus.c}|6 +++--- hw/{usb.c = usb/core.c} |2 +- hw/{usb-desc.c = usb/desc.c} |4 ++-- hw/{usb-desc.h = usb/desc.h} |0 hw/{usb-audio.c = usb/dev-audio.c}|8 hw/{usb-bt.c = usb/dev-bluetooth.c} |6 +++--- hw/{usb-hid.c = usb/dev-hid.c}|8 hw/{usb-hub.c = usb/dev-hub.c}|4 ++-- hw/{usb-net.c = usb/dev-network.c}|4 ++-- hw/{usb-serial.c = usb/dev-serial.c} |4 ++-- hw/{usb-ccid.c = usb/dev-smartcard.c} |0 CCID is the name of the specification. Smartcard might be more descriptive, but if you want to be both descriptive and accurate you could do dev-smartcard-reader.c . hw/{usb-msd.c = usb/dev-storage.c}|6 +++--- hw/{usb-wacom.c = usb/dev-wacom.c}|6 +++--- hw/{usb-ehci.c = usb/hcd-ehci.c} |6 +++--- hw/{usb-musb.c = usb/hcd-musb.c} |6 +++--- hw/{usb-ohci.c = usb/hcd-ohci.c} | 12 ++-- hw/{usb-uhci.c = usb/hcd-uhci.c} |8 hw/{usb-xhci.c = usb/hcd-xhci.c} | 10 +- usb-bsd.c = hw/usb/host-bsd.c |0 usb-linux.c = hw/usb/host-linux.c |0 usb-stub.c = hw/usb/host-stub.c |0 hw/{usb-libhw.c = usb/libhw.c}|2 +- usb-redir.c = hw/usb/redirect.c |0 26 files changed, 67 insertions(+), 63 deletions(-) rename hw/{usb-bus.c = usb/bus.c} (99%) rename hw/{usb.c = usb/core.c} (99%) rename hw/{usb-desc.c = usb/desc.c} (99%) rename hw/{usb-desc.h = usb/desc.h} (100%) rename hw/{usb-audio.c = usb/dev-audio.c} (99%) rename hw/{usb-bt.c = usb/dev-bluetooth.c} (99%) rename hw/{usb-hid.c = usb/dev-hid.c} (99%) rename hw/{usb-hub.c = usb/dev-hub.c} (99%) rename hw/{usb-net.c = usb/dev-network.c} (99%) rename hw/{usb-serial.c = usb/dev-serial.c} (99%) rename hw/{usb-ccid.c = usb/dev-smartcard.c} (100%) rename hw/{usb-msd.c = usb/dev-storage.c} (99%) rename hw/{usb-wacom.c = usb/dev-wacom.c} (99%) rename hw/{usb-ehci.c = usb/hcd-ehci.c} (99%) rename hw/{usb-musb.c = usb/hcd-musb.c} (99%) rename hw/{usb-ohci.c = usb/hcd-ohci.c} (99%) rename hw/{usb-uhci.c = usb/hcd-uhci.c} (99%) rename hw/{usb-xhci.c = usb/hcd-xhci.c} (99%) rename usb-bsd.c = hw/usb/host-bsd.c (100%) rename usb-linux.c = hw/usb/host-linux.c (100%) rename usb-stub.c = hw/usb/host-stub.c (100%) rename hw/{usb-libhw.c = usb/libhw.c} (99%) rename usb-redir.c = hw/usb/redirect.c (100%) diff --git a/Makefile.objs b/Makefile.objs index 808de6a..a97338b 100644 --- a/Makefile.objs +++ b/Makefile.objs @@ -103,13 +103,15 @@ common-obj-y += eeprom93xx.o common-obj-y += scsi-disk.o cdrom.o common-obj-y += scsi-generic.o scsi-bus.o common-obj-y += hid.o -common-obj-y += usb.o usb-hub.o usb-$(HOST_USB).o usb-hid.o usb-msd.o usb-wacom.o -common-obj-y += usb-serial.o usb-net.o usb-bus.o usb-desc.o usb-audio.o +common-obj-y += usb/core.o usb/bus.o usb/desc.o usb/dev-hub.o +common-obj-y += usb/host-$(HOST_USB).o +common-obj-y += usb/dev-hid.o usb/dev-storage.o usb/dev-wacom.o +common-obj-y += usb/dev-serial.o usb/dev-network.o usb/dev-audio.o common-obj-$(CONFIG_SSI) += ssi.o common-obj-$(CONFIG_SSI_SD) += ssi-sd.o common-obj-$(CONFIG_SD) += sd.o -common-obj-y += bt.o bt-host.o bt-vhci.o bt-l2cap.o bt-sdp.o bt-hci.o bt-hid.o usb-bt.o -common-obj-y += bt-hci-csr.o +common-obj-y += bt.o bt-host.o bt-vhci.o bt-l2cap.o bt-sdp.o bt-hci.o bt-hid.o +common-obj-y += bt-hci-csr.o usb/dev-bluetooth.o common-obj-y += buffered_file.o migration.o migration-tcp.o common-obj-y += qemu-char.o #aio.o common-obj-y += msmouse.o ps2.o @@ -190,7 +192,7 @@ user-obj-y += $(trace-obj-y) hw-obj-y = hw-obj-y += vl.o loader.o hw-obj-$(CONFIG_VIRTIO) += virtio-console.o -hw-obj-y += usb-libhw.o +hw-obj-y += usb/libhw.o hw-obj-$(CONFIG_VIRTIO_PCI) += virtio-pci.o hw-obj-y += fw_cfg.o hw-obj-$(CONFIG_PCI) += pci.o pci_bridge.o @@ -213,10 +215,10 @@ hw-obj-$(CONFIG_PARALLEL) += parallel.o hw-obj-$(CONFIG_I8254) += i8254.o hw-obj-$(CONFIG_PCSPK) += pcspk.o hw-obj-$(CONFIG_PCKBD) += pckbd.o -hw-obj-$(CONFIG_USB_UHCI) += usb-uhci.o -hw-obj-$(CONFIG_USB_OHCI) += usb-ohci.o -hw-obj-$(CONFIG_USB_EHCI) += usb-ehci.o -hw-obj-$(CONFIG_USB_XHCI) += usb-xhci.o +hw-obj-$(CONFIG_USB_UHCI) +=