From patchwork Sat Jul 4 14:49:38 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 278588 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.5 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2AB3EC433DF for ; Sat, 4 Jul 2020 15:06:32 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id D8F13208D5 for ; Sat, 4 Jul 2020 15:06:31 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="pCckQw2f" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org D8F13208D5 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=amsat.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:39554 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jrjkN-0005in-3t for qemu-devel@archiver.kernel.org; Sat, 04 Jul 2020 11:06:31 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:57966) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jrjUy-0002SH-GZ; Sat, 04 Jul 2020 10:50:36 -0400 Received: from mail-wm1-x344.google.com ([2a00:1450:4864:20::344]:53820) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jrjUv-0003v4-WC; Sat, 04 Jul 2020 10:50:36 -0400 Received: by mail-wm1-x344.google.com with SMTP id j18so34715877wmi.3; Sat, 04 Jul 2020 07:50:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=BVN2tL6FsOSYOSZ1Rnc/AWNY9pAl08p/yTnmHBA4/lE=; b=pCckQw2fpxMWuUrRXy5Fj3fHnP1lNxTV/c5641pZ9JVVlE/7SDn5Q+r8sSpmGeHEtX DQ82DdmBJfjkp7u54KKO9Ay1CQm1OqoeBDjN4toemHPaBd5JcfQL3QaYsoKMSYnMcZ86 cZkSflzpX4ea7A2bLQiMRirFJDw5g/vdSSr9sfwJoCmDfKl2BVC60kE20D3yzbnZa1ls bJh1WPioULkSM6b3/MugK1q0os9mcW2PgGSAqfRiQY3jHTvkj9TCGs9ygvVJCLAyMiEa nPCSpr4C+N0nVyXsOtCts8cDGKX+c88yfVcUQmPePkBlul0t7jTng4E9ABkXxABaOIFb KvpQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=BVN2tL6FsOSYOSZ1Rnc/AWNY9pAl08p/yTnmHBA4/lE=; b=hVeXbWqRh247wjSBodhxfK13UP+/GmGdmiB8ouCeckizgdrNZ4O5Ygw6CxRyvCtKGA h8SDL5R5hydwjjxplPnwOFozKh7YOmBHGJEauQprGRx8QkKqc3YrsBhbSaMbglPxYSbM QTe0bZMA1V7Yk0XJHs7Ic6cn8ML8NChsI02JmJsiIBiZd3xQrRsGtpkXGXNb4shQ4Elv XmxxjtgUBc+c0MxCGOPugXlJdexnlmGpmcT2OB6TZhsdXM/dXXbcRGpqQA0JVVXFH8+0 AbcEHImWnjNn5Q5u5T4JHszNAXS9Xyfddo4wI675V9sg1kinXey3JS/Fr0+t58nw5OJy 6kdQ== X-Gm-Message-State: AOAM532wo2A3y/UIWKZglTdyhM736pTIfwiSL96AZoth3+cpVKRLGU5y j7aS1x0WHL9v0jUNJ+nQr0FTw9T7LVc= X-Google-Smtp-Source: ABdhPJwaQwLIlLdyKxBkKPa8GBks7V8EDYQ/7hiL57HMX9nYvfh3kbH/YgCk6NdT+Qi4tqQqI6p6nw== X-Received: by 2002:a7b:cc08:: with SMTP id f8mr43795677wmh.106.1593874230724; Sat, 04 Jul 2020 07:50:30 -0700 (PDT) Received: from localhost.localdomain (1.red-83-51-162.dynamicip.rima-tde.net. [83.51.162.1]) by smtp.gmail.com with ESMTPSA id r10sm17135019wrm.17.2020.07.04.07.50.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 04 Jul 2020 07:50:30 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org, BALATON Zoltan Subject: [PATCH 21/26] hw/usb: Move internal API to local 'usb-internal.h' header Date: Sat, 4 Jul 2020 16:49:38 +0200 Message-Id: <20200704144943.18292-22-f4bug@amsat.org> X-Mailer: git-send-email 2.21.3 In-Reply-To: <20200704144943.18292-1-f4bug@amsat.org> References: <20200704144943.18292-1-f4bug@amsat.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::344; envelope-from=philippe.mathieu.daude@gmail.com; helo=mail-wm1-x344.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: 0 X-Spam_score: 0.0 X-Spam_bar: / X-Spam_report: (0.0 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=1, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Peter Maydell , "Michael S. Tsirkin" , Mark Cave-Ayland , Gerd Hoffmann , "Edgar E. Iglesias" , Huacai Chen , Stefano Stabellini , xen-devel@lists.xenproject.org, Yoshinori Sato , Paul Durrant , Magnus Damm , Markus Armbruster , =?utf-8?q?Herv=C3=A9_Poussineau?= , Anthony Perard , Samuel Thibault , Leif Lindholm , Aleksandar Rikalo , Eduardo Habkost , Alistair Francis , "Dr. David Alan Gilbert" , Beniamino Galvani , Niek Linnenbank , qemu-arm@nongnu.org, =?utf-8?q?Marc-Andr=C3=A9_Lureau?= , Richard Henderson , Radoslaw Biernacki , Igor Mitsyanko , =?utf-8?q?Philippe_Mathieu-Da?= =?utf-8?q?ud=C3=A9?= , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Paul Zimmerman , qemu-ppc@nongnu.org, David Gibson , Paolo Bonzini Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" Only the files under hw/usb/ require access to the USB internal API. Move include/hw/usb.h to hw/usb/usb-internal.h to reduce its scope. Signed-off-by: Philippe Mathieu-Daudé --- hw/usb/desc.h | 2 +- hw/usb/hcd-dwc2.h | 2 +- hw/usb/hcd-ehci.h | 2 +- hw/usb/hcd-ohci.h | 2 +- hw/usb/hcd-xhci.h | 2 +- include/hw/usb.h => hw/usb/usb-internal.h | 7 +++---- hw/usb/bus.c | 2 +- hw/usb/combined-packet.c | 2 +- hw/usb/core.c | 2 +- hw/usb/desc-msos.c | 2 +- hw/usb/desc.c | 3 +-- hw/usb/dev-audio.c | 2 +- hw/usb/dev-hid.c | 2 +- hw/usb/dev-hub.c | 2 +- hw/usb/dev-mtp.c | 2 +- hw/usb/dev-network.c | 2 +- hw/usb/dev-serial.c | 2 +- hw/usb/dev-smartcard-reader.c | 2 +- hw/usb/dev-storage.c | 2 +- hw/usb/dev-uas.c | 2 +- hw/usb/dev-wacom.c | 2 +- hw/usb/hcd-dwc2.c | 1 + hw/usb/hcd-musb.c | 2 +- hw/usb/hcd-ohci-pci.c | 2 +- hw/usb/hcd-ohci.c | 1 - hw/usb/hcd-uhci.c | 2 +- hw/usb/hcd-xhci-nec.c | 3 +-- hw/usb/hcd-xhci.c | 2 +- hw/usb/host-libusb.c | 2 +- hw/usb/libhw.c | 2 +- hw/usb/quirks.c | 2 +- hw/usb/redirect.c | 2 +- hw/usb/tusb6010.c | 2 +- hw/usb/xen-usb.c | 2 +- MAINTAINERS | 1 - 35 files changed, 35 insertions(+), 39 deletions(-) rename include/hw/usb.h => hw/usb/usb-internal.h (99%) diff --git a/hw/usb/desc.h b/hw/usb/desc.h index 4bf6966c4b..ee4f042602 100644 --- a/hw/usb/desc.h +++ b/hw/usb/desc.h @@ -2,7 +2,7 @@ #define QEMU_HW_USB_DESC_H #include -#include "hw/usb.h" +#include "usb-internal.h" /* binary representation */ typedef struct USBDescriptor { diff --git a/hw/usb/hcd-dwc2.h b/hw/usb/hcd-dwc2.h index 2adf0f53c7..2dfb3f3bc5 100644 --- a/hw/usb/hcd-dwc2.h +++ b/hw/usb/hcd-dwc2.h @@ -20,7 +20,7 @@ #define HW_USB_DWC2_H #include "hw/sysbus.h" -#include "hw/usb.h" +#include "usb-internal.h" #define DWC2_MMIO_SIZE 0x11000 diff --git a/hw/usb/hcd-ehci.h b/hw/usb/hcd-ehci.h index 4577f5e31d..337b3ad05c 100644 --- a/hw/usb/hcd-ehci.h +++ b/hw/usb/hcd-ehci.h @@ -19,10 +19,10 @@ #define HW_USB_HCD_EHCI_H #include "qemu/timer.h" -#include "hw/usb.h" #include "sysemu/dma.h" #include "hw/pci/pci.h" #include "hw/sysbus.h" +#include "usb-internal.h" #define CAPA_SIZE 0x10 diff --git a/hw/usb/hcd-ohci.h b/hw/usb/hcd-ohci.h index 5c8819aedf..771927ea17 100644 --- a/hw/usb/hcd-ohci.h +++ b/hw/usb/hcd-ohci.h @@ -22,7 +22,7 @@ #define HCD_OHCI_H #include "sysemu/dma.h" -#include "hw/usb.h" +#include "usb-internal.h" /* Number of Downstream Ports on the root hub: */ #define OHCI_MAX_PORTS 15 diff --git a/hw/usb/hcd-xhci.h b/hw/usb/hcd-xhci.h index 8edbdc2c3e..f9a3aaceec 100644 --- a/hw/usb/hcd-xhci.h +++ b/hw/usb/hcd-xhci.h @@ -22,7 +22,7 @@ #ifndef HW_USB_HCD_XHCI_H #define HW_USB_HCD_XHCI_H -#include "hw/usb.h" +#include "usb-internal.h" #define TYPE_XHCI "base-xhci" #define TYPE_NEC_XHCI "nec-usb-xhci" diff --git a/include/hw/usb.h b/hw/usb/usb-internal.h similarity index 99% rename from include/hw/usb.h rename to hw/usb/usb-internal.h index 2ea5186ea5..ceafb65936 100644 --- a/include/hw/usb.h +++ b/hw/usb/usb-internal.h @@ -1,8 +1,5 @@ -#ifndef QEMU_USB_H -#define QEMU_USB_H - /* - * QEMU USB API + * QEMU USB internal API * * Copyright (c) 2005 Fabrice Bellard * @@ -24,6 +21,8 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ +#ifndef QEMU_USB_INTERNAL_H +#define QEMU_USB_INTERNAL_H #include "hw/qdev-core.h" #include "hw/usb/usb.h" diff --git a/hw/usb/bus.c b/hw/usb/bus.c index 518e5b94ed..ba6c48e800 100644 --- a/hw/usb/bus.c +++ b/hw/usb/bus.c @@ -1,6 +1,5 @@ #include "qemu/osdep.h" #include "hw/qdev-properties.h" -#include "hw/usb.h" #include "qapi/error.h" #include "qemu/error-report.h" #include "qemu/module.h" @@ -9,6 +8,7 @@ #include "monitor/monitor.h" #include "trace.h" #include "qemu/cutils.h" +#include "usb-internal.h" #include "desc.h" static void usb_bus_dev_print(Monitor *mon, DeviceState *qdev, int indent); diff --git a/hw/usb/combined-packet.c b/hw/usb/combined-packet.c index 5d57e883dc..28e19aad12 100644 --- a/hw/usb/combined-packet.c +++ b/hw/usb/combined-packet.c @@ -21,9 +21,9 @@ */ #include "qemu/osdep.h" #include "qemu/units.h" -#include "hw/usb.h" #include "qemu/iov.h" #include "trace.h" +#include "usb-internal.h" static void usb_combined_packet_add(USBCombinedPacket *combined, USBPacket *p) { diff --git a/hw/usb/core.c b/hw/usb/core.c index 5abd128b6b..6fed698d20 100644 --- a/hw/usb/core.c +++ b/hw/usb/core.c @@ -24,9 +24,9 @@ * THE SOFTWARE. */ #include "qemu/osdep.h" -#include "hw/usb.h" #include "qemu/iov.h" #include "trace.h" +#include "usb-internal.h" void usb_pick_speed(USBPort *port) { diff --git a/hw/usb/desc-msos.c b/hw/usb/desc-msos.c index 3a5ad7c8d0..79a8093f3f 100644 --- a/hw/usb/desc-msos.c +++ b/hw/usb/desc-msos.c @@ -1,6 +1,6 @@ #include "qemu/osdep.h" -#include "hw/usb.h" #include "desc.h" +#include "usb-internal.h" /* * Microsoft OS Descriptors diff --git a/hw/usb/desc.c b/hw/usb/desc.c index 8b6eaea407..defb344014 100644 --- a/hw/usb/desc.c +++ b/hw/usb/desc.c @@ -1,8 +1,7 @@ #include "qemu/osdep.h" - -#include "hw/usb.h" #include "desc.h" #include "trace.h" +#include "usb-internal.h" /* ------------------------------------------------------------------ */ diff --git a/hw/usb/dev-audio.c b/hw/usb/dev-audio.c index 1371c44f48..1e4d1051f3 100644 --- a/hw/usb/dev-audio.c +++ b/hw/usb/dev-audio.c @@ -32,10 +32,10 @@ #include "qemu/osdep.h" #include "qemu/module.h" #include "hw/qdev-properties.h" -#include "hw/usb.h" #include "migration/vmstate.h" #include "desc.h" #include "audio/audio.h" +#include "usb-internal.h" static void usb_audio_reinit(USBDevice *dev, unsigned channels); diff --git a/hw/usb/dev-hid.c b/hw/usb/dev-hid.c index 89f63b698b..59b47272ba 100644 --- a/hw/usb/dev-hid.c +++ b/hw/usb/dev-hid.c @@ -25,7 +25,6 @@ #include "qemu/osdep.h" #include "ui/console.h" -#include "hw/usb.h" #include "migration/vmstate.h" #include "desc.h" #include "qapi/error.h" @@ -33,6 +32,7 @@ #include "qemu/timer.h" #include "hw/input/hid.h" #include "hw/qdev-properties.h" +#include "usb-internal.h" /* HID interface requests */ #define GET_REPORT 0xa101 diff --git a/hw/usb/dev-hub.c b/hw/usb/dev-hub.c index 5f19dd9fb5..b394ae9983 100644 --- a/hw/usb/dev-hub.c +++ b/hw/usb/dev-hub.c @@ -27,11 +27,11 @@ #include "qemu/timer.h" #include "trace.h" #include "hw/qdev-properties.h" -#include "hw/usb.h" #include "migration/vmstate.h" #include "desc.h" #include "qemu/error-report.h" #include "qemu/module.h" +#include "usb-internal.h" #define MAX_PORTS 8 diff --git a/hw/usb/dev-mtp.c b/hw/usb/dev-mtp.c index 15a2243101..147e564bea 100644 --- a/hw/usb/dev-mtp.c +++ b/hw/usb/dev-mtp.c @@ -24,10 +24,10 @@ #include "qemu/filemonitor.h" #include "trace.h" #include "hw/qdev-properties.h" -#include "hw/usb.h" #include "migration/vmstate.h" #include "desc.h" #include "qemu/units.h" +#include "usb-internal.h" /* ----------------------------------------------------------------------- */ diff --git a/hw/usb/dev-network.c b/hw/usb/dev-network.c index c69756709b..2e06d74f69 100644 --- a/hw/usb/dev-network.c +++ b/hw/usb/dev-network.c @@ -26,7 +26,6 @@ #include "qemu/osdep.h" #include "qapi/error.h" #include "hw/qdev-properties.h" -#include "hw/usb.h" #include "migration/vmstate.h" #include "desc.h" #include "net/net.h" @@ -37,6 +36,7 @@ #include "qemu/iov.h" #include "qemu/module.h" #include "qemu/cutils.h" +#include "usb-internal.h" /*#define TRAFFIC_DEBUG*/ /* Thanks to NetChip Technologies for donating this product ID. diff --git a/hw/usb/dev-serial.c b/hw/usb/dev-serial.c index 7e50e3ba47..4d3f91a85a 100644 --- a/hw/usb/dev-serial.c +++ b/hw/usb/dev-serial.c @@ -14,11 +14,11 @@ #include "qemu/error-report.h" #include "qemu/module.h" #include "hw/qdev-properties.h" -#include "hw/usb.h" #include "migration/vmstate.h" #include "desc.h" #include "chardev/char-serial.h" #include "chardev/char-fe.h" +#include "usb-internal.h" //#define DEBUG_Serial diff --git a/hw/usb/dev-smartcard-reader.c b/hw/usb/dev-smartcard-reader.c index fcfe216594..9602b25a10 100644 --- a/hw/usb/dev-smartcard-reader.c +++ b/hw/usb/dev-smartcard-reader.c @@ -41,9 +41,9 @@ #include "qemu/error-report.h" #include "qemu/module.h" #include "hw/qdev-properties.h" -#include "hw/usb.h" #include "migration/vmstate.h" #include "desc.h" +#include "usb-internal.h" #include "ccid.h" diff --git a/hw/usb/dev-storage.c b/hw/usb/dev-storage.c index f5977eb72e..a58c84dffa 100644 --- a/hw/usb/dev-storage.c +++ b/hw/usb/dev-storage.c @@ -13,7 +13,6 @@ #include "qemu/module.h" #include "qemu/option.h" #include "qemu/config-file.h" -#include "hw/usb.h" #include "desc.h" #include "hw/qdev-properties.h" #include "hw/scsi/scsi.h" @@ -22,6 +21,7 @@ #include "sysemu/block-backend.h" #include "qapi/visitor.h" #include "qemu/cutils.h" +#include "usb-internal.h" //#define DEBUG_MSD diff --git a/hw/usb/dev-uas.c b/hw/usb/dev-uas.c index a3a4d41c07..9dc39f98a2 100644 --- a/hw/usb/dev-uas.c +++ b/hw/usb/dev-uas.c @@ -17,12 +17,12 @@ #include "qemu/main-loop.h" #include "qemu/module.h" -#include "hw/usb.h" #include "migration/vmstate.h" #include "desc.h" #include "hw/qdev-properties.h" #include "hw/scsi/scsi.h" #include "scsi/constants.h" +#include "usb-internal.h" /* --------------------------------------------------------------------- */ diff --git a/hw/usb/dev-wacom.c b/hw/usb/dev-wacom.c index 8aba44b8bc..7c162b7f85 100644 --- a/hw/usb/dev-wacom.c +++ b/hw/usb/dev-wacom.c @@ -28,10 +28,10 @@ #include "qemu/osdep.h" #include "ui/console.h" -#include "hw/usb.h" #include "migration/vmstate.h" #include "qemu/module.h" #include "desc.h" +#include "usb-internal.h" /* Interface requests */ #define WACOM_GET_REPORT 0x2101 diff --git a/hw/usb/hcd-dwc2.c b/hw/usb/hcd-dwc2.c index 252b60ef65..47ae18d510 100644 --- a/hw/usb/hcd-dwc2.c +++ b/hw/usb/hcd-dwc2.c @@ -43,6 +43,7 @@ #include "qemu/log.h" #include "hw/qdev-properties.h" #include "dwc2-regs.h" +#include "usb-internal.h" #define USB_HZ_FS 12000000 #define USB_HZ_HS 96000000 diff --git a/hw/usb/hcd-musb.c b/hw/usb/hcd-musb.c index b8d8766a4a..bc3efcce65 100644 --- a/hw/usb/hcd-musb.c +++ b/hw/usb/hcd-musb.c @@ -22,10 +22,10 @@ */ #include "qemu/osdep.h" #include "qemu/timer.h" -#include "hw/usb.h" #include "hw/irq.h" #include "hw/hw.h" #include "hcd-musb.h" +#include "usb-internal.h" /* Common USB registers */ #define MUSB_HDRC_FADDR 0x00 /* 8-bit */ diff --git a/hw/usb/hcd-ohci-pci.c b/hw/usb/hcd-ohci-pci.c index a7fb1666af..cb6bc55f59 100644 --- a/hw/usb/hcd-ohci-pci.c +++ b/hw/usb/hcd-ohci-pci.c @@ -21,7 +21,6 @@ #include "qemu/osdep.h" #include "qapi/error.h" #include "qemu/timer.h" -#include "hw/usb.h" #include "migration/vmstate.h" #include "hw/pci/pci.h" #include "hw/sysbus.h" @@ -29,6 +28,7 @@ #include "hw/qdev-properties.h" #include "trace.h" #include "hcd-ohci.h" +#include "usb-internal.h" #define TYPE_PCI_OHCI "pci-ohci" #define PCI_OHCI(obj) OBJECT_CHECK(OHCIPCIState, (obj), TYPE_PCI_OHCI) diff --git a/hw/usb/hcd-ohci.c b/hw/usb/hcd-ohci.c index 1e6e85e86a..f4a85a8774 100644 --- a/hw/usb/hcd-ohci.c +++ b/hw/usb/hcd-ohci.c @@ -30,7 +30,6 @@ #include "qapi/error.h" #include "qemu/module.h" #include "qemu/timer.h" -#include "hw/usb.h" #include "migration/vmstate.h" #include "hw/sysbus.h" #include "hw/qdev-dma.h" diff --git a/hw/usb/hcd-uhci.c b/hw/usb/hcd-uhci.c index 37f7beb3fa..1d4dd33b6c 100644 --- a/hw/usb/hcd-uhci.c +++ b/hw/usb/hcd-uhci.c @@ -27,7 +27,6 @@ */ #include "qemu/osdep.h" -#include "hw/usb.h" #include "hw/usb/uhci-regs.h" #include "migration/vmstate.h" #include "hw/pci/pci.h" @@ -39,6 +38,7 @@ #include "trace.h" #include "qemu/main-loop.h" #include "qemu/module.h" +#include "usb-internal.h" #define FRAME_TIMER_FREQ 1000 diff --git a/hw/usb/hcd-xhci-nec.c b/hw/usb/hcd-xhci-nec.c index e6a5a22b6d..24c59fa4b0 100644 --- a/hw/usb/hcd-xhci-nec.c +++ b/hw/usb/hcd-xhci-nec.c @@ -20,11 +20,10 @@ */ #include "qemu/osdep.h" -#include "hw/usb.h" #include "qemu/module.h" #include "hw/pci/pci.h" #include "hw/qdev-properties.h" - +#include "usb-internal.h" #include "hcd-xhci.h" static Property nec_xhci_properties[] = { diff --git a/hw/usb/hcd-xhci.c b/hw/usb/hcd-xhci.c index b330e36fe6..a3f6b14681 100644 --- a/hw/usb/hcd-xhci.c +++ b/hw/usb/hcd-xhci.c @@ -23,7 +23,6 @@ #include "qemu/timer.h" #include "qemu/module.h" #include "qemu/queue.h" -#include "hw/usb.h" #include "migration/vmstate.h" #include "hw/pci/pci.h" #include "hw/qdev-properties.h" @@ -33,6 +32,7 @@ #include "qapi/error.h" #include "hcd-xhci.h" +#include "usb-internal.h" //#define DEBUG_XHCI //#define DEBUG_DATA diff --git a/hw/usb/host-libusb.c b/hw/usb/host-libusb.c index ad7ed8fb0c..615655f2f5 100644 --- a/hw/usb/host-libusb.c +++ b/hw/usb/host-libusb.c @@ -50,7 +50,7 @@ #include "trace.h" #include "hw/qdev-properties.h" -#include "hw/usb.h" +#include "usb-internal.h" /* ------------------------------------------------------------------------ */ diff --git a/hw/usb/libhw.c b/hw/usb/libhw.c index 9c33a1640f..a8d7f994df 100644 --- a/hw/usb/libhw.c +++ b/hw/usb/libhw.c @@ -20,8 +20,8 @@ * THE SOFTWARE. */ #include "qemu/osdep.h" -#include "hw/usb.h" #include "sysemu/dma.h" +#include "usb-internal.h" int usb_packet_map(USBPacket *p, QEMUSGList *sgl) { diff --git a/hw/usb/quirks.c b/hw/usb/quirks.c index b0d0f87e35..c427d45f1e 100644 --- a/hw/usb/quirks.c +++ b/hw/usb/quirks.c @@ -14,7 +14,7 @@ #include "qemu/osdep.h" #include "quirks.inc.c" -#include "hw/usb.h" +#include "usb-internal.h" #include "usb-quirks.h" static bool usb_id_match(const struct usb_device_id *ids, diff --git a/hw/usb/redirect.c b/hw/usb/redirect.c index 4c5925a039..a0c55de7f8 100644 --- a/hw/usb/redirect.c +++ b/hw/usb/redirect.c @@ -42,9 +42,9 @@ #include #include "hw/qdev-properties.h" -#include "hw/usb.h" #include "migration/qemu-file-types.h" #include "migration/vmstate.h" +#include "usb-internal.h" #include "usb-quirks.h" /* ERROR is defined below. Remove any previous definition. */ diff --git a/hw/usb/tusb6010.c b/hw/usb/tusb6010.c index 9f9b81b09d..191df38356 100644 --- a/hw/usb/tusb6010.c +++ b/hw/usb/tusb6010.c @@ -22,12 +22,12 @@ #include "qemu/osdep.h" #include "qemu/module.h" #include "qemu/timer.h" -#include "hw/usb.h" #include "hw/arm/omap.h" #include "hw/hw.h" #include "hw/irq.h" #include "hw/sysbus.h" #include "hcd-musb.h" +#include "usb-internal.h" #define TYPE_TUSB6010 "tusb6010" #define TUSB(obj) OBJECT_CHECK(TUSBState, (obj), TYPE_TUSB6010) diff --git a/hw/usb/xen-usb.c b/hw/usb/xen-usb.c index 4d266d7bb4..a6a0b466f9 100644 --- a/hw/usb/xen-usb.c +++ b/hw/usb/xen-usb.c @@ -27,12 +27,12 @@ #include "qemu/main-loop.h" #include "qemu/option.h" #include "hw/sysbus.h" -#include "hw/usb.h" #include "hw/xen/xen-legacy-backend.h" #include "monitor/qdev.h" #include "qapi/error.h" #include "qapi/qmp/qdict.h" #include "qapi/qmp/qstring.h" +#include "usb-internal.h" #include "hw/xen/interface/io/usbif.h" diff --git a/MAINTAINERS b/MAINTAINERS index dec252f38b..2566566d72 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -1642,7 +1642,6 @@ F: hw/usb/* F: tests/qtest/usb-*-test.c F: docs/usb2.txt F: docs/usb-storage.txt -F: include/hw/usb.h F: include/hw/usb/ F: default-configs/usb.mak