All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tushar Behera <tushar.behera@linaro.org>
To: Tomasz Figa <tomasz.figa@gmail.com>
Cc: linux-kernel@vger.kernel.org, linux-samsung-soc@vger.kernel.org,
	mturquette@linaro.org, kgene.kim@samsung.com, patches@linaro.org,
	swarren@wwwdotorg.org, grant.likely@linaro.org,
	rob.herring@calxeda.com, devicetree-discuss@lists.ozlabs.org,
	broonie@kernel.org, l.majewski@samsung.com,
	s.nawrocki@samsung.com
Subject: Re: [PATCH 2/2] clk: exynos4: Add alias for cpufreq related clocks
Date: Mon, 10 Jun 2013 09:13:11 +0530	[thread overview]
Message-ID: <51B54B4F.3000503@linaro.org> (raw)
In-Reply-To: <2070978.AjQD2isvSl@flatron>

On 06/08/2013 05:20 PM, Tomasz Figa wrote:
> On Thursday 06 of June 2013 16:52:28 Tushar Behera wrote:
>> cpufreq driver for EXYNOS4 based SoCs are not platform drivers, hence
>> we cannot currently pass the clock names through a device tree node.
>> Instead, we need to make them available through a global alias.
>>
>> 'armclk', 'moutcore', 'mout_mpll' and 'mout_apll' clock aliases are
>> defined.
>>
>> Signed-off-by: Tushar Behera <tushar.behera@linaro.org>
>> ---
>>  drivers/clk/samsung/clk-exynos4.c |   10 +++++-----
>>  1 file changed, 5 insertions(+), 5 deletions(-)
>>
>> diff --git a/drivers/clk/samsung/clk-exynos4.c
>> b/drivers/clk/samsung/clk-exynos4.c index 3c1f888..1e4258a 100644
>> --- a/drivers/clk/samsung/clk-exynos4.c
>> +++ b/drivers/clk/samsung/clk-exynos4.c
>> @@ -356,8 +356,8 @@ struct samsung_fixed_rate_clock
>> exynos4210_fixed_rate_clks[] __initdata = {
>>
>>  /* list of mux clocks supported in all exynos4 soc's */
>>  struct samsung_mux_clock exynos4_mux_clks[] __initdata = {
>> -	MUX_F(mout_apll, "mout_apll", mout_apll_p, SRC_CPU, 0, 1,
>> -			CLK_SET_RATE_PARENT, 0),
>> +	MUX_FA(mout_apll, "mout_apll", mout_apll_p, SRC_CPU, 0, 1,
>> +			CLK_SET_RATE_PARENT, 0, "mout_apll"),
>>  	MUX(none, "mout_hdmi", mout_hdmi_p, SRC_TV, 0, 1),
>>  	MUX(none, "mout_mfc1", sclk_evpll_p, SRC_MFC, 4, 1),
>>  	MUX(none, "mout_mfc", mout_mfc_p, SRC_MFC, 8, 1),
>> @@ -385,9 +385,9 @@ struct samsung_mux_clock exynos4210_mux_clks[]
>> __initdata = { MUX(none, "mout_g2d", mout_g2d_p, E4210_SRC_IMAGE, 8,
>> 1),
>>  	MUX(none, "mout_fimd1", group1_p4210, E4210_SRC_LCD1, 0, 4),
>>  	MUX(none, "mout_mipi1", group1_p4210, E4210_SRC_LCD1, 12, 4),
>> -	MUX_A(sclk_mpll, "sclk_mpll", mout_mpll_p, SRC_CPU, 8, 1, 
> "sclk_mpll"),
>> +	MUX_A(sclk_mpll, "sclk_mpll", mout_mpll_p, SRC_CPU, 8, 1, 
> "mout_mpll"),
> 
> This is not fully compliant with patch description. I'm not sure if there 
> weren't any users of the sclk_mpll alias.
> 

As of now, there are no other users of sclk_mpll other than a debug
print within the same file.

>>  	MUX_A(mout_core, "mout_core", mout_core_p4210,
>> -			SRC_CPU, 16, 1, "mout_core"),
>> +			SRC_CPU, 16, 1, "moutcore"),
> 
> IMHO those typo corrections are not part of this patch.
> 

But the older drivers (before migration to CCF) were using the clock
"moutcore" (not "mout_core").

>>  	MUX_A(sclk_vpll, "sclk_vpll", sclk_vpll_p4210,
>>  			SRC_TOP0, 8, 1, "sclk_vpll"),
>>  	MUX(mout_fimc0, "mout_fimc0", group1_p4210, SRC_CAM, 0, 4),
>> @@ -534,7 +534,7 @@ struct samsung_div_clock exynos4_div_clks[]
>> __initdata = { DIV(none, "div_spi_pre2", "div_spi2", DIV_PERIL2, 8, 8),
>>  	DIV(none, "div_audio1", "mout_audio1", DIV_PERIL4, 0, 4),
>>  	DIV(none, "div_audio2", "mout_audio2", DIV_PERIL4, 16, 4),
>> -	DIV_A(arm_clk, "arm_clk", "div_core2", DIV_CPU0, 28, 3, 
> "arm_clk"),
>> +	DIV_A(arm_clk, "arm_clk", "div_core2", DIV_CPU0, 28, 3, "armclk"),
> 
> Same here.
> 

Same as above, "armclk" is used elsewhere, not "arm_clk".

>>  	DIV_A(sclk_apll, "sclk_apll", "mout_apll",
>>  			DIV_CPU0, 24, 3, "sclk_apll"),
>>  	DIV_F(none, "div_mipi_pre0", "div_mipi0", DIV_LCD0, 20, 4,
> 
> Basically I don't like the idea of those global aliases, which IMHO should 
> be completely dropped. Someone might not like it, but I'd go with the 
> conversion of our cpufreq drivers to platform drivers instead, which could 
> receive things like clocks and regulators using DT-based lookups.
> 

I agree. Migration of exynos-cpufreq driver as a platform driver is the
best solution. But unless someone picks up that work, cpufreq support
for EXYNOS4 based systems is broken because of the incorrect clock aliases.

> This is especially important in case of regulators, which currently have 
> to be hacked by using vdd_arm as regulator name in device tree.
> 

Agree.

> CCing people that might be interested in this topic.
> 
> Best regards,
> Tomasz
> 

Thanks.

-- 
Tushar Behera

  reply	other threads:[~2013-06-10  3:43 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-06 11:22 [PATCH 0/2] Clock update for EXYNOS4210-CPUFREQ driver Tushar Behera
2013-06-06 11:22 ` [PATCH 1/2] clk: samsung: Add MUX_FA macro to pass flag and alias Tushar Behera
2013-06-06 11:22 ` [PATCH 2/2] clk: exynos4: Add alias for cpufreq related clocks Tushar Behera
2013-06-08 11:50   ` Tomasz Figa
2013-06-10  3:43     ` Tushar Behera [this message]
2013-06-10 18:53       ` Tomasz Figa
2013-06-17  4:50         ` Tushar Behera
2013-06-17  4:50           ` Tushar Behera
2013-06-19  4:50           ` Tushar Behera
2013-06-19  7:43             ` Tomasz Figa

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=51B54B4F.3000503@linaro.org \
    --to=tushar.behera@linaro.org \
    --cc=broonie@kernel.org \
    --cc=devicetree-discuss@lists.ozlabs.org \
    --cc=grant.likely@linaro.org \
    --cc=kgene.kim@samsung.com \
    --cc=l.majewski@samsung.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-samsung-soc@vger.kernel.org \
    --cc=mturquette@linaro.org \
    --cc=patches@linaro.org \
    --cc=rob.herring@calxeda.com \
    --cc=s.nawrocki@samsung.com \
    --cc=swarren@wwwdotorg.org \
    --cc=tomasz.figa@gmail.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.