public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Jagan Teki <jagan@amarulasolutions.com>
To: u-boot@lists.denx.de
Subject: [PATCH 3/8] clk: rk3399: Enable PCIE_PHY clock
Date: Sat, 25 Apr 2020 16:33:49 +0530	[thread overview]
Message-ID: <20200425110354.12381-4-jagan@amarulasolutions.com> (raw)
In-Reply-To: <20200425110354.12381-1-jagan@amarulasolutions.com>

Add PCIE_PHY clock enablement support on rk3399
clock driver.

This clock is enabled by default, so do nothing
if it triggers during the PCIe PHY probe other
PHY users on this clock will simply fail.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
---
 drivers/clk/rockchip/clk_rk3399.c | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

diff --git a/drivers/clk/rockchip/clk_rk3399.c b/drivers/clk/rockchip/clk_rk3399.c
index d822acace1..8e069fbade 100644
--- a/drivers/clk/rockchip/clk_rk3399.c
+++ b/drivers/clk/rockchip/clk_rk3399.c
@@ -1071,12 +1071,27 @@ static int __maybe_unused rk3399_clk_set_parent(struct clk *clk,
 	return -ENOENT;
 }
 
+static int rk3399_clk_enable(struct clk *clk)
+{
+	switch (clk->id) {
+	case SCLK_PCIEPHY_REF:
+		/* do nothing, clk is enabled by default */
+		break;
+	default:
+		debug("%s: unsupported clk %ld\n", __func__, clk->id);
+		return -ENOENT;
+	}
+
+	return 0;
+}
+
 static struct clk_ops rk3399_clk_ops = {
 	.get_rate = rk3399_clk_get_rate,
 	.set_rate = rk3399_clk_set_rate,
 #if CONFIG_IS_ENABLED(OF_CONTROL) && !CONFIG_IS_ENABLED(OF_PLATDATA)
 	.set_parent = rk3399_clk_set_parent,
 #endif
+	.enable = rk3399_clk_enable,
 };
 
 #ifdef CONFIG_SPL_BUILD
-- 
2.17.1

  parent reply	other threads:[~2020-04-25 11:03 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-25 11:03 [PATCH 0/8] rockchip: Add PCIe host support Jagan Teki
2020-04-25 11:03 ` [PATCH 1/8] iopoll: Add dealy to read poll Jagan Teki
2020-04-25 11:03 ` [PATCH 2/8] iopoll: Add readl_poll_sleep_timeout Jagan Teki
2020-04-25 11:03 ` Jagan Teki [this message]
2020-04-25 20:24   ` [PATCH 3/8] clk: rk3399: Enable PCIE_PHY clock Mark Kettenis
2020-04-26  9:38     ` Jagan Teki
2020-04-25 11:03 ` [PATCH 4/8] clk: rk3399: Disable " Jagan Teki
2020-04-28  9:53   ` [PATCH 4/8] clk: rk3399: Disable PCIE_PHY clock【请注意,邮件由linux-rockchip-bounces+kever.yang=rock-chips.com@lists.infradead.org代发】 Kever Yang
2020-04-25 11:03 ` [PATCH 5/8] pci: Add Rockchip PCIe controller driver Jagan Teki
2020-04-25 18:53   ` Mark Kettenis
2020-04-25 19:36     ` Jagan Teki
2020-04-25 20:29       ` Mark Kettenis
2020-04-28 19:09         ` Jagan Teki
2020-04-27 17:19       ` Robin Murphy
2020-04-25 23:51   ` [PATCH 5/8] pci: Add Rockchip PCIe controller driver【请注意,邮件由linux-rockchip-bounces+shawn.lin=rock-chips.com@lists.infradead.org代发】 Shawn Lin
2020-04-28 19:39     ` Jagan Teki
2020-04-28  9:53   ` [PATCH 5/8] pci: Add Rockchip PCIe controller driver Kever Yang
2020-04-25 11:03 ` [PATCH 6/8] pci: Add Rockchip PCIe PHY " Jagan Teki
2020-04-25 11:03 ` [PATCH 7/8] rockchip: Enable PCIe/M.2 on rk3399 board w/ M.2 Jagan Teki
2020-04-25 11:03 ` [PATCH 8/8] rockchip: Enable PCIe/M.2 on rock960 board Jagan Teki

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200425110354.12381-4-jagan@amarulasolutions.com \
    --to=jagan@amarulasolutions.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox