Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp3134287ybl; Sun, 15 Dec 2019 03:39:40 -0800 (PST) X-Google-Smtp-Source: APXvYqzJr7bsHz9xhLDKkZxZXPX+jKBpou/2Q7hB457Ja47sAoBu1RCICwn2GOpAno++sRr1dUcL X-Received: by 2002:a9d:7a46:: with SMTP id z6mr26597114otm.194.1576409980623; Sun, 15 Dec 2019 03:39:40 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1576409980; cv=none; d=google.com; s=arc-20160816; b=EDzfwGZM9SS5e/RBlEUa/yNkv0gXYtVok/EMiYSjXA/VTdwHW5TlbQAiYP8NCzX1WQ R79ycKeAIbVtALWwsMyhuAUp5R394thqVIRX66mLVWw82pSp1TDfHLy6tg4i3ooKg7Wf xjqjlI/4TW7yy7sJyPvbBKQDHHQctiqTDw6dSvo9BRDW7CtR63COZBNegmAx5yrwKEeD FL9lAIA7hA/sRPAFRt66Ofe8yHV0QuLUJtD5nmxYjb8sDzJegQfqbyotjPXsp2jBUf/c SCqZLA9Ek3Lnn8x2gTxj/Nq/wLxhG/MrugT3J77+KIKJr8V1RTlUqM//2F4iCYcIMdSW Dpsg== 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=j+ftVm6va3fwOT1cd6r9fd5qD09OBavjwqHg2DH+xP4=; b=xgyaN7YCM0w6HWz1H92HkGG+fOyoVgJXhjDCkU7hrWUwuAU2Z3Eq7RrrY8dw8m/anD NFLQfkeVEURufE9HfgEm8hqJiRVsjwDDERtfrXT2UaFN7fv9gb4YIfcsGQ86QKCxRZ1S 83X473W58zYco1OCAOm4ZtTmXNJFvB6M29a92auSs3Mat/U+XIJTl2AMazg/6lbUOoJs XTOi0jpYkekZ5yg6zafIdTCiALwTsaA13E+R/DuHxrGjRhp65ZMyzZB4OK5Kt5X95kcv BhXvDg27UqdJ1JqiIk2Ld0x6pTGo+j8lKlSvVPBUTBjZ7EoDr+ToqMb8/oFn1pVl+WQq K3oQ== 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 e17si8722725oti.89.2019.12.15.03.39.28; Sun, 15 Dec 2019 03:39:40 -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 S1726232AbfLOLaA (ORCPT + 99 others); Sun, 15 Dec 2019 06:30:00 -0500 Received: from relay12.mail.gandi.net ([217.70.178.232]:56737 "EHLO relay12.mail.gandi.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726083AbfLOL37 (ORCPT ); Sun, 15 Dec 2019 06:29:59 -0500 Received: from localhost (unknown [88.190.179.123]) (Authenticated sender: repk@triplefau.lt) by relay12.mail.gandi.net (Postfix) with ESMTPSA id F41F9200003; Sun, 15 Dec 2019 11:29:55 +0000 (UTC) Date: Sun, 15 Dec 2019 12:38:20 +0100 From: Remi Pommarel To: Andrew Murray 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: <20191215113820.GC7304@voidbox> References: <20191208210320.15539-1-repk@triplefau.lt> <20191208210320.15539-3-repk@triplefau.lt> <20191209110314.GQ18399@e119886-lin.cambridge.arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20191209110314.GQ18399@e119886-lin.cambridge.arm.com> User-Agent: Mutt/1.12.2 (2019-09-21) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Dec 09, 2019 at 11:03:15AM +0000, Andrew Murray wrote: > 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? Good point. Will do. Thanks -- Remi > > 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 > >