linux-clk.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Peter De Schrijver <pdeschrijver@nvidia.com>
To: Dmitry Osipenko <digetx@gmail.com>
Cc: Thierry Reding <thierry.reding@gmail.com>,
	Jonathan Hunter <jonathanh@nvidia.com>,
	Laxman Dewangan <ldewangan@nvidia.com>,
	"Prashant Gaikwad" <pgaikwad@nvidia.com>,
	Michael Turquette <mturquette@baylibre.com>,
	Stephen Boyd <sboyd@codeaurora.org>,
	Rob Herring <robh+dt@kernel.org>,
	"Vinod Koul" <vinod.koul@intel.com>,
	<linux-tegra@vger.kernel.org>, <devicetree@vger.kernel.org>,
	<dmaengine@vger.kernel.org>, <linux-clk@vger.kernel.org>,
	<linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v1 1/5] clk: tegra: Add AHB DMA clock entry
Date: Wed, 27 Sep 2017 11:36:05 +0300	[thread overview]
Message-ID: <20170927083605.GA6290@tbergstrom-lnx.Nvidia.com> (raw)
In-Reply-To: <b575c935-e928-4d51-9905-40731c1aa9c4@gmail.com>

On Tue, Sep 26, 2017 at 05:46:01PM +0300, Dmitry Osipenko wrote:
> On 26.09.2017 12:56, Peter De Schrijver wrote:
> > On Tue, Sep 26, 2017 at 02:22:02AM +0300, Dmitry Osipenko wrote:
> >> AHB DMA presents on Tegra20/30. Add missing entries, so that driver
> >> for AHB DMA could be implemented.
> >>
> >> Signed-off-by: Dmitry Osipenko <digetx@gmail.com>
> >> ---
> >>  drivers/clk/tegra/clk-id.h           | 1 +
> >>  drivers/clk/tegra/clk-tegra-periph.c | 1 +
> >>  drivers/clk/tegra/clk-tegra20.c      | 6 ++++++
> >>  drivers/clk/tegra/clk-tegra30.c      | 2 ++
> >>  4 files changed, 10 insertions(+)
> >>
> >> diff --git a/drivers/clk/tegra/clk-id.h b/drivers/clk/tegra/clk-id.h
> >> index 689f344377a7..c1661b47bbda 100644
> >> --- a/drivers/clk/tegra/clk-id.h
> >> +++ b/drivers/clk/tegra/clk-id.h
> >> @@ -12,6 +12,7 @@ enum clk_id {
> >>  	tegra_clk_amx,
> >>  	tegra_clk_amx1,
> >>  	tegra_clk_apb2ape,
> >> +	tegra_clk_ahbdma,
> >>  	tegra_clk_apbdma,
> >>  	tegra_clk_apbif,
> >>  	tegra_clk_ape,
> >> diff --git a/drivers/clk/tegra/clk-tegra-periph.c b/drivers/clk/tegra/clk-tegra-periph.c
> >> index 848255cc0209..95a3d8c95f06 100644
> >> --- a/drivers/clk/tegra/clk-tegra-periph.c
> >> +++ b/drivers/clk/tegra/clk-tegra-periph.c
> >> @@ -823,6 +823,7 @@ static struct tegra_periph_init_data gate_clks[] = {
> >>  	GATE("timer", "clk_m", 5, 0, tegra_clk_timer, CLK_IS_CRITICAL),
> >>  	GATE("isp", "clk_m", 23, 0, tegra_clk_isp, 0),
> >>  	GATE("vcp", "clk_m", 29, 0, tegra_clk_vcp, 0),
> >> +	GATE("ahbdma", "clk_m", 33, 0, tegra_clk_ahbdma, 0),
> > 
> > Parent for this should be hclk on Tegra30 and later chips as well..
> > 
> 
> It looks like other clocks have a wrong parent too here, aren't they? Like for
> example "apbdma" should have "pclk" as a parent, isn't it?
> 

Yes. That is correct.

> >>  	GATE("apbdma", "clk_m", 34, 0, tegra_clk_apbdma, 0),
> >>  	GATE("kbc", "clk_32k", 36, TEGRA_PERIPH_ON_APB | TEGRA_PERIPH_NO_RESET, tegra_clk_kbc, 0),
> >>  	GATE("fuse", "clk_m", 39, TEGRA_PERIPH_ON_APB, tegra_clk_fuse, 0),
> >> diff --git a/drivers/clk/tegra/clk-tegra20.c b/drivers/clk/tegra/clk-tegra20.c
> >> index 837e5cbd60e9..e76c0d292ca7 100644
> >> --- a/drivers/clk/tegra/clk-tegra20.c
> >> +++ b/drivers/clk/tegra/clk-tegra20.c
> >> @@ -449,6 +449,7 @@ static struct tegra_devclk devclks[] __initdata = {
> >>  	{ .con_id = "audio", .dt_id = TEGRA20_CLK_AUDIO },
> >>  	{ .con_id = "audio_2x", .dt_id = TEGRA20_CLK_AUDIO_2X },
> >>  	{ .dev_id = "tegra20-ac97", .dt_id = TEGRA20_CLK_AC97 },
> >> +	{ .dev_id = "tegra-ahbdma", .dt_id = TEGRA20_CLK_AHBDMA },
> > 
> > This isn't needed if you use DT bindings to get the clock handle.
> > 
> 
> Yes, I added it for consistency. Shouldn't we get rid of that all legacy stuff
> already?
> 

We probably should, but we can start by not adding more :)

> >>  	{ .dev_id = "tegra-apbdma", .dt_id = TEGRA20_CLK_APBDMA },
> >>  	{ .dev_id = "rtc-tegra", .dt_id = TEGRA20_CLK_RTC },
> >>  	{ .dev_id = "timer", .dt_id = TEGRA20_CLK_TIMER },
> >> @@ -806,6 +807,11 @@ static void __init tegra20_periph_clk_init(void)
> >>  				    clk_base, 0, 3, periph_clk_enb_refcnt);
> >>  	clks[TEGRA20_CLK_AC97] = clk;
> >>  
> >> +	/* ahbdma */
> >> +	clk = tegra_clk_register_periph_gate("ahbdma", "hclk", 0, clk_base,
> >> +				    0, 33, periph_clk_enb_refcnt);
> >> +	clks[TEGRA20_CLK_AHBDMA] = clk;
> >> +
> > 
> > You can use the generic definition here if you correct the entry above.
> > 
> 
> Good point, same applies to "apbdma". Thank you for the suggestion.
> 

Indeed.

Peter.

  reply	other threads:[~2017-09-27  8:36 UTC|newest]

Thread overview: 45+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-25 23:22 [PATCH v1 0/5] NVIDIA Tegra AHB DMA controller driver Dmitry Osipenko
2017-09-25 23:22 ` [PATCH v1 1/5] clk: tegra: Add AHB DMA clock entry Dmitry Osipenko
2017-09-26  9:56   ` Peter De Schrijver
2017-09-26 14:46     ` Dmitry Osipenko
2017-09-27  8:36       ` Peter De Schrijver [this message]
2017-09-27  9:41         ` Dmitry Osipenko
2017-09-25 23:22 ` [PATCH v1 2/5] clk: tegra: Bump SCLK clock rate to 216MHz on Tegra20 Dmitry Osipenko
2017-09-26 10:01   ` Peter De Schrijver
2017-09-25 23:22 ` [PATCH v1 3/5] dt-bindings: Add DT bindings for NVIDIA Tegra AHB DMA controller Dmitry Osipenko
2017-09-26 14:50   ` Jon Hunter
2017-09-26 15:16     ` Dmitry Osipenko
2017-09-27  1:57     ` Dmitry Osipenko
2017-09-27  8:34       ` Jon Hunter
2017-09-27 12:12         ` Dmitry Osipenko
2017-09-27 13:44           ` Jon Hunter
2017-09-27 13:46             ` Jon Hunter
2017-09-27 14:29               ` Dmitry Osipenko
2017-09-27 23:32         ` Stephen Boyd
2017-09-28  8:33           ` Jon Hunter
2017-09-29 19:30         ` Stephen Warren
2017-09-30  3:11           ` Dmitry Osipenko
2017-10-02 17:05             ` Stephen Warren
2017-10-02 23:02               ` Dmitry Osipenko
2017-10-03 10:32                 ` Jon Hunter
2017-10-03 12:07                   ` Dmitry Osipenko
2017-10-03 12:19                     ` Jon Hunter
2017-10-03 15:38                   ` Stephen Warren
2017-10-03 17:04                     ` Dmitry Osipenko
2017-10-05 20:33   ` Rob Herring
2017-10-05 21:30     ` Dmitry Osipenko
2017-09-25 23:22 ` [PATCH v1 4/5] dmaengine: Add driver " Dmitry Osipenko
2017-09-26 14:45   ` Jon Hunter
2017-09-26 16:06     ` Dmitry Osipenko
2017-09-26 21:37       ` Jon Hunter
2017-09-26 23:00         ` Dmitry Osipenko
2017-09-28  9:29   ` Vinod Koul
2017-09-28 12:17     ` Dmitry Osipenko
2017-09-28 14:06     ` Dmitry Osipenko
2017-09-28 14:35       ` Dmitry Osipenko
2017-09-28 16:22         ` Vinod Koul
2017-09-28 16:37           ` Dmitry Osipenko
2017-09-28 16:21       ` Vinod Koul
2017-09-25 23:22 ` [PATCH v1 5/5] ARM: dts: tegra: Add AHB DMA controller nodes Dmitry Osipenko
2017-09-28  9:31 ` [PATCH v1 0/5] NVIDIA Tegra AHB DMA controller driver Vinod Koul
2017-09-28 12:24   ` Dmitry Osipenko

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=20170927083605.GA6290@tbergstrom-lnx.Nvidia.com \
    --to=pdeschrijver@nvidia.com \
    --cc=devicetree@vger.kernel.org \
    --cc=digetx@gmail.com \
    --cc=dmaengine@vger.kernel.org \
    --cc=jonathanh@nvidia.com \
    --cc=ldewangan@nvidia.com \
    --cc=linux-clk@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tegra@vger.kernel.org \
    --cc=mturquette@baylibre.com \
    --cc=pgaikwad@nvidia.com \
    --cc=robh+dt@kernel.org \
    --cc=sboyd@codeaurora.org \
    --cc=thierry.reding@gmail.com \
    --cc=vinod.koul@intel.com \
    /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;
as well as URLs for NNTP newsgroup(s).