From patchwork Tue Jan 15 06:19:12 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chao Xie X-Patchwork-Id: 1975141 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) by patchwork2.kernel.org (Postfix) with ESMTP id 80560DF23A for ; Tue, 15 Jan 2013 06:32:15 +0000 (UTC) Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1Tv00T-000731-8q; Tue, 15 Jan 2013 06:28:22 +0000 Received: from na3sys009aog108.obsmtp.com ([74.125.149.199]) by merlin.infradead.org with smtps (Exim 4.76 #1 (Red Hat Linux)) id 1Tuzsp-0001y7-IV for linux-arm-kernel@lists.infradead.org; Tue, 15 Jan 2013 06:20:32 +0000 Received: from MSI-MTA.marvell.com ([65.219.4.132]) (using TLSv1) by na3sys009aob108.postini.com ([74.125.148.12]) with SMTP ID DSNKUPT1Jsv6G7M5CG06f6l1sQKto1/CH6nD@postini.com; Mon, 14 Jan 2013 22:20:27 PST Received: from maili.marvell.com ([10.68.76.210]) by MSI-MTA.marvell.com with Microsoft SMTPSVC(6.0.3790.4675); Mon, 14 Jan 2013 22:19:45 -0800 Received: from localhost (unknown [10.38.36.239]) by maili.marvell.com (Postfix) with ESMTP id 843F04E510; Mon, 14 Jan 2013 22:19:45 -0800 (PST) From: Chao Xie To: linux-usb@vger.kernel.org, linux-arm-kernel@lists.infradead.org, haojian.zhuang@gmail.com, stern@rowland.harvard.edu, balbi@ti.com, gregkh@linuxfoundation.org, xiechao.mail@gmail.com Subject: [V3 PATCH 19/25] usb: ehci: ehci-mv: add extern chip support Date: Tue, 15 Jan 2013 01:19:12 -0500 Message-Id: <1358230758-10176-20-git-send-email-chao.xie@marvell.com> X-Mailer: git-send-email 1.7.4.1 In-Reply-To: <1358230758-10176-1-git-send-email-chao.xie@marvell.com> References: <1358230758-10176-1-git-send-email-chao.xie@marvell.com> X-OriginalArrivalTime: 15 Jan 2013 06:19:45.0567 (UTC) FILETIME=[50361AF0:01CDF2E8] X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20130115_012028_107040_AE0AB109 X-CRM114-Status: GOOD ( 10.75 ) X-Spam-Score: -4.2 (----) X-Spam-Report: SpamAssassin version 3.3.2 on merlin.infradead.org summary: Content analysis details: (-4.2 points) pts rule name description ---- ---------------------- -------------------------------------------------- -2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at http://www.dnswl.org/, medium trust [74.125.149.199 listed in list.dnswl.org] -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] Cc: Chao Xie X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: linux-arm-kernel-bounces@lists.infradead.org Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org It does the similar things as what we do for udc driver. Signed-off-by: Chao Xie Acked-by: Alan Stern --- drivers/usb/host/ehci-mv.c | 12 ++++++------ 1 files changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/usb/host/ehci-mv.c b/drivers/usb/host/ehci-mv.c index be504fd..171e145 100644 --- a/drivers/usb/host/ehci-mv.c +++ b/drivers/usb/host/ehci-mv.c @@ -256,8 +256,8 @@ static int mv_ehci_probe(struct platform_device *pdev) goto err_disable_clk; #endif } else { - if (pdata->set_vbus) - pdata->set_vbus(1); + if (mv_usb2_has_extern_call(ehci_mv->mvphy, vbus, set_vbus)) + mv_usb2_extern_call(ehci_mv->mvphy, vbus, set_vbus, 1); retval = usb_add_hcd(hcd, hcd->irq, IRQF_SHARED); if (retval) { @@ -275,8 +275,8 @@ static int mv_ehci_probe(struct platform_device *pdev) return 0; err_set_vbus: - if (pdata->set_vbus) - pdata->set_vbus(0); + if (mv_usb2_has_extern_call(ehci_mv->mvphy, vbus, set_vbus)) + mv_usb2_extern_call(ehci_mv->mvphy, vbus, set_vbus, 0); err_disable_clk: mv_ehci_disable(ehci_mv); err_clear_drvdata: @@ -299,8 +299,8 @@ static int mv_ehci_remove(struct platform_device *pdev) otg_set_host(ehci_mv->otg->otg, NULL); if (ehci_mv->mode == MV_USB_MODE_HOST) { - if (ehci_mv->pdata->set_vbus) - ehci_mv->pdata->set_vbus(0); + if (mv_usb2_has_extern_call(ehci_mv->mvphy, vbus, set_vbus)) + mv_usb2_extern_call(ehci_mv->mvphy, vbus, set_vbus, 1); mv_ehci_disable(ehci_mv); }