summaryrefslogtreecommitdiff
path: root/drivers/usb/host
diff options
context:
space:
mode:
authorRafał Miłecki <zajec5@gmail.com>2016-07-08 12:02:50 (GMT)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2016-08-09 13:59:35 (GMT)
commit3cc7e7b7872ebd0f200b5450f5471bc3700de141 (patch)
treeff4cbd33d2ac94045a9e87a3972c2e6dfd58767b /drivers/usb/host
parenta094760b9a77f81ee3cbeff323ee77c928f41106 (diff)
downloadlinux-3cc7e7b7872ebd0f200b5450f5471bc3700de141.tar.xz
USB: bcma: initialize Northstar USB 3.0 controller
It's a rather simple controller, we just need to make sure USB is powered (using GPIO pin) and reset bus core. Once this is done it's safe to register XHCI controller and let it init PHY and do its magic. Signed-off-by: Rafał Miłecki <zajec5@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/host')
-rw-r--r--drivers/usb/host/bcma-hcd.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/drivers/usb/host/bcma-hcd.c b/drivers/usb/host/bcma-hcd.c
index 172ef17..422fdc2 100644
--- a/drivers/usb/host/bcma-hcd.c
+++ b/drivers/usb/host/bcma-hcd.c
@@ -27,6 +27,7 @@
#include <linux/slab.h>
#include <linux/of.h>
#include <linux/of_gpio.h>
+#include <linux/of_platform.h>
#include <linux/usb/ehci_pdriver.h>
#include <linux/usb/ohci_pdriver.h>
@@ -338,6 +339,18 @@ err_unregister_ohci_dev:
return err;
}
+static int bcma_hcd_usb30_init(struct bcma_hcd_device *bcma_hcd)
+{
+ struct bcma_device *core = bcma_hcd->core;
+ struct device *dev = &core->dev;
+
+ bcma_core_enable(core, 0);
+
+ of_platform_default_populate(dev->of_node, NULL, dev);
+
+ return 0;
+}
+
static int bcma_hcd_probe(struct bcma_device *core)
{
int err;
@@ -362,6 +375,11 @@ static int bcma_hcd_probe(struct bcma_device *core)
if (err)
return err;
break;
+ case BCMA_CORE_NS_USB30:
+ err = bcma_hcd_usb30_init(usb_dev);
+ if (err)
+ return err;
+ break;
default:
return -ENODEV;
}
@@ -416,6 +434,7 @@ static int bcma_hcd_resume(struct bcma_device *dev)
static const struct bcma_device_id bcma_hcd_table[] = {
BCMA_CORE(BCMA_MANUF_BCM, BCMA_CORE_USB20_HOST, BCMA_ANY_REV, BCMA_ANY_CLASS),
BCMA_CORE(BCMA_MANUF_BCM, BCMA_CORE_NS_USB20, BCMA_ANY_REV, BCMA_ANY_CLASS),
+ BCMA_CORE(BCMA_MANUF_BCM, BCMA_CORE_NS_USB30, BCMA_ANY_REV, BCMA_ANY_CLASS),
{},
};
MODULE_DEVICE_TABLE(bcma, bcma_hcd_table);