|
@@ -1,19 +1,28 @@
|
|
|
-From 12c6932caa6b1fce44d0f0c68ec77d4c00ac0be7 Mon Sep 17 00:00:00 2001
|
|
|
|
|
|
|
+From 121ec6539abedbc0e975cf35f48ee044b323e4c3 Mon Sep 17 00:00:00 2001
|
|
|
From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <[email protected]>
|
|
From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <[email protected]>
|
|
|
Date: Tue, 16 Jun 2015 17:14:26 +0200
|
|
Date: Tue, 16 Jun 2015 17:14:26 +0200
|
|
|
-Subject: [PATCH] USB: bcma: add USB 3.0 support
|
|
|
|
|
|
|
+Subject: [PATCH v3 5/6] usb: bcma: add USB 3.0 support
|
|
|
MIME-Version: 1.0
|
|
MIME-Version: 1.0
|
|
|
Content-Type: text/plain; charset=UTF-8
|
|
Content-Type: text/plain; charset=UTF-8
|
|
|
Content-Transfer-Encoding: 8bit
|
|
Content-Transfer-Encoding: 8bit
|
|
|
|
|
|
|
|
Signed-off-by: Rafał Miłecki <[email protected]>
|
|
Signed-off-by: Rafał Miłecki <[email protected]>
|
|
|
|
|
+Signed-off-by: Hauke Mehrtens <[email protected]>
|
|
|
---
|
|
---
|
|
|
- drivers/usb/host/bcma-hcd.c | 219 ++++++++++++++++++++++++++++++++++++++++++++
|
|
|
|
|
- 1 file changed, 219 insertions(+)
|
|
|
|
|
|
|
+ drivers/usb/host/bcma-hcd.c | 225 ++++++++++++++++++++++++++++++++++++++++++++
|
|
|
|
|
+ 1 file changed, 225 insertions(+)
|
|
|
|
|
|
|
|
--- a/drivers/usb/host/bcma-hcd.c
|
|
--- a/drivers/usb/host/bcma-hcd.c
|
|
|
+++ b/drivers/usb/host/bcma-hcd.c
|
|
+++ b/drivers/usb/host/bcma-hcd.c
|
|
|
-@@ -37,6 +37,7 @@ struct bcma_hcd_device {
|
|
|
|
|
|
|
+@@ -28,6 +28,7 @@
|
|
|
|
|
+ #include <linux/of_gpio.h>
|
|
|
|
|
+ #include <linux/usb/ehci_pdriver.h>
|
|
|
|
|
+ #include <linux/usb/ohci_pdriver.h>
|
|
|
|
|
++#include <linux/usb/xhci_pdriver.h>
|
|
|
|
|
+
|
|
|
|
|
+ MODULE_AUTHOR("Hauke Mehrtens");
|
|
|
|
|
+ MODULE_DESCRIPTION("Common USB driver for BCMA Bus");
|
|
|
|
|
+@@ -37,6 +38,7 @@ struct bcma_hcd_device {
|
|
|
struct bcma_device *core;
|
|
struct bcma_device *core;
|
|
|
struct platform_device *ehci_dev;
|
|
struct platform_device *ehci_dev;
|
|
|
struct platform_device *ohci_dev;
|
|
struct platform_device *ohci_dev;
|
|
@@ -21,7 +30,18 @@ Signed-off-by: Rafał Miłecki <[email protected]>
|
|
|
};
|
|
};
|
|
|
|
|
|
|
|
/* Wait for bitmask in a register to get set or cleared.
|
|
/* Wait for bitmask in a register to get set or cleared.
|
|
|
-@@ -343,6 +344,215 @@ err_unregister_ohci_dev:
|
|
|
|
|
|
|
+@@ -250,6 +252,10 @@ static const struct usb_ehci_pdata ehci_
|
|
|
|
|
+ static const struct usb_ohci_pdata ohci_pdata = {
|
|
|
|
|
+ };
|
|
|
|
|
+
|
|
|
|
|
++static const struct usb_xhci_pdata xhci_pdata = {
|
|
|
|
|
++ .usb3_fake_doorbell = 1
|
|
|
|
|
++};
|
|
|
|
|
++
|
|
|
|
|
+ static struct platform_device *bcma_hcd_create_pdev(struct bcma_device *dev,
|
|
|
|
|
+ const char *name, u32 addr,
|
|
|
|
|
+ const void *data,
|
|
|
|
|
+@@ -343,6 +349,216 @@ err_unregister_ohci_dev:
|
|
|
return err;
|
|
return err;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -227,7 +247,8 @@ Signed-off-by: Rafał Miłecki <[email protected]>
|
|
|
+ bcma_hcd_usb30_phy_init(bcma_hcd);
|
|
+ bcma_hcd_usb30_phy_init(bcma_hcd);
|
|
|
+
|
|
+
|
|
|
+ bcma_hcd->xhci_dev = bcma_hcd_create_pdev(core, "xhci-hcd", core->addr,
|
|
+ bcma_hcd->xhci_dev = bcma_hcd_create_pdev(core, "xhci-hcd", core->addr,
|
|
|
-+ NULL, 0);
|
|
|
|
|
|
|
++ &xhci_pdata,
|
|
|
|
|
++ sizeof(xhci_pdata));
|
|
|
+ if (IS_ERR(bcma_hcd->ohci_dev))
|
|
+ if (IS_ERR(bcma_hcd->ohci_dev))
|
|
|
+ return PTR_ERR(bcma_hcd->ohci_dev);
|
|
+ return PTR_ERR(bcma_hcd->ohci_dev);
|
|
|
+
|
|
+
|
|
@@ -237,7 +258,7 @@ Signed-off-by: Rafał Miłecki <[email protected]>
|
|
|
static int bcma_hcd_probe(struct bcma_device *dev)
|
|
static int bcma_hcd_probe(struct bcma_device *dev)
|
|
|
{
|
|
{
|
|
|
int err;
|
|
int err;
|
|
|
-@@ -365,6 +575,11 @@ static int bcma_hcd_probe(struct bcma_de
|
|
|
|
|
|
|
+@@ -365,6 +581,11 @@ static int bcma_hcd_probe(struct bcma_de
|
|
|
if (err)
|
|
if (err)
|
|
|
return err;
|
|
return err;
|
|
|
break;
|
|
break;
|
|
@@ -249,7 +270,7 @@ Signed-off-by: Rafał Miłecki <[email protected]>
|
|
|
default:
|
|
default:
|
|
|
return -ENODEV;
|
|
return -ENODEV;
|
|
|
}
|
|
}
|
|
|
-@@ -378,11 +593,14 @@ static void bcma_hcd_remove(struct bcma_
|
|
|
|
|
|
|
+@@ -378,11 +599,14 @@ static void bcma_hcd_remove(struct bcma_
|
|
|
struct bcma_hcd_device *usb_dev = bcma_get_drvdata(dev);
|
|
struct bcma_hcd_device *usb_dev = bcma_get_drvdata(dev);
|
|
|
struct platform_device *ohci_dev = usb_dev->ohci_dev;
|
|
struct platform_device *ohci_dev = usb_dev->ohci_dev;
|
|
|
struct platform_device *ehci_dev = usb_dev->ehci_dev;
|
|
struct platform_device *ehci_dev = usb_dev->ehci_dev;
|
|
@@ -264,7 +285,7 @@ Signed-off-by: Rafał Miłecki <[email protected]>
|
|
|
|
|
|
|
|
bcma_core_disable(dev, 0);
|
|
bcma_core_disable(dev, 0);
|
|
|
}
|
|
}
|
|
|
-@@ -419,6 +637,7 @@ static int bcma_hcd_resume(struct bcma_d
|
|
|
|
|
|
|
+@@ -419,6 +643,7 @@ static int bcma_hcd_resume(struct bcma_d
|
|
|
static const struct bcma_device_id bcma_hcd_table[] = {
|
|
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_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_USB20, BCMA_ANY_REV, BCMA_ANY_CLASS),
|