Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp3342549ybl; Sun, 8 Dec 2019 12:58:27 -0800 (PST) X-Google-Smtp-Source: APXvYqyIp2Qg5OR+G48sJWe2IZCJo70B98DKJ1E/stVOU7fhsugqSFJ7zbqJtKLuN702MYi6GnMD X-Received: by 2002:a9d:768b:: with SMTP id j11mr19258302otl.116.1575838707065; Sun, 08 Dec 2019 12:58:27 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1575838707; cv=none; d=google.com; s=arc-20160816; b=CLE5392aiCj1kX6GKQxuyiZ3J0F0H9R1s6plthjQ4PgauvxeVd75h8YWtMvCzQpnTD 5y0u0Evacyb6ywFMq7vKDA0yH9/RTmrh3KWg5AZU071E97BW0ZbhVEFnilU8bFwBIaQ3 b4xzX7ModJpnqvMduNMiEZ0r4woWk99TVmpHeND0iRZA3UCGbBX3jhX8wK5Bum5rKXYG t6IiVpzTf55KwFeGjbyN+4rcCwPsZ3TwYTYoVTxV2fyfKnmC3dlnarCvL0blaCJx2eDm vn76hohnPXJYI13k6iTzv5I9OW0ii9YOo1zjZZsbpPTm//VO5RZ5IolfgdZ5DFGKiSni OOgg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=yG5tqtpBxZ8L5vni4p3TTv+CoS0cojfpv9an+Ww+xEw=; b=SE7Y4KlRU62dO7IZq5dE5omyMYFEkhE/+IXqjoOKT6bSDi/LYssI3lQI40C3bphImN gJWKToNI80OdD1wR2ptNitND03j9QmuQIXsfexZKa81r87R4Qpx8SBcX13XyEIbwrQLq mjaNnBh0LgebShGIWAqHtdx5Nlr25Zk5orPO5K9p7o0meRw3te9Bbbq0LuElN+hDumac 1zHHDpsUj50iae2BQGNSOMU4bz7ZKeJ2vvOYp1iijjyLOr965uC8q0USl+u2vNWeinkm YLXDri85+G6fdcqxJentwh8RamqWhhYIudUzYg8lE+riYsm2FnXVSnRi4xvsBhT6nwbQ M1xQ== 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 u1si11101785otk.80.2019.12.08.12.58.15; Sun, 08 Dec 2019 12:58:27 -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 S1726743AbfLHUz1 (ORCPT + 99 others); Sun, 8 Dec 2019 15:55:27 -0500 Received: from relay6-d.mail.gandi.net ([217.70.183.198]:55441 "EHLO relay6-d.mail.gandi.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726513AbfLHUz0 (ORCPT ); Sun, 8 Dec 2019 15:55:26 -0500 X-Originating-IP: 88.190.179.123 Received: from localhost (unknown [88.190.179.123]) (Authenticated sender: repk@triplefau.lt) by relay6-d.mail.gandi.net (Postfix) with ESMTPSA id DE367C0003; Sun, 8 Dec 2019 20:55:22 +0000 (UTC) From: Remi Pommarel To: Neil Armstrong , Jerome Brunet , Kevin Hilman , Yue Wang Cc: 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, Remi Pommarel Subject: [PATCH 2/2] PCI: amlogic: Use PCIe pll gate when available Date: Sun, 8 Dec 2019 22:03:20 +0100 Message-Id: <20191208210320.15539-3-repk@triplefau.lt> X-Mailer: git-send-email 2.24.0 In-Reply-To: <20191208210320.15539-1-repk@triplefau.lt> References: <20191208210320.15539-1-repk@triplefau.lt> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. This clock gate is optional, so do not fail if it is missing in the devicetree. 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