Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp3971571ybl; Mon, 9 Dec 2019 03:16:31 -0800 (PST) X-Google-Smtp-Source: APXvYqyxBLTsCVX5vTAf6Zh0LbZO5x6J3StDaFCHMN83wXH5A7iHZfrlhbSwr+gMvfSiyuG4xnP6 X-Received: by 2002:a9d:7ada:: with SMTP id m26mr21464863otn.111.1575890191223; Mon, 09 Dec 2019 03:16:31 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1575890191; cv=none; d=google.com; s=arc-20160816; b=HnxFc+LtLmHKtI0YttOveA9EUgYu90i0Thc/0q3rJRB70o6MhgoW138IZ6akDnnu1p j3eeh5pXEgca74tdh1owqeTymODx+Dl9izU7IHCo7x4Yz8Q6teKPgy48qdpmZkvgGLav zllcBeH5LFuYC0C3/1bwfdk2fOtsHOijzQOJMKS96LeXbdQ+zK4UAbtjrgG1btMX62og DoQHvT8/pt5RlzQ5oTrFmET6sP4S8uQrBGnauI82xOIPwWxYQgEkfQPIJ2n1smhTmQXH aDOx/zAbfghwAwV5gjYG/dxSkyC4z91kiJRckQGrOUFdgeRobz1CW1DEm8RyejVBJ4FH ldmw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=NPP6E/PsWl3L+rwNYUzYiqDcfLVQa9O47Ldc+6AXziQ=; b=YX8O6EHNnZRt1cQkDjG8djGwznQ8przbIrdyeuNWova4KmYw/qdaP5l8hc7zbMbM4f bhgtUc6VMVhf3k7uFKN4Er2Jfy5Z5YO6NxjU6YTzZmqTfpgprf+ok6HtKEvDVWwUML8m iYe56FxGuAMBzjPlYlrX6PlVhfyDQ0MazR0O0EY6zQiNiay0pnq/WfviqAkYlrf6rsSV SE13R94AfiZe2tQlKfTmQokf3UMZ8K3H9oe0nyD0UwAfkDssgUIG8kVSSQ9WThq8cAAV bAiEZuRLqSewEHGS39k9CM6yG0EF7W7Hw1UR2gPzo+UyMIIqQXbGYp4Bk8fuDdf/fjMv wffw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id j70si11501744oib.219.2019.12.09.03.16.19; Mon, 09 Dec 2019 03:16:31 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727542AbfLILDS (ORCPT + 99 others); Mon, 9 Dec 2019 06:03:18 -0500 Received: from foss.arm.com ([217.140.110.172]:56290 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726297AbfLILDS (ORCPT ); Mon, 9 Dec 2019 06:03:18 -0500 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 Cc: Neil Armstrong , Jerome Brunet , Kevin Hilman , Yue Wang , Michael Turquette , Stephen Boyd , Lorenzo Pieralisi , linux-amlogic@lists.infradead.org, linux-clk@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-pci@vger.kernel.org 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-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20191208210320.15539-3-repk@triplefau.lt> User-Agent: Mutt/1.10.1+81 (426a6c1) (2018-08-26) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.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 >