From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.3 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id B5B8FC43603 for ; Mon, 9 Dec 2019 11:03:33 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 865D6207FF for ; Mon, 9 Dec 2019 11:03:33 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="qAGcEfTh" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 865D6207FF Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=arm.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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:In-Reply-To:MIME-Version:References: Message-ID:Subject:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=vGve1PRKsEEqEuABM31EGUzZSrpkysAAY0Np3hWx/h0=; b=qAGcEfTht9I3QM gFpKRHxY3oO4OpK1Lb1i1HN7DdnR71sg3PjilhRy2Qmc/m6q0GDJAqZ097w8M4QZZPO8Mi/v+4KKM dfYSeCwatztQz1Eoca/ffYxSS1e7jsdaZxrsMWpTEqjH788X500OOe1kE8fx+njprbEBo1uZqIymV tlOJj5pMCwvPBE72HSDk2EvguBrcOc6g+cdFtbE6zrmxPFj1+CQTKCkABIwW3lqw6bvhh+mk6nveK DvQ+MSX6zYaWwJCBoxnIKYq4Afdf/OFjzwCQh/LRCQKaipQEkxlkYuohigar55F+rCMb1dxUl4AKw TZo1GHRQl09n2s5HykXQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1ieGp3-00083M-JZ; Mon, 09 Dec 2019 11:03:25 +0000 Received: from foss.arm.com ([217.140.110.172]) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1ieGoz-00081X-Mj; Mon, 09 Dec 2019 11:03:23 +0000 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 965571FB; Mon, 9 Dec 2019 03:03:17 -0800 (PST) Received: from localhost (unknown [10.37.6.20]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 0D6EF3F6CF; Mon, 9 Dec 2019 03:03:16 -0800 (PST) Date: Mon, 9 Dec 2019 11:03:15 +0000 From: Andrew Murray To: Remi Pommarel Subject: Re: [PATCH 2/2] PCI: amlogic: Use PCIe pll gate when available Message-ID: <20191209110314.GQ18399@e119886-lin.cambridge.arm.com> References: <20191208210320.15539-1-repk@triplefau.lt> <20191208210320.15539-3-repk@triplefau.lt> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20191208210320.15539-3-repk@triplefau.lt> User-Agent: Mutt/1.10.1+81 (426a6c1) (2018-08-26) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20191209_030321_788765_25BD80D6 X-CRM114-Status: GOOD ( 20.13 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Lorenzo Pieralisi , Neil Armstrong , Stephen Boyd , Kevin Hilman , Michael Turquette , linux-kernel@vger.kernel.org, Yue Wang , linux-pci@vger.kernel.org, linux-amlogic@lists.infradead.org, linux-clk@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Jerome Brunet Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Sun, Dec 08, 2019 at 10:03:20PM +0100, Remi Pommarel wrote: > In order to get PCIe working reliably on some AXG platforms, PCIe pll > cml needs to be enabled. This is done by using the PCIE_PLL_CML_ENABLE > clock gate. s/cml/CML/ In addition to Jerome's feedback - it would also be helpful to explain when CML outputs should be enabled, i.e. which platforms and why those ones? > > This clock gate is optional, so do not fail if it is missing in the > devicetree. If certain platforms require PCIE_PLL_CML_ENABLE to work reliably and thus the clock is specified in the device tree - then surely if there is an error in enabling the clock we should fail? I.e. should you only ignore -ENOENT here? Thanks, Andrew Murray > > Signed-off-by: Remi Pommarel > --- > drivers/pci/controller/dwc/pci-meson.c | 5 +++++ > 1 file changed, 5 insertions(+) > > diff --git a/drivers/pci/controller/dwc/pci-meson.c b/drivers/pci/controller/dwc/pci-meson.c > index 3772b02a5c55..32b70ea9a426 100644 > --- a/drivers/pci/controller/dwc/pci-meson.c > +++ b/drivers/pci/controller/dwc/pci-meson.c > @@ -89,6 +89,7 @@ struct meson_pcie_clk_res { > struct clk *mipi_gate; > struct clk *port_clk; > struct clk *general_clk; > + struct clk *pll_cml_gate; > }; > > struct meson_pcie_rc_reset { > @@ -300,6 +301,10 @@ static int meson_pcie_probe_clocks(struct meson_pcie *mp) > if (IS_ERR(res->clk)) > return PTR_ERR(res->clk); > > + res->pll_cml_gate = meson_pcie_probe_clock(dev, "pll_cml_en", 0); > + if (IS_ERR(res->pll_cml_gate)) > + res->pll_cml_gate = NULL; > + > return 0; > } > > -- > 2.24.0 > _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel