From 848db5257db7f5a199373f3ac870893e7d770d46 Mon Sep 17 00:00:00 2001 From: Gerd Hoffmann Date: Tue, 20 Oct 2020 09:48:36 +0200 Subject: usb/xhci: add include/hw/usb/xhci.h header file Move a bunch of defines which might be needed outside core xhci code to that place. Add XHCI_ prefixes to avoid name clashes. No functional change. Signed-off-by: Gerd Hoffmann Reviewed-by: Sai Pavan Boddu Message-id: 20201020074844.5304-3-kraxel@redhat.com --- include/hw/usb/xhci.h | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 include/hw/usb/xhci.h (limited to 'include/hw/usb') diff --git a/include/hw/usb/xhci.h b/include/hw/usb/xhci.h new file mode 100644 index 0000000..dc0c299 --- /dev/null +++ b/include/hw/usb/xhci.h @@ -0,0 +1,19 @@ +#ifndef HW_USB_XHCI_H +#define HW_USB_XHCI_H + +#define TYPE_XHCI "base-xhci" +#define TYPE_NEC_XHCI "nec-usb-xhci" +#define TYPE_QEMU_XHCI "qemu-xhci" +#define TYPE_XHCI_SYSBUS "sysbus-xhci" + +#define XHCI_MAXPORTS_2 15 +#define XHCI_MAXPORTS_3 15 + +#define XHCI_MAXPORTS (XHCI_MAXPORTS_2 + XHCI_MAXPORTS_3) +#define XHCI_MAXSLOTS 64 +#define XHCI_MAXINTRS 16 + +/* must be power of 2 */ +#define XHCI_LEN_REGS 0x4000 + +#endif -- cgit v1.1 From 8e9c0c079a40b753654ed0cc165b9f0089def381 Mon Sep 17 00:00:00 2001 From: Gerd Hoffmann Date: Tue, 20 Oct 2020 09:48:37 +0200 Subject: usb/xhci: add xhci_sysbus_build_aml() helper The helper generates an acpi dsdt device entry for the xhci sysbus device. Signed-off-by: Gerd Hoffmann Message-id: 20201020074844.5304-4-kraxel@redhat.com --- include/hw/usb/xhci.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'include/hw/usb') diff --git a/include/hw/usb/xhci.h b/include/hw/usb/xhci.h index dc0c299..5c90e13 100644 --- a/include/hw/usb/xhci.h +++ b/include/hw/usb/xhci.h @@ -16,4 +16,6 @@ /* must be power of 2 */ #define XHCI_LEN_REGS 0x4000 +void xhci_sysbus_build_aml(Aml *scope, uint32_t mmio, unsigned int irq); + #endif -- cgit v1.1