From patchwork Wed Jan 4 13:23:01 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Manish Narani X-Patchwork-Id: 9497833 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 24BD0606A9 for ; Wed, 4 Jan 2017 21:26:15 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1C9351FF15 for ; Wed, 4 Jan 2017 21:26:15 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 0FCFB28339; Wed, 4 Jan 2017 21:26:15 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.1 required=2.0 tests=BAD_ENC_HEADER,BAYES_00, DKIM_SIGNED, RCVD_IN_DNSWL_MED, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 9BC8F1FF15 for ; Wed, 4 Jan 2017 21:26:14 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1cOt2g-0003Pw-CQ; Wed, 04 Jan 2017 21:24:18 +0000 Received: from casper.infradead.org ([2001:770:15f::2]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1cOsqJ-0007nt-NA for linux-arm-kernel@bombadil.infradead.org; Wed, 04 Jan 2017 21:11:31 +0000 Received: from mail-bn3nam01on0050.outbound.protection.outlook.com ([104.47.33.50] helo=NAM01-BN3-obe.outbound.protection.outlook.com) by casper.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1cOlXd-0007b8-31 for linux-arm-kernel@lists.infradead.org; Wed, 04 Jan 2017 13:23:47 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=xilinx.onmicrosoft.com; s=selector1-xilinx-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=Ed/y9LGvpBrUfIgy9mHkq2RG4tnIfje7gWF6UJ45ePc=; b=SXeOGEJb44k7VO9U9jLY3aQIG2BQxiB9m40TOILbVp9MIgg8q0UiJ8GpdT7b7BxhxsJI06+tHUC0aOeYEif0+jK7Bfr9QxL+GtkKZhmmtgHSwfnsvN0KlUkVJpsIKyZdfPba1z4HL05FfFQfWvm1E1ULqx/mvI5MPGxYi1WF9Lk= Received: from CY1PR0201CA0042.namprd02.prod.outlook.com (10.163.30.180) by BLUPR02MB193.namprd02.prod.outlook.com (10.242.189.148) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.817.10; Wed, 4 Jan 2017 13:23:18 +0000 Received: from SN1NAM02FT015.eop-nam02.prod.protection.outlook.com (2a01:111:f400:7e44::201) by CY1PR0201CA0042.outlook.office365.com (2a01:111:e400:58b9::52) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.817.10 via Frontend Transport; Wed, 4 Jan 2017 13:23:17 +0000 Authentication-Results: spf=pass (sender IP is 149.199.60.100) smtp.mailfrom=xilinx.com; apm.com; dkim=none (message not signed) header.d=none;apm.com; dmarc=bestguesspass action=none header.from=xilinx.com; Received-SPF: Pass (protection.outlook.com: domain of xilinx.com designates 149.199.60.100 as permitted sender) receiver=protection.outlook.com; client-ip=149.199.60.100; helo=xsj-pvapsmtpgw02; Received: from xsj-pvapsmtpgw02 (149.199.60.100) by SN1NAM02FT015.mail.protection.outlook.com (10.152.72.109) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.1.803.8 via Frontend Transport; Wed, 4 Jan 2017 13:23:17 +0000 Received: from unknown-38-66.xilinx.com ([149.199.38.66]:36934 helo=xsj-pvapsmtp01) by xsj-pvapsmtpgw02 with esmtp (Exim 4.63) (envelope-from ) id 1cOlXA-00005B-0X; Wed, 04 Jan 2017 05:23:16 -0800 Received: from [127.0.0.1] (helo=localhost) by xsj-pvapsmtp01 with smtp (Exim 4.63) (envelope-from ) id 1cOlX9-0007f7-TV; Wed, 04 Jan 2017 05:23:15 -0800 Received: from [172.23.64.139] (helo=xhd-lin64re116.xilinx.com) by xsj-pvapsmtp01 with esmtp (Exim 4.63) (envelope-from ) id 1cOlX5-0007cz-PA; Wed, 04 Jan 2017 05:23:11 -0800 Received: by xhd-lin64re116.xilinx.com (Postfix, from userid 16987) id 6C1DC302698; Wed, 4 Jan 2017 18:53:11 +0530 (IST) From: Manish Narani To: , , , , , , , , , , , , , , , , , , Subject: [RFC PATCH] usb: host: xhci: plat: add support for otg_set_host() call Date: Wed, 4 Jan 2017 18:53:01 +0530 Message-ID: <1483536181-22356-7-git-send-email-mnarani@xilinx.com> X-Mailer: git-send-email 2.1.1 In-Reply-To: <1483536181-22356-1-git-send-email-mnarani@xilinx.com> References: <1483536181-22356-1-git-send-email-mnarani@xilinx.com> X-TM-AS-Product-Ver: IMSS-7.1.0.1224-8.0.0.1202-22802.006 X-TM-AS-User-Approved-Sender: Yes;Yes X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-HT: Tenant X-Forefront-Antispam-Report: CIP:149.199.60.100; IPV:NLI; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10009020)(979002)(6009001)(7916002)(39410400002)(39860400002)(39840400002)(39850400002)(39450400003)(2980300002)(438002)(189002)(199003)(103686003)(42186005)(92566002)(2950100002)(107886002)(50226002)(8936002)(36756003)(2906002)(52956003)(6666003)(5001770100001)(47776003)(54906002)(90966002)(2201001)(5003940100001)(4326007)(4001430100002)(626004)(48376002)(356003)(46386002)(189998001)(33646002)(5660300001)(45336002)(106466001)(50986999)(38730400001)(76176999)(50466002)(36386004)(63266004)(81166006)(7416002)(81156014)(8676002)(305945005)(107986001)(921003)(2101003)(5001870100001)(83996005)(1121003)(969003)(989001)(999001)(1009001)(1019001); DIR:OUT; SFP:1101; SCL:1; SRVR:BLUPR02MB193; H:xsj-pvapsmtpgw02; FPR:; SPF:Pass; PTR:xapps1.xilinx.com,unknown-60-100.xilinx.com; MX:1; A:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; SN1NAM02FT015; 1:S07DrDDmqGcgCYRBEZdXVK9keXldFLAGvFoxt1joFOwNniviMblzU6dvZJwmXzeFO9CtmjeQeFjj3tBJJZ5X68d53DQP0SjfLsvvFl0urUFOX+mJUfSa1oHB8UUw6FgPbOMasptd39Ohyg+6kf92oGfhk00/Sko5MXyQjpzvStg9aLcUioylpqIPJqoverpeMKlzjmyM68SclBEnTtzkermiIWjhHTqLOz8AzIdanNHN4sLnDtpg8m6wa6D3AdET82iU1jegPIM6gsO2UqqqGncLFDZ79WAwVvNungy6aNZ1/TFmRIH/HjWmbJfVmtq/TUb+6buPU/7sTk6RApkaTAsW7UPqCZHr684KsPx7wsvWhkrUOLJ0w3eEUnpIXFf/EWAMmwRBdpmjD4Kn8ysb2JCn6UXsckQWamRV2V7UZiKLWa18YdUVecvVF9VTNgTbgLNjFtmN1rGJ8cDXzGxDB9/uasdYLZlENSV8PH+k3+K+t489nAPmbkhspVEJ3Du0DJLkFdcO3gdzpNVg1wW2iU9LGruPvop+/CNMF2zDp2sgWOgWBlCpIhCFRGDBeyLrdyINAbgM4vVC+k+Y2g3dXBV4Mj7qEg3BnUkc/ST0nmp1TrYgDva7pMfXTh196UKHmBaBFuz4Up3hbd15k+7wAw== MIME-Version: 1.0 X-MS-Office365-Filtering-Correlation-Id: 7a061116-b814-4338-b74a-08d434a4d87e X-Microsoft-Antispam: UriScan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myP8Hfr3WTMeGD7YxqrlgbEe8zlUjGq+o6yxrO3bkPMh6Wg7Xscqn9zTaWq4KlTZkBdbJu82Os3tRzZxeUbZ3C2AqG91PmFMcKFzWn6I+p4GAWzJwyuKRDP59iNtOtLHH8chC+f5SShcrgkkuaB6ZBIR01C1qOBUctDLNYVMo1g6OVMlmiWnpjvZIGv35OnEhGfJ5FMEDkCWtTk1HxWl5Oki4O958ba1igoczLog=; 20:elVXx7w3k+jHMk9iIHV3gHUAfeaOdz6usnvyt5DkK4VDwCTjGp8IkXx1O/1SMDDblQTFur+hPYZk76t5Uq/h+AUflUZoFgm5lSk4Dnsf6NpZbgvm69it0OlWRWiEwQ3313bPVDHe9RUz7pGE3WaTNom9Yoxko/mAlyHd7Pi+NvGHB68gFGAlurKxEktUZwc0dKeHTN0mOS4REJC3eDn2XKdH2kkgT84Vex6PF8KgfkGiYc/vrCLZr7xYbC+WQIYEeNcS15LIBWJxIqk8DEn9w1jjLKXsc+IdT4tTAEm39qtzbu7dnUpIAM/ElsDog7aOdErJFV0424j0cOjMqjXVL4SlUpiLeH6dlJBYelPhX76Mg3mpjVC53juGJ2cXitqtp3wX+YKeXDYRit7fpHM5WfHatRI+kwQeNPTF9mdLsrxY2Yf8ER7BV3/HoBdx37ONFN0x7H2xasa1Tr3kc2gduPq8Fcwjl+DUsHIWYQo4AOU1axEuMFOBcdjHe1jHMNFc X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(192813158149592); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040375)(601004)(2401047)(13024025)(13023025)(13015025)(13017025)(13018025)(8121501046)(5005006)(3002001)(10201501046)(6055026)(6041248)(20161123564025)(20161123562025)(20161123555025)(20161123560025)(6072148); SRVR:BLUPR02MB193; BCL:0; PCL:0; RULEID:; SRVR:BLUPR02MB193; X-Microsoft-Exchange-Diagnostics: 1; BLUPR02MB193; 4:hA8T7MA04pDYNktTHr3xzzAEz3hkiNLtPl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tzYBl08Uthmq6Mz2H8+UcarPO/swqIY4I+nlyJIH24=; 24:qmm0bcps0Pcp1m7kIWq7pBWh0MS/5Z87VTo55QtYxssDkUMQ0FwFEL0eW5Vx9n5hVmMZHk4OTqcW+Zt+pmFZrqSSJDLB59rUkZrHm3S0tUc= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; BLUPR02MB193; 7:v9tP/MZ2/pdTGyvVchNyZwQeXoHR4Y/Ab09RM7yz5FyOLVUcF7Dl4ocGM0e1ceU2v1FVgS/37JbUdhFraOQE/Eq/rRoflCoUOkky0ScPyoX/doYtPCAeauGDU9W2srjdEPqfCeVHFp0lKd+v2ynUy3j3ilbt9Rs+Aag3hqcgMyP5t+gSjVJb6OOFA8Oe1YWZ91VyULRcNzBzH4qG7DBrYEEIA+QcBKCPZc3GZkCWgp0bgdUCd2w9GAviqC4Dquq/ed350ks5p+duvVDMlV9IDIFkzwxgF1Sb5fB5GD7DO1vpediSFGJcHRBDsrQ0kOKDag3l7eekLsh3WkrEGG0otBUImdl573QpRsWaNQqOiqBc/1OamRugR0FDwPpkQodmQITjoPpPkEJuTbbZCpYOhe8I4fIbAJXqwiqYhFuV/wBhAs0lk0/0o7Vb2WGzXMX0OecPLisKochMI+cBCirlcA== X-OriginatorOrg: xilinx.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 04 Jan 2017 13:23:17.2077 (UTC) X-MS-Exchange-CrossTenant-Id: 657af505-d5df-48d0-8300-c31994686c5c X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=657af505-d5df-48d0-8300-c31994686c5c; Ip=[149.199.60.100]; Helo=[xsj-pvapsmtpgw02] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BLUPR02MB193 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170104_132345_337838_A161292B X-CRM114-Status: GOOD ( 16.95 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: anuragku@xilinx.com, anirudh@xilinx.com Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP This patch will add support for OTG host initialization. This will help OTG drivers to populate their host subsystem. Signed-off-by: Manish Narani --- drivers/usb/host/xhci-plat.c | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) diff --git a/drivers/usb/host/xhci-plat.c b/drivers/usb/host/xhci-plat.c index ddfab30..aa08bdd 100644 --- a/drivers/usb/host/xhci-plat.c +++ b/drivers/usb/host/xhci-plat.c @@ -19,6 +19,7 @@ #include #include #include +#include #include "xhci.h" #include "xhci-plat.h" @@ -144,6 +145,37 @@ static const struct of_device_id usb_xhci_of_match[] = { MODULE_DEVICE_TABLE(of, usb_xhci_of_match); #endif +static int usb_otg_set_host(struct device *dev, struct usb_hcd *hcd, bool yes) +{ + int ret = 0; + + hcd->usb_phy = usb_get_phy(USB_PHY_TYPE_USB3); + if (!IS_ERR_OR_NULL(hcd->usb_phy) && hcd->usb_phy->otg) { + dev_dbg(dev, "%s otg support available\n", __func__); + if (yes) { + if (otg_set_host(hcd->usb_phy->otg, &hcd->self)) { + dev_err(dev, "%s otg_set_host failed\n", + __func__); + usb_put_phy(hcd->usb_phy); + goto disable_phy; + } + } else { + ret = otg_set_host(hcd->usb_phy->otg, NULL); + usb_put_phy(hcd->usb_phy); + goto disable_phy; + } + + } else + goto disable_phy; + + return 0; + +disable_phy: + hcd->usb_phy = NULL; + + return ret; +} + static int xhci_plat_probe(struct platform_device *pdev) { const struct of_device_id *match; @@ -255,6 +287,11 @@ static int xhci_plat_probe(struct platform_device *pdev) if (ret) goto dealloc_usb2_hcd; + ret = usb_otg_set_host(&pdev->dev, hcd, 1); + if (ret) + goto dealloc_usb2_hcd; + + return 0; @@ -283,6 +320,8 @@ static int xhci_plat_remove(struct platform_device *dev) struct xhci_hcd *xhci = hcd_to_xhci(hcd); struct clk *clk = xhci->clk; + usb_otg_set_host(&dev->dev, hcd, 0); + usb_remove_hcd(xhci->shared_hcd); usb_phy_shutdown(hcd->usb_phy);