From patchwork Tue Nov 25 13:11:43 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: George Cherian X-Patchwork-Id: 5379071 Return-Path: X-Original-To: patchwork-linux-omap@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 66F22C11AC for ; Tue, 25 Nov 2014 13:21:09 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 80482201BB for ; Tue, 25 Nov 2014 13:21:08 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 92AAD20108 for ; Tue, 25 Nov 2014 13:21:07 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753207AbaKYNUu (ORCPT ); Tue, 25 Nov 2014 08:20:50 -0500 Received: from comal.ext.ti.com ([198.47.26.152]:44794 "EHLO comal.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753284AbaKYNPz (ORCPT ); Tue, 25 Nov 2014 08:15:55 -0500 Received: from dflxv15.itg.ti.com ([128.247.5.124]) by comal.ext.ti.com (8.13.7/8.13.7) with ESMTP id sAPDF0Eb023023; Tue, 25 Nov 2014 07:15:00 -0600 Received: from DLEE70.ent.ti.com (dlee70.ent.ti.com [157.170.170.113]) by dflxv15.itg.ti.com (8.14.3/8.13.8) with ESMTP id sAPDEx0K019882; Tue, 25 Nov 2014 07:15:00 -0600 Received: from dlep33.itg.ti.com (157.170.170.75) by DLEE70.ent.ti.com (157.170.170.113) with Microsoft SMTP Server id 14.3.174.1; Tue, 25 Nov 2014 07:14:59 -0600 Received: from george-pc.apr.dhcp.ti.com (ileax41-snat.itg.ti.com [10.172.224.153]) by dlep33.itg.ti.com (8.14.3/8.13.8) with ESMTP id sAPDEBE0020093; Tue, 25 Nov 2014 07:14:54 -0600 From: George Cherian To: , , , , CC: , , , , , , , , , , , , , , , George Cherian Subject: [PATCH 07/19] usb: host: xhci: Adapt xhci to use usb drd library Date: Tue, 25 Nov 2014 18:41:43 +0530 Message-ID: <1416921115-10467-8-git-send-email-george.cherian@ti.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1416921115-10467-1-git-send-email-george.cherian@ti.com> References: <1416921115-10467-1-git-send-email-george.cherian@ti.com> MIME-Version: 1.0 Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Adapt the xhci-plat driver to use drd library functions. In prepration to support DRD on dwc3. Signed-off-by: George Cherian --- drivers/usb/host/xhci-plat.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/drivers/usb/host/xhci-plat.c b/drivers/usb/host/xhci-plat.c index d8d024d..fbbbd59 100644 --- a/drivers/usb/host/xhci-plat.c +++ b/drivers/usb/host/xhci-plat.c @@ -17,6 +17,8 @@ #include #include #include +#include +#include #include #include "xhci.h" @@ -78,6 +80,7 @@ static int xhci_plat_probe(struct platform_device *pdev) struct resource *res; struct usb_hcd *hcd; struct clk *clk; + struct usb_drd_host *drd_host; int ret; int irq; @@ -169,6 +172,17 @@ static int xhci_plat_probe(struct platform_device *pdev) 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: @@ -200,6 +214,7 @@ static int xhci_plat_remove(struct platform_device *dev) if (!IS_ERR(clk)) clk_disable_unprepare(clk); usb_put_hcd(hcd); + usb_drd_unregister_hcd(dev->dev.parent); kfree(xhci); return 0;