All of lore.kernel.org
 help / color / mirror / Atom feed
From: hl <hl@rock-chips.com>
To: "Heiko Stübner" <heiko@sntech.de>
Cc: mark.yao@rock-chips.com, myungjoo.ham@samsung.com,
	mturquette@baylibre.com, sboyd@codeaurora.org,
	linux-clk@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
	linux-rockchip@lists.infradead.org, airlied@linux.ie,
	dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org,
	kyungmin.park@samsung.com, dianders@chromium.org,
	dbasehore@chromium.org, huangtao@rock-chips.com,
	typ@rock-chips.com
Subject: Re: [RFC PATCH v1 3/6] clk: rockchip: rk3399: add ddrc clock support
Date: Mon, 6 Jun 2016 11:25:27 +0800	[thread overview]
Message-ID: <5754ED27.1070402@rock-chips.com> (raw)
In-Reply-To: <13084747.Amq298iRsd@diego>

Hi Heiko,

On 2016年06月03日 20:56, Heiko Stübner wrote:
> Am Freitag, 3. Juni 2016, 17:55:16 schrieb Lin Huang:
>> add ddrc clock setting, so we can do ddr frequency
>> scaling on rk3399 platform in future.
>>
>> Signed-off-by: Lin Huang <hl@rock-chips.com>
>> ---
>> Changes in v1:
>> - remove ddrc source CLK_IGNORE_UNUSED flag, Suggestion by Doug
>> - move clk_ddrc and clk_ddrc_dpll_src to critical, Suggestion by Doug
>>
>>   drivers/clk/rockchip/clk-rk3399.c | 20 ++++++++++++++++++++
>>   1 file changed, 20 insertions(+)
>>
>> diff --git a/drivers/clk/rockchip/clk-rk3399.c
>> b/drivers/clk/rockchip/clk-rk3399.c index f1d8e44..29afb88 100644
>> --- a/drivers/clk/rockchip/clk-rk3399.c
>> +++ b/drivers/clk/rockchip/clk-rk3399.c
> [...]
>
>> @@ -1377,6 +1381,18 @@ static struct rockchip_clk_branch
>> rk3399_clk_branches[] __initdata = { COMPOSITE_NOMUX(0, "clk_test",
>> "clk_test_pre", CLK_IGNORE_UNUSED, RK3368_CLKSEL_CON(58), 0, 5, DFLAGS,
>>   			RK3368_CLKGATE_CON(13), 11, GFLAGS),
>> +
>> +	/* ddrc */
>> +	GATE(0, "clk_ddrc_lpll_src", "lpll", 0, RK3399_CLKGATE_CON(3),
>> +	     0, GFLAGS),
>> +	GATE(0, "clk_ddrc_bpll_src", "bpll", 0, RK3399_CLKGATE_CON(3),
>> +	     1, GFLAGS),
>> +	GATE(0, "clk_ddrc_dpll_src", "dpll", 0, RK3399_CLKGATE_CON(3),
>> +	     2, GFLAGS),
>> +	GATE(0, "clk_ddrc_gpll_src", "gpll", 0, RK3399_CLKGATE_CON(3),
>> +	     3, GFLAGS),
>> +	COMPOSITE_DDRC(SCLK_DDRCLK, "clk_ddrc", mux_ddrclk_p, 0,
>> +		       RK3399_CLKSEL_CON(6), 4, 2, MFLAGS, 0, 3, DFLAGS),
>>   };
> as said in the other patch, just make this a regular COMPOSITE_NOGATE with
> CLK_DIVIDER_READ_ONLY | CLK_MUX_READ_ONLY until that interface to the ATF
> exists and is approved.
>
> That way you can still read back the clock rate without anything changing the
> clock-rate, but we don't need to add duplicate code for it.
>
>
>>   static struct rockchip_clk_branch rk3399_clk_pmu_branches[] __initdata = {
>> @@ -1487,6 +1503,10 @@ static const char *const rk3399_cru_critical_clocks[]
>> __initconst = { "gpll_hclk_perilp1_src",
>>   	"gpll_aclk_perilp0_src",
>>   	"gpll_aclk_perihp_src",
>> +
>> +	/* ddrc */
>> +	"clk_ddrc_dpll_src",
> Why does your clk_ddrc_dpll_src need a separate critical entry. Any code
> changing the clk_ddrc parent should make sure the new parent is enabled. (The
> clock-framework of course does this already).
     Okay, thank you.
>
>> +	"clk_ddrc",
>>   };
>>
>>   static const char *const rk3399_pmucru_critical_clocks[] __initconst = {
>
> Heiko
>
>
>
>

-- 
Lin Huang



WARNING: multiple messages have this Message-ID (diff)
From: hl@rock-chips.com (hl)
To: linux-arm-kernel@lists.infradead.org
Subject: [RFC PATCH v1 3/6] clk: rockchip: rk3399: add ddrc clock support
Date: Mon, 6 Jun 2016 11:25:27 +0800	[thread overview]
Message-ID: <5754ED27.1070402@rock-chips.com> (raw)
In-Reply-To: <13084747.Amq298iRsd@diego>

Hi Heiko,

On 2016?06?03? 20:56, Heiko St?bner wrote:
> Am Freitag, 3. Juni 2016, 17:55:16 schrieb Lin Huang:
>> add ddrc clock setting, so we can do ddr frequency
>> scaling on rk3399 platform in future.
>>
>> Signed-off-by: Lin Huang <hl@rock-chips.com>
>> ---
>> Changes in v1:
>> - remove ddrc source CLK_IGNORE_UNUSED flag, Suggestion by Doug
>> - move clk_ddrc and clk_ddrc_dpll_src to critical, Suggestion by Doug
>>
>>   drivers/clk/rockchip/clk-rk3399.c | 20 ++++++++++++++++++++
>>   1 file changed, 20 insertions(+)
>>
>> diff --git a/drivers/clk/rockchip/clk-rk3399.c
>> b/drivers/clk/rockchip/clk-rk3399.c index f1d8e44..29afb88 100644
>> --- a/drivers/clk/rockchip/clk-rk3399.c
>> +++ b/drivers/clk/rockchip/clk-rk3399.c
> [...]
>
>> @@ -1377,6 +1381,18 @@ static struct rockchip_clk_branch
>> rk3399_clk_branches[] __initdata = { COMPOSITE_NOMUX(0, "clk_test",
>> "clk_test_pre", CLK_IGNORE_UNUSED, RK3368_CLKSEL_CON(58), 0, 5, DFLAGS,
>>   			RK3368_CLKGATE_CON(13), 11, GFLAGS),
>> +
>> +	/* ddrc */
>> +	GATE(0, "clk_ddrc_lpll_src", "lpll", 0, RK3399_CLKGATE_CON(3),
>> +	     0, GFLAGS),
>> +	GATE(0, "clk_ddrc_bpll_src", "bpll", 0, RK3399_CLKGATE_CON(3),
>> +	     1, GFLAGS),
>> +	GATE(0, "clk_ddrc_dpll_src", "dpll", 0, RK3399_CLKGATE_CON(3),
>> +	     2, GFLAGS),
>> +	GATE(0, "clk_ddrc_gpll_src", "gpll", 0, RK3399_CLKGATE_CON(3),
>> +	     3, GFLAGS),
>> +	COMPOSITE_DDRC(SCLK_DDRCLK, "clk_ddrc", mux_ddrclk_p, 0,
>> +		       RK3399_CLKSEL_CON(6), 4, 2, MFLAGS, 0, 3, DFLAGS),
>>   };
> as said in the other patch, just make this a regular COMPOSITE_NOGATE with
> CLK_DIVIDER_READ_ONLY | CLK_MUX_READ_ONLY until that interface to the ATF
> exists and is approved.
>
> That way you can still read back the clock rate without anything changing the
> clock-rate, but we don't need to add duplicate code for it.
>
>
>>   static struct rockchip_clk_branch rk3399_clk_pmu_branches[] __initdata = {
>> @@ -1487,6 +1503,10 @@ static const char *const rk3399_cru_critical_clocks[]
>> __initconst = { "gpll_hclk_perilp1_src",
>>   	"gpll_aclk_perilp0_src",
>>   	"gpll_aclk_perihp_src",
>> +
>> +	/* ddrc */
>> +	"clk_ddrc_dpll_src",
> Why does your clk_ddrc_dpll_src need a separate critical entry. Any code
> changing the clk_ddrc parent should make sure the new parent is enabled. (The
> clock-framework of course does this already).
     Okay, thank you.
>
>> +	"clk_ddrc",
>>   };
>>
>>   static const char *const rk3399_pmucru_critical_clocks[] __initconst = {
>
> Heiko
>
>
>
>

-- 
Lin Huang

  reply	other threads:[~2016-06-06  3:26 UTC|newest]

Thread overview: 49+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-03  9:55 [RFC PATCH v1 0/6] rk3399 support ddr frequency scaling Lin Huang
2016-06-03  9:55 ` Lin Huang
2016-06-03  9:55 ` [RFC PATCH v1 1/6] rockchip: rockchip: add new clock-type for the ddrclk Lin Huang
2016-06-03  9:55   ` Lin Huang
2016-06-03  9:55   ` Lin Huang
2016-06-03 12:29   ` Shawn Lin
2016-06-03 12:29     ` Shawn Lin
2016-06-06  2:24     ` hl
2016-06-06  2:24       ` hl
2016-06-03 12:51   ` Heiko Stübner
2016-06-03 12:51     ` Heiko Stübner
2016-06-06  3:20     ` hl
2016-06-06  3:20       ` hl
2016-06-06  3:20     ` hl
2016-06-06  3:20       ` hl
2016-06-03  9:55 ` [RFC PATCH v1 2/6] clk: rockchip: rk3399: add SCLK_DDRCLK ID for ddrc Lin Huang
2016-06-03  9:55   ` Lin Huang
2016-06-03  9:55   ` Lin Huang
2016-06-03 12:34   ` Shawn Lin
2016-06-03 12:34     ` Shawn Lin
2016-06-03 12:36     ` Heiko Stübner
2016-06-03 12:36       ` Heiko Stübner
2016-06-03 12:47       ` Shawn Lin
2016-06-03 12:47         ` Shawn Lin
2016-06-03 13:25         ` Doug Anderson
2016-06-03 13:25           ` Doug Anderson
2016-06-03 13:25           ` Doug Anderson
2016-06-03  9:55 ` [RFC PATCH v1 3/6] clk: rockchip: rk3399: add ddrc clock support Lin Huang
2016-06-03  9:55   ` Lin Huang
2016-06-03  9:55   ` Lin Huang
2016-06-03 12:56   ` Heiko Stübner
2016-06-03 12:56     ` Heiko Stübner
2016-06-06  3:25     ` hl [this message]
2016-06-06  3:25       ` hl
2016-06-03  9:55 ` [RFC PATCH v1 4/6] PM / devfreq: event: support rockchip dfi controller Lin Huang
2016-06-03  9:55   ` Lin Huang
2016-06-03 10:26   ` Chanwoo Choi
2016-06-03 10:26     ` Chanwoo Choi
2016-06-06  3:50     ` hl
2016-06-06  3:50       ` hl
2016-06-03 16:54   ` Thierry Reding
2016-06-03 16:54     ` Thierry Reding
2016-06-03 16:54     ` Thierry Reding
2016-06-06  6:19     ` hl
2016-06-06  6:19       ` hl
2016-06-03  9:55 ` [RFC PATCH v1 5/6] PM / devfreq: rockchip: add devfreq driver for rk3399 dmc Lin Huang
2016-06-03  9:55   ` Lin Huang
2016-06-03  9:55 ` [RFC PATCH v1 6/6] drm/rockchip: Add dmc notifier in vop driver Lin Huang
2016-06-03  9:55   ` Lin Huang

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=5754ED27.1070402@rock-chips.com \
    --to=hl@rock-chips.com \
    --cc=airlied@linux.ie \
    --cc=dbasehore@chromium.org \
    --cc=dianders@chromium.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=heiko@sntech.de \
    --cc=huangtao@rock-chips.com \
    --cc=kyungmin.park@samsung.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-clk@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rockchip@lists.infradead.org \
    --cc=mark.yao@rock-chips.com \
    --cc=mturquette@baylibre.com \
    --cc=myungjoo.ham@samsung.com \
    --cc=sboyd@codeaurora.org \
    --cc=typ@rock-chips.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 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.