LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Dmitry Osipenko <digetx@gmail.com>
To: Thierry Reding <thierry.reding@gmail.com>,
	Jonathan Hunter <jonathanh@nvidia.com>,
	Peter De Schrijver <pdeschrijver@nvidia.com>,
	Prashant Gaikwad <pgaikwad@nvidia.com>,
	Stephen Boyd <sboyd@kernel.org>,
	Michael Turquette <mturquette@baylibre.com>,
	Linus Walleij <linus.walleij@linaro.org>,
	Marcel Ziswiler <marcel@ziswiler.com>,
	Marc Dietrich <marvin24@gmx.de>
Cc: linux-clk@vger.kernel.org, linux-gpio@vger.kernel.org,
	linux-tegra@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH v1 1/4] clk: tegra20: Add DEV1/DEV2 OSC dividers
Date: Fri, 27 Apr 2018 02:58:15 +0300	[thread overview]
Message-ID: <20180426235818.10018-2-digetx@gmail.com> (raw)
In-Reply-To: <20180426235818.10018-1-digetx@gmail.com>

CDEV1/CDEV2 clocks could have corresponding oscillator clock divider as
a parent. Add these dividers in order to be able to provide that parent
option.

Signed-off-by: Dmitry Osipenko <digetx@gmail.com>
---
 drivers/clk/tegra/clk-tegra20.c | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/drivers/clk/tegra/clk-tegra20.c b/drivers/clk/tegra/clk-tegra20.c
index 0ee56dd04cec..16cf4108f2ff 100644
--- a/drivers/clk/tegra/clk-tegra20.c
+++ b/drivers/clk/tegra/clk-tegra20.c
@@ -26,6 +26,8 @@
 #include "clk.h"
 #include "clk-id.h"
 
+#define MISC_CLK_ENB 0x48
+
 #define OSC_CTRL 0x50
 #define OSC_CTRL_OSC_FREQ_MASK (3<<30)
 #define OSC_CTRL_OSC_FREQ_13MHZ (0<<30)
@@ -831,6 +833,16 @@ static void __init tegra20_periph_clk_init(void)
 				    periph_clk_enb_refcnt);
 	clks[TEGRA20_CLK_PEX] = clk;
 
+	/* cdev1 OSC divider */
+	clk_register_divider(NULL, "cdev1_osc_div", "clk_m",
+			     0, clk_base + MISC_CLK_ENB, 20, 2,
+			     CLK_DIVIDER_POWER_OF_TWO, NULL);
+
+	/* cdev2 OSC divider */
+	clk_register_divider(NULL, "cdev2_osc_div", "clk_m",
+			     0, clk_base + MISC_CLK_ENB, 22, 2,
+			     CLK_DIVIDER_POWER_OF_TWO, NULL);
+
 	/* cdev1 */
 	clk = clk_register_fixed_rate(NULL, "cdev1_fixed", NULL, 0, 26000000);
 	clk = tegra_clk_register_periph_gate("cdev1", "cdev1_fixed", 0,
-- 
2.17.0

  reply	other threads:[~2018-04-26 23:59 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-04-26 23:58 [PATCH v1 0/4] Restore ULPI USB on Tegra20 Dmitry Osipenko
2018-04-26 23:58 ` Dmitry Osipenko [this message]
2018-04-27 12:33   ` [PATCH v1 1/4] clk: tegra20: Add DEV1/DEV2 OSC dividers Marcel Ziswiler
2018-04-27 12:54     ` Dmitry Osipenko
2018-04-27 13:00       ` Marcel Ziswiler
2018-05-03 11:59         ` Dmitry Osipenko
2018-05-03 12:02           ` Dmitry Osipenko
2018-05-03 12:30             ` Marcel Ziswiler
2018-05-03 12:35               ` Dmitry Osipenko
2018-04-30  7:48   ` Peter De Schrijver
2018-04-26 23:58 ` [PATCH v1 2/4] pinctrl: tegra20: Provide CDEV1/2 clock muxes Dmitry Osipenko
2018-04-30  7:46   ` Peter De Schrijver
2018-05-02 12:32   ` Linus Walleij
2018-04-26 23:58 ` [PATCH v1 3/4] clk: tegra20: Set correct parents for CDEV1/2 clocks Dmitry Osipenko
2018-04-30  7:46   ` Peter De Schrijver
2018-05-01 21:31   ` Stephen Boyd
2018-04-26 23:58 ` [PATCH v1 4/4] ARM: dts: tegra20: Revert "Fix ULPI regression on Tegra20" Dmitry Osipenko
2018-04-27 12:30 ` [PATCH v1 0/4] Restore ULPI USB on Tegra20 Marc Dietrich
2018-04-30  9:48 ` Thierry Reding
2018-04-30 11:28   ` Thierry Reding
2018-05-01 21:30     ` Stephen Boyd
2018-05-02 12:58     ` Linus Walleij

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=20180426235818.10018-2-digetx@gmail.com \
    --to=digetx@gmail.com \
    --cc=jonathanh@nvidia.com \
    --cc=linus.walleij@linaro.org \
    --cc=linux-clk@vger.kernel.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tegra@vger.kernel.org \
    --cc=marcel@ziswiler.com \
    --cc=marvin24@gmx.de \
    --cc=mturquette@baylibre.com \
    --cc=pdeschrijver@nvidia.com \
    --cc=pgaikwad@nvidia.com \
    --cc=sboyd@kernel.org \
    --cc=thierry.reding@gmail.com \
    --subject='Re: [PATCH v1 1/4] clk: tegra20: Add DEV1/DEV2 OSC dividers' \
    /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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).