summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/usb/host/Kconfig1
-rw-r--r--drivers/usb/host/xhci-plat.c6
-rw-r--r--drivers/usb/host/xhci.h2
3 files changed, 9 insertions, 0 deletions
diff --git a/drivers/usb/host/Kconfig b/drivers/usb/host/Kconfig
index df9428f1dc5e..46818b232204 100644
--- a/drivers/usb/host/Kconfig
+++ b/drivers/usb/host/Kconfig
@@ -54,6 +54,7 @@ config USB_XHCI_PCI_RENESAS
config USB_XHCI_PLATFORM
tristate "Generic xHCI driver for a platform device"
select USB_XHCI_RCAR if ARCH_RENESAS
+ depends on USB_ONBOARD_HUB || !USB_ONBOARD_HUB
help
Adds an xHCI host driver for a generic platform device, which
provides a memory space and an irq.
diff --git a/drivers/usb/host/xhci-plat.c b/drivers/usb/host/xhci-plat.c
index c1edcc9b13ce..ee98a3671619 100644
--- a/drivers/usb/host/xhci-plat.c
+++ b/drivers/usb/host/xhci-plat.c
@@ -15,6 +15,7 @@
#include <linux/of.h>
#include <linux/of_device.h>
#include <linux/platform_device.h>
+#include <linux/usb/onboard_hub.h>
#include <linux/usb/phy.h>
#include <linux/slab.h>
#include <linux/acpi.h>
@@ -374,6 +375,9 @@ static int xhci_plat_probe(struct platform_device *pdev)
*/
pm_runtime_forbid(&pdev->dev);
+ INIT_LIST_HEAD(&xhci->onboard_hub_devs);
+ onboard_hub_create_pdevs(hcd->self.root_hub, &xhci->onboard_hub_devs);
+
return 0;
@@ -420,6 +424,8 @@ static int xhci_plat_remove(struct platform_device *dev)
usb_remove_hcd(hcd);
usb_put_hcd(shared_hcd);
+ onboard_hub_destroy_pdevs(&xhci->onboard_hub_devs);
+
clk_disable_unprepare(clk);
clk_disable_unprepare(reg_clk);
usb_put_hcd(hcd);
diff --git a/drivers/usb/host/xhci.h b/drivers/usb/host/xhci.h
index e417f5ce13d1..a1d5ffb7474d 100644
--- a/drivers/usb/host/xhci.h
+++ b/drivers/usb/host/xhci.h
@@ -1920,6 +1920,8 @@ struct xhci_hcd {
struct dentry *debugfs_slots;
struct list_head regset_list;
+ struct list_head onboard_hub_devs;
+
void *dbc;
/* platform-specific data -- must come last */
unsigned long priv[] __aligned(sizeof(s64));