All of lore.kernel.org
 help / color / mirror / Atom feed
From: Michal Simek <michal.simek@xilinx.com>
To: u-boot@lists.denx.de
Subject: [PATCH v2 3/5] clk: versal: Add support to enable clocks
Date: Wed, 10 Feb 2021 13:42:21 +0100	[thread overview]
Message-ID: <cce617f54e8d48641118d9abc7ffb084d3a7426d.1612960940.git.michal.simek@xilinx.com> (raw)
In-Reply-To: <cover.1612960940.git.michal.simek@xilinx.com>

From: T Karthik Reddy <t.karthik.reddy@xilinx.com>

Add clock enable functionality in versal clock driver to enable
clocks from peripheral drivers using clk_ops.

Signed-off-by: T Karthik Reddy <t.karthik.reddy@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
---

Changes in v2:
- change patch possition

 drivers/clk/clk_versal.c | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/drivers/clk/clk_versal.c b/drivers/clk/clk_versal.c
index 908bc7519c42..62523d290999 100644
--- a/drivers/clk/clk_versal.c
+++ b/drivers/clk/clk_versal.c
@@ -718,9 +718,20 @@ static ulong versal_clk_set_rate(struct clk *clk, ulong rate)
 	return clk_rate;
 }
 
+static int versal_clk_enable(struct clk *clk)
+{
+	struct versal_clk_priv *priv = dev_get_priv(clk->dev);
+	u32 clk_id;
+
+	clk_id = priv->clk[clk->id].clk_id;
+
+	return xilinx_pm_request(PM_CLOCK_ENABLE, clk_id, 0, 0, 0, NULL);
+}
+
 static struct clk_ops versal_clk_ops = {
 	.set_rate = versal_clk_set_rate,
 	.get_rate = versal_clk_get_rate,
+	.enable = versal_clk_enable,
 };
 
 static const struct udevice_id versal_clk_ids[] = {
-- 
2.30.0

  parent reply	other threads:[~2021-02-10 12:42 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-10 12:42 [PATCH v2 0/5] clk: Add support to enable clocks Michal Simek
2021-02-10 12:42 ` [PATCH v2 1/5] clk: zynq: Add dummy clock enable function Michal Simek
2021-02-10 12:42 ` [PATCH v2 2/5] clk: zynqmp: Add support to enable clocks Michal Simek
2021-02-10 12:42 ` Michal Simek [this message]
2021-02-10 12:42 ` [PATCH v2 4/5] i2c: i2c_cdns: Enable i2c clock Michal Simek
2021-02-11  5:24   ` Heiko Schocher
2021-02-10 12:42 ` [PATCH v2 5/5] net: gem: Enable ethernet rx clock for versal Michal Simek

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=cce617f54e8d48641118d9abc7ffb084d3a7426d.1612960940.git.michal.simek@xilinx.com \
    --to=michal.simek@xilinx.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.