summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 73b07c4)
raw | patch | inline | side by side (parent: 73b07c4)
author | George Cherian <george.cherian@ti.com> | |
Mon, 15 Dec 2014 18:37:49 +0000 (00:07 +0530) | ||
committer | Sekhar Nori <nsekhar@ti.com> | |
Tue, 16 Dec 2014 09:15:07 +0000 (14:45 +0530) |
Adapt the xhci-plat driver to use drd library functions.
In prepration to support DRD on dwc3.
Signed-off-by: George Cherian <george.cherian@ti.com>
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
In prepration to support DRD on dwc3.
Signed-off-by: George Cherian <george.cherian@ti.com>
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
drivers/usb/host/xhci-plat.c | patch | blob | history |
index 54464c0e052643e93a2ec9a5aa7db3652540a73b..f0fafe35b4f57954b5af7955ec8be3d886fb7598 100644 (file)
#include <linux/of.h>
#include <linux/platform_device.h>
#include <linux/slab.h>
+#include <linux/usb/otg.h>
+#include <linux/usb/drd.h>
#include <linux/usb/xhci_pdriver.h>
#include "xhci.h"
struct resource *res;
struct usb_hcd *hcd;
struct clk *clk;
+ struct usb_drd_host *drd_host;
int ret;
int irq;
if (ret)
goto put_usb3_hcd;
+ drd_host = kzalloc(sizeof(*drd_host), GFP_KERNEL);
+ if (!drd_host)
+ return -ENOMEM;
+
+ drd_host->main_hcd = xhci->main_hcd;
+ drd_host->shared_hcd = xhci->shared_hcd;
+ drd_host->hcd_irq = irq;
+ drd_host->host_setup = NULL;
+
+ usb_drd_register_hcd(pdev->dev.parent, drd_host);
+
return 0;
put_usb3_hcd:
if (!IS_ERR(clk))
clk_disable_unprepare(clk);
usb_put_hcd(hcd);
+ usb_drd_unregister_hcd(dev->dev.parent);
kfree(xhci);
return 0;