From patchwork Tue Mar 7 06:57:20 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chunfeng Yun X-Patchwork-Id: 9608129 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 7A84B6046A for ; Tue, 7 Mar 2017 06:58:31 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6BDCF265B9 for ; Tue, 7 Mar 2017 06:58:31 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 5F08728481; Tue, 7 Mar 2017 06:58:31 +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=-1.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,UNPARSEABLE_RELAY autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id E882D265B9 for ; Tue, 7 Mar 2017 06:58:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-ID:Date:Subject:To :From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=QcBrYnPbnaepWGATfUZ7RwB8XmWLF8N+LBb4Bd3NOu8=; b=ezvZENI1388VnB UZut6EwsIiJCzCoqyyNFmI3ydVNFIkNmCn+cqb/LbI4Y5EthkjaPTisGDKggOx1eR4oxgHpReTKTx 9L8E9QhON8Qe2QK72iGOEygZPFvpD6OoAfN6Ch2Uyjh75llcH9rl730bNVhQHmzDabHnfnyi2eNJ0 d5Tztg8gYiMLYTTRG/wJSTqxI3pFxrx0GL1I2UVUvE/yzmcj9pP82MxtfMlrSnkx1CxOdZNsyS9Px gxUiUXyNy0+XL+xniNBZvhT4uSbyrEnyjFMzEfDCeqg0J73nbxgHSWNiFa0PN4z3aR1Msl4+b4ZrF wzVfadMvNaJolqByUylA==; 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 1cl94o-0004Ri-La; Tue, 07 Mar 2017 06:58:30 +0000 Received: from [210.61.82.184] (helo=mailgw02.mediatek.com) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1cl94K-0004Ee-Fv; Tue, 07 Mar 2017 06:58:02 +0000 Received: from mtkhts09.mediatek.inc [(172.21.101.70)] by mailgw02.mediatek.com (envelope-from ) (mhqrelay.mediatek.com ESMTP with TLS) with ESMTP id 1179620626; Tue, 07 Mar 2017 14:57:30 +0800 Received: from localhost.localdomain (10.17.3.153) by mtkhts09.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 14.3.266.1; Tue, 7 Mar 2017 14:57:28 +0800 From: Chunfeng Yun To: Mathias Nyman Subject: [PATCH 1/2] usb: xhci-mtk: rebuild xhci_mtk_setup() Date: Tue, 7 Mar 2017 14:57:20 +0800 Message-ID: <1488869841-9959-1-git-send-email-chunfeng.yun@mediatek.com> X-Mailer: git-send-email 1.7.9.5 MIME-Version: 1.0 X-MTK: N X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170306_225800_670704_37DDBB8D X-CRM114-Status: GOOD ( 12.71 ) X-BeenThere: linux-mediatek@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Felipe Balbi , Greg Kroah-Hartman , linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org, Chunfeng Yun , linux-mediatek@lists.infradead.org, Matthias Brugger , linux-arm-kernel@lists.infradead.org Sender: "Linux-mediatek" Errors-To: linux-mediatek-bounces+patchwork-linux-mediatek=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP simplify xhci_mtk_setup() and add xhci_mtk_start() for xhci_driver_overrides struct Signed-off-by: Chunfeng Yun --- drivers/usb/host/xhci-mtk.c | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/drivers/usb/host/xhci-mtk.c b/drivers/usb/host/xhci-mtk.c index 67d5dc7..9636884 100644 --- a/drivers/usb/host/xhci-mtk.c +++ b/drivers/usb/host/xhci-mtk.c @@ -381,8 +381,10 @@ static int usb_wakeup_of_property_parse(struct xhci_hcd_mtk *mtk, } static int xhci_mtk_setup(struct usb_hcd *hcd); +static int xhci_mtk_start(struct usb_hcd *hcd); static const struct xhci_driver_overrides xhci_mtk_overrides __initconst = { .reset = xhci_mtk_setup, + .start = xhci_mtk_start, }; static struct hc_driver __read_mostly xhci_mtk_hc_driver; @@ -492,7 +494,6 @@ static void xhci_mtk_quirks(struct device *dev, struct xhci_hcd *xhci) /* called during probe() after chip reset completes */ static int xhci_mtk_setup(struct usb_hcd *hcd) { - struct xhci_hcd *xhci = hcd_to_xhci(hcd); struct xhci_hcd_mtk *mtk = hcd_to_mtk(hcd); int ret; @@ -502,9 +503,14 @@ static int xhci_mtk_setup(struct usb_hcd *hcd) return ret; } - ret = xhci_gen_setup(hcd, xhci_mtk_quirks); - if (ret) - return ret; + return xhci_gen_setup(hcd, xhci_mtk_quirks); +} + +static int xhci_mtk_start(struct usb_hcd *hcd) +{ + struct xhci_hcd *xhci = hcd_to_xhci(hcd); + struct xhci_hcd_mtk *mtk = hcd_to_mtk(hcd); + int ret; if (usb_hcd_is_primary_hcd(hcd)) { mtk->num_u3_ports = xhci->num_usb3_ports; @@ -514,7 +520,7 @@ static int xhci_mtk_setup(struct usb_hcd *hcd) return ret; } - return ret; + return xhci_run(hcd); } static int xhci_mtk_probe(struct platform_device *pdev)