From patchwork Fri Oct 13 08:26:37 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?b?Q2h1bmZlbmcgWXVuICjkupHmmKXls7Ap?= X-Patchwork-Id: 10003747 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 8E47C60325 for ; Fri, 13 Oct 2017 08:30:26 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7E11E28FE2 for ; Fri, 13 Oct 2017 08:30:26 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 730F028FF8; Fri, 13 Oct 2017 08:30:26 +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.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, RCVD_IN_DNSWL_MED, UNPARSEABLE_RELAY autolearn=unavailable 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 13DD328FE2 for ; Fri, 13 Oct 2017 08:30:26 +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:References:In-Reply-To: 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: List-Owner; bh=12FNXOkIymK6G/vxOQANI5CejEbXvnJ1c4j0K09GGdo=; b=lwqLPFLi6pc+33 DTcuCqevfGTH1vyqih81WUhZa1fPJEf/zAKfQJBRZFSrylGIcxRSAcA9EPb3H17OenmaT71V9otbs 3aRcAFI7dioijDK08c0dbB7AZz5sGreaUNmm9Z3HRkPK3Tev215WFqEADDFZE0kvQ9hEubhZ7Y4+2 bTP1DpHcWppH4e2cd8b6C2/2jH6FeSYX4hDmt9ddWNKuIlbWBL9JFo03fzLnxzAHF/L2aRyTUwP0f QH3kYHw6kkF22gCKkENMRPH1ublj7xSC9zs2IDPBlxeSYWpwLcMQJrt6Cuh3L8NlulSELxjtoE4ml rQAM2qxEcJ1AFL9+wXUA==; 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 1e2vMO-00026g-2V; Fri, 13 Oct 2017 08:30:24 +0000 Received: from [218.249.47.111] (helo=mailgw02.mediatek.com) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1e2vJi-0006m9-5B; Fri, 13 Oct 2017 08:27:51 +0000 X-UUID: 1bf4ede541f54346b8f1a313823cae5f-20171013 Received: from mtkcas34.mediatek.inc [(172.27.4.250)] by mailgw02.mediatek.com (envelope-from ) (mailgw01.mediatek.com ESMTP with TLS) with ESMTP id 1259143265; Fri, 13 Oct 2017 16:27:04 +0800 Received: from MTKCAS06.mediatek.inc (172.21.101.30) by MTKMBS31N1.mediatek.inc (172.27.4.69) with Microsoft SMTP Server (TLS) id 15.0.1210.3; Fri, 13 Oct 2017 16:27:02 +0800 Received: from localhost.localdomain (10.17.3.153) by MTKCAS06.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1210.3 via Frontend Transport; Fri, 13 Oct 2017 16:27:01 +0800 From: Chunfeng Yun To: Mathias Nyman , Greg Kroah-Hartman , Felipe Balbi , Rob Herring Subject: [PATCH v2 5/9] usb: xhci-mtk: remove dummy wakeup debounce clocks Date: Fri, 13 Oct 2017 16:26:37 +0800 Message-ID: X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <994382d16d6bdc0f3d7c11b22f1710252e056e34.1507882470.git.chunfeng.yun@mediatek.com> References: <994382d16d6bdc0f3d7c11b22f1710252e056e34.1507882470.git.chunfeng.yun@mediatek.com> MIME-Version: 1.0 X-MTK: N X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20171013_012745_990758_3E058198 X-CRM114-Status: GOOD ( 11.31 ) 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: Mark Rutland , devicetree@vger.kernel.org, Ian Campbell , 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 The wakeup debounce clocks for each ports in fact are not needed, so remove them. Signed-off-by: Chunfeng Yun Reviewed-by: Matthias Brugger --- drivers/usb/host/xhci-mtk.c | 33 --------------------------------- drivers/usb/host/xhci-mtk.h | 2 -- 2 files changed, 35 deletions(-) diff --git a/drivers/usb/host/xhci-mtk.c b/drivers/usb/host/xhci-mtk.c index 97ba51e..d60463c 100644 --- a/drivers/usb/host/xhci-mtk.c +++ b/drivers/usb/host/xhci-mtk.c @@ -237,25 +237,8 @@ static int xhci_mtk_clks_enable(struct xhci_hcd_mtk *mtk) goto sys_clk_err; } - if (mtk->wakeup_src) { - ret = clk_prepare_enable(mtk->wk_deb_p0); - if (ret) { - dev_err(mtk->dev, "failed to enable wk_deb_p0\n"); - goto usb_p0_err; - } - - ret = clk_prepare_enable(mtk->wk_deb_p1); - if (ret) { - dev_err(mtk->dev, "failed to enable wk_deb_p1\n"); - goto usb_p1_err; - } - } return 0; -usb_p1_err: - clk_disable_unprepare(mtk->wk_deb_p0); -usb_p0_err: - clk_disable_unprepare(mtk->sys_clk); sys_clk_err: clk_disable_unprepare(mtk->ref_clk); ref_clk_err: @@ -264,10 +247,6 @@ static int xhci_mtk_clks_enable(struct xhci_hcd_mtk *mtk) static void xhci_mtk_clks_disable(struct xhci_hcd_mtk *mtk) { - if (mtk->wakeup_src) { - clk_disable_unprepare(mtk->wk_deb_p1); - clk_disable_unprepare(mtk->wk_deb_p0); - } clk_disable_unprepare(mtk->sys_clk); clk_disable_unprepare(mtk->ref_clk); } @@ -371,18 +350,6 @@ static int usb_wakeup_of_property_parse(struct xhci_hcd_mtk *mtk, if (!mtk->wakeup_src) return 0; - mtk->wk_deb_p0 = devm_clk_get(dev, "wakeup_deb_p0"); - if (IS_ERR(mtk->wk_deb_p0)) { - dev_err(dev, "fail to get wakeup_deb_p0\n"); - return PTR_ERR(mtk->wk_deb_p0); - } - - mtk->wk_deb_p1 = devm_clk_get(dev, "wakeup_deb_p1"); - if (IS_ERR(mtk->wk_deb_p1)) { - dev_err(dev, "fail to get wakeup_deb_p1\n"); - return PTR_ERR(mtk->wk_deb_p1); - } - mtk->pericfg = syscon_regmap_lookup_by_phandle(dn, "mediatek,syscon-wakeup"); if (IS_ERR(mtk->pericfg)) { diff --git a/drivers/usb/host/xhci-mtk.h b/drivers/usb/host/xhci-mtk.h index db55a12..67783a7 100644 --- a/drivers/usb/host/xhci-mtk.h +++ b/drivers/usb/host/xhci-mtk.h @@ -126,8 +126,6 @@ struct xhci_hcd_mtk { struct regulator *vbus; struct clk *sys_clk; /* sys and mac clock */ struct clk *ref_clk; - struct clk *wk_deb_p0; /* port0's wakeup debounce clock */ - struct clk *wk_deb_p1; struct regmap *pericfg; struct phy **phys; int num_phys;