All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Heiko Stübner" <heiko@sntech.de>
To: Xing Zheng <zhengxing@rock-chips.com>
Cc: linux-rockchip@lists.infradead.org, huangtao@rock-chips.com,
	elaine.zhang@rock-chips.com, jay.xu@rock-chips.com,
	dianders@chromium.org,
	Michael Turquette <mturquette@baylibre.com>,
	Stephen Boyd <sboyd@codeaurora.org>,
	linux-clk@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH 4/6] clk: rockchip: rk3399: update necessary critical clocks
Date: Tue, 26 Apr 2016 00:04:20 +0200	[thread overview]
Message-ID: <2348358.BHAuXFt3mi@diego> (raw)
In-Reply-To: <1461150414-29638-5-git-send-email-zhengxing@rock-chips.com>

Am Mittwoch, 20. April 2016, 19:06:52 schrieb Xing Zheng:
> We need to declare that we enable all NOCs which are critical
> clocks always and clearly and explicitly show that we have enabled
> them at clk_summary.
> 
> We need to add some has been verified and required critical clocks
> in the development process.
> 
> And the pclk_perilp1_noc is also add CLK_IGNORE_UNUSED flag.
> 
> Signed-off-by: Xing Zheng <zhengxing@rock-chips.com>
> ---
> 
>  drivers/clk/rockchip/clk-rk3399.c |   72
> +++++++++++++++++++++++++++++++------ 1 file changed, 62 insertions(+), 10
> deletions(-)
> 
> diff --git a/drivers/clk/rockchip/clk-rk3399.c
> b/drivers/clk/rockchip/clk-rk3399.c index 232ea68..1da4fe1 100644
> --- a/drivers/clk/rockchip/clk-rk3399.c
> +++ b/drivers/clk/rockchip/clk-rk3399.c
> @@ -1043,7 +1043,7 @@ static struct rockchip_clk_branch
> rk3399_clk_branches[] __initdata = { GATE(PCLK_SPI2, "pclk_spi2",
> "pclk_perilp1", 0, RK3399_CLKGATE_CON(23), 12, GFLAGS), GATE(PCLK_SPI4,
> "pclk_spi4", "pclk_perilp1", 0, RK3399_CLKGATE_CON(23), 13, GFLAGS),
> GATE(PCLK_PERIHP_GRF, "pclk_perilp_sgrf", "pclk_perilp1", 0,
> RK3399_CLKGATE_CON(24), 13, GFLAGS), 
> -	GATE(0, "pclk_perilp1_noc",
> "pclk_perilp1", 0, RK3399_CLKGATE_CON(25), 10, GFLAGS), 
> +	GATE(0,
> "pclk_perilp1_noc", "pclk_perilp1", CLK_IGNORE_UNUSED,
> RK3399_CLKGATE_CON(25), 10, GFLAGS),

why do you think you need a CLK_IGNORE_UNUSED when you have pclk_perilp1_noc 
in the list of critical clocks below already? Aka as critical clock, it will 
stay enabled anyway.


> 
>  	/* saradc */
>  	COMPOSITE_NOMUX(SCLK_SARADC, "clk_saradc", "xin24m", 0,
> @@ -1464,33 +1464,85 @@ static struct rockchip_clk_branch
> rk3399_clk_pmu_branches[] __initdata = { };
> 
>  static const char *const rk3399_cru_critical_clocks[] __initconst = {
> -	"aclk_cci_pre",
> +	/*
> +	 * We need to declare that we enable all NOCs which are critical clocks
> +	 * always and clearly and explicitly show that we have enabled them at
> +	 * clk_summary.
> +	 */

I think that comment is not really helping here to explain the background.

Also, one thing I'd really like to know is what a NOC actually is. I know it's 
related to the interconnect, but so far I haven't found anything explaining 
the acronym.


Heiko

> +	"aclk_usb3_noc",
> +	"aclk_gmac_noc",
> +	"pclk_gmac_noc",
> +	"pclk_center_main_noc",
> +	"aclk_cci_noc0",
> +	"aclk_cci_noc1",
> +	"clk_dbg_noc",
> +	"hclk_vcodec_noc",
> +	"aclk_vcodec_noc",
> +	"hclk_vdu_noc",
> +	"aclk_vdu_noc",
> +	"hclk_iep_noc",
> +	"aclk_iep_noc",
> +	"hclk_rga_noc",
> +	"aclk_rga_noc",
> +	"aclk_center_main_noc",
> +	"aclk_center_peri_noc",
> +	"aclk_perihp_noc",
> +	"hclk_perihp_noc",
> +	"pclk_perihp_noc",
> +	"hclk_sdmmc_noc",
> +	"aclk_emmc_noc",
> +	"aclk_perilp0_noc",
> +	"hclk_perilp0_noc",
> +	"hclk_m0_perilp_noc",
> +	"hclk_perilp1_noc",
> +	"hclk_sdio_noc",
> +	"hclk_sdioaudio_noc",
> +	"pclk_perilp1_noc",
> +	"aclk_vio_noc",
> +	"aclk_hdcp_noc",
> +	"hclk_hdcp_noc",
> +	"pclk_hdcp_noc",
> +	"pclk_edp_noc",
> +	"aclk_vop0_noc",
> +	"hclk_vop0_noc",
> +	"aclk_vop1_noc",
> +	"hclk_vop1_noc",
> +	"aclk_isp0_noc",
> +	"hclk_isp0_noc",
> +	"aclk_isp1_noc",
> +	"hclk_isp1_noc",
> +	"aclk_gic_noc",
> +
> +	/* other critical clocks */
>  	"pclk_perilp0",
>  	"pclk_perilp0",
>  	"hclk_perilp0",
> -	"hclk_perilp0_noc",
>  	"pclk_perilp1",
> -	"pclk_perilp1_noc",
>  	"pclk_perihp",
> -	"pclk_perihp_noc",
>  	"hclk_perihp",
>  	"aclk_perihp",
> -	"aclk_perihp_noc",
>  	"aclk_perilp0",
> -	"aclk_perilp0_noc",
>  	"hclk_perilp1",
> -	"hclk_perilp1_noc",
> -	"aclk_dmac0_perilp",
> -	"gpll_hclk_perilp1_src",
> +	"aclk_dmac1_perilp",
>  	"gpll_aclk_perilp0_src",
>  	"gpll_aclk_perihp_src",
>  };
> 
>  static const char *const rk3399_pmucru_critical_clocks[] __initconst = {
> +	/*
> +	 * We need to declare that we enable all NOCs which are critical clocks
> +	 * always and clearly and explicitly show that we have enabled them at
> +	 * clk_summary.
> +	 */
> +	"pclk_noc_pmu",
> +	"hclk_noc_pmu",
> +
> +	/* other critical clocks */
>  	"ppll",
>  	"pclk_pmu_src",
>  	"fclk_cm0s_src_pmu",
>  	"clk_timer_src_pmu",
> +	"pclk_rkpwm_pmu",
>  };
> 
>  static void __init rk3399_clk_init(struct device_node *np)

WARNING: multiple messages have this Message-ID (diff)
From: heiko@sntech.de (Heiko Stübner)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 4/6] clk: rockchip: rk3399: update necessary critical clocks
Date: Tue, 26 Apr 2016 00:04:20 +0200	[thread overview]
Message-ID: <2348358.BHAuXFt3mi@diego> (raw)
In-Reply-To: <1461150414-29638-5-git-send-email-zhengxing@rock-chips.com>

Am Mittwoch, 20. April 2016, 19:06:52 schrieb Xing Zheng:
> We need to declare that we enable all NOCs which are critical
> clocks always and clearly and explicitly show that we have enabled
> them at clk_summary.
> 
> We need to add some has been verified and required critical clocks
> in the development process.
> 
> And the pclk_perilp1_noc is also add CLK_IGNORE_UNUSED flag.
> 
> Signed-off-by: Xing Zheng <zhengxing@rock-chips.com>
> ---
> 
>  drivers/clk/rockchip/clk-rk3399.c |   72
> +++++++++++++++++++++++++++++++------ 1 file changed, 62 insertions(+), 10
> deletions(-)
> 
> diff --git a/drivers/clk/rockchip/clk-rk3399.c
> b/drivers/clk/rockchip/clk-rk3399.c index 232ea68..1da4fe1 100644
> --- a/drivers/clk/rockchip/clk-rk3399.c
> +++ b/drivers/clk/rockchip/clk-rk3399.c
> @@ -1043,7 +1043,7 @@ static struct rockchip_clk_branch
> rk3399_clk_branches[] __initdata = { GATE(PCLK_SPI2, "pclk_spi2",
> "pclk_perilp1", 0, RK3399_CLKGATE_CON(23), 12, GFLAGS), GATE(PCLK_SPI4,
> "pclk_spi4", "pclk_perilp1", 0, RK3399_CLKGATE_CON(23), 13, GFLAGS),
> GATE(PCLK_PERIHP_GRF, "pclk_perilp_sgrf", "pclk_perilp1", 0,
> RK3399_CLKGATE_CON(24), 13, GFLAGS), 
> -	GATE(0, "pclk_perilp1_noc",
> "pclk_perilp1", 0, RK3399_CLKGATE_CON(25), 10, GFLAGS), 
> +	GATE(0,
> "pclk_perilp1_noc", "pclk_perilp1", CLK_IGNORE_UNUSED,
> RK3399_CLKGATE_CON(25), 10, GFLAGS),

why do you think you need a CLK_IGNORE_UNUSED when you have pclk_perilp1_noc 
in the list of critical clocks below already? Aka as critical clock, it will 
stay enabled anyway.


> 
>  	/* saradc */
>  	COMPOSITE_NOMUX(SCLK_SARADC, "clk_saradc", "xin24m", 0,
> @@ -1464,33 +1464,85 @@ static struct rockchip_clk_branch
> rk3399_clk_pmu_branches[] __initdata = { };
> 
>  static const char *const rk3399_cru_critical_clocks[] __initconst = {
> -	"aclk_cci_pre",
> +	/*
> +	 * We need to declare that we enable all NOCs which are critical clocks
> +	 * always and clearly and explicitly show that we have enabled them at
> +	 * clk_summary.
> +	 */

I think that comment is not really helping here to explain the background.

Also, one thing I'd really like to know is what a NOC actually is. I know it's 
related to the interconnect, but so far I haven't found anything explaining 
the acronym.


Heiko

> +	"aclk_usb3_noc",
> +	"aclk_gmac_noc",
> +	"pclk_gmac_noc",
> +	"pclk_center_main_noc",
> +	"aclk_cci_noc0",
> +	"aclk_cci_noc1",
> +	"clk_dbg_noc",
> +	"hclk_vcodec_noc",
> +	"aclk_vcodec_noc",
> +	"hclk_vdu_noc",
> +	"aclk_vdu_noc",
> +	"hclk_iep_noc",
> +	"aclk_iep_noc",
> +	"hclk_rga_noc",
> +	"aclk_rga_noc",
> +	"aclk_center_main_noc",
> +	"aclk_center_peri_noc",
> +	"aclk_perihp_noc",
> +	"hclk_perihp_noc",
> +	"pclk_perihp_noc",
> +	"hclk_sdmmc_noc",
> +	"aclk_emmc_noc",
> +	"aclk_perilp0_noc",
> +	"hclk_perilp0_noc",
> +	"hclk_m0_perilp_noc",
> +	"hclk_perilp1_noc",
> +	"hclk_sdio_noc",
> +	"hclk_sdioaudio_noc",
> +	"pclk_perilp1_noc",
> +	"aclk_vio_noc",
> +	"aclk_hdcp_noc",
> +	"hclk_hdcp_noc",
> +	"pclk_hdcp_noc",
> +	"pclk_edp_noc",
> +	"aclk_vop0_noc",
> +	"hclk_vop0_noc",
> +	"aclk_vop1_noc",
> +	"hclk_vop1_noc",
> +	"aclk_isp0_noc",
> +	"hclk_isp0_noc",
> +	"aclk_isp1_noc",
> +	"hclk_isp1_noc",
> +	"aclk_gic_noc",
> +
> +	/* other critical clocks */
>  	"pclk_perilp0",
>  	"pclk_perilp0",
>  	"hclk_perilp0",
> -	"hclk_perilp0_noc",
>  	"pclk_perilp1",
> -	"pclk_perilp1_noc",
>  	"pclk_perihp",
> -	"pclk_perihp_noc",
>  	"hclk_perihp",
>  	"aclk_perihp",
> -	"aclk_perihp_noc",
>  	"aclk_perilp0",
> -	"aclk_perilp0_noc",
>  	"hclk_perilp1",
> -	"hclk_perilp1_noc",
> -	"aclk_dmac0_perilp",
> -	"gpll_hclk_perilp1_src",
> +	"aclk_dmac1_perilp",
>  	"gpll_aclk_perilp0_src",
>  	"gpll_aclk_perihp_src",
>  };
> 
>  static const char *const rk3399_pmucru_critical_clocks[] __initconst = {
> +	/*
> +	 * We need to declare that we enable all NOCs which are critical clocks
> +	 * always and clearly and explicitly show that we have enabled them at
> +	 * clk_summary.
> +	 */
> +	"pclk_noc_pmu",
> +	"hclk_noc_pmu",
> +
> +	/* other critical clocks */
>  	"ppll",
>  	"pclk_pmu_src",
>  	"fclk_cm0s_src_pmu",
>  	"clk_timer_src_pmu",
> +	"pclk_rkpwm_pmu",
>  };
> 
>  static void __init rk3399_clk_init(struct device_node *np)

  reply	other threads:[~2016-04-25 22:04 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-20 11:06 [PATCH 0/6] Fix the clock controller driver for the RK3399 Xing Zheng
2016-04-20 11:06 ` Xing Zheng
2016-04-20 11:06 ` [PATCH 1/6] clk: rockchip: rk3399: export some necessary clock IDs Xing Zheng
2016-04-20 11:06   ` Xing Zheng
2016-04-25 21:12   ` Heiko Stübner
2016-04-25 21:12     ` Heiko Stübner
2016-04-25 21:12     ` Heiko Stübner
2016-04-20 11:06 ` [PATCH 2/6] clk: rockchip: rk3399: add some frequencies on the PLL table Xing Zheng
2016-04-20 11:06   ` Xing Zheng
2016-04-20 11:06   ` Xing Zheng
2016-04-25 21:02   ` Heiko Stübner
2016-04-25 21:02     ` Heiko Stübner
2016-04-20 11:06 ` [PATCH 3/6] clk: rockchip: rk3399: drop unnecessary CLK_IGNORE_UNUSED flags Xing Zheng
2016-04-20 11:06   ` Xing Zheng
2016-04-20 11:06   ` Xing Zheng
2016-04-25 21:02   ` Heiko Stübner
2016-04-25 21:02     ` Heiko Stübner
2016-04-20 11:06 ` [PATCH 4/6] clk: rockchip: rk3399: update necessary critical clocks Xing Zheng
2016-04-20 11:06   ` Xing Zheng
2016-04-20 11:06   ` Xing Zheng
2016-04-25 22:04   ` Heiko Stübner [this message]
2016-04-25 22:04     ` Heiko Stübner
2016-04-20 11:11 ` [PATCH 5/6] clk: rockchip: rk3399: fix the cifout clock Xing Zheng
2016-04-20 11:11   ` Xing Zheng
2016-04-25 21:02   ` Heiko Stübner
2016-04-25 21:02     ` Heiko Stübner
2016-04-25 21:02     ` Heiko Stübner
2016-04-20 11:12 ` [PATCH 6/6] clk: rockchip: rk3399: fix the gate bit for i2c4 and i2c8 Xing Zheng
2016-04-20 11:12   ` Xing Zheng
2016-04-25 21:03   ` Heiko Stübner
2016-04-25 21:03     ` Heiko Stübner
2016-04-25 21:03     ` Heiko Stübner

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=2348358.BHAuXFt3mi@diego \
    --to=heiko@sntech.de \
    --cc=dianders@chromium.org \
    --cc=elaine.zhang@rock-chips.com \
    --cc=huangtao@rock-chips.com \
    --cc=jay.xu@rock-chips.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=mturquette@baylibre.com \
    --cc=sboyd@codeaurora.org \
    --cc=zhengxing@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.