linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Anson Huang <anson.huang@nxp.com>
To: "shawnguo@kernel.org" <shawnguo@kernel.org>,
	"kernel@pengutronix.de" <kernel@pengutronix.de>,
	Fabio Estevam <fabio.estevam@nxp.com>,
	"mturquette@baylibre.com" <mturquette@baylibre.com>,
	"sboyd@kernel.org" <sboyd@kernel.org>
Cc: dl-linux-imx <linux-imx@nxp.com>,
	"linux-arm-kernel@lists.infradead.org" 
	<linux-arm-kernel@lists.infradead.org>,
	"linux-clk@vger.kernel.org" <linux-clk@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: RE: [PATCH 4/4] clk: imx6ul: remove clks_init_on array
Date: Mon, 25 Jun 2018 03:15:28 +0000	[thread overview]
Message-ID: <AM3PR04MB1315492102B943B04FBC4617F54A0@AM3PR04MB1315.eurprd04.prod.outlook.com> (raw)
In-Reply-To: <1527994847-2363-4-git-send-email-Anson.Huang@nxp.com>

Gentle Ping...

Anson Huang
Best Regards!


> -----Original Message-----
> From: Anson Huang
> Sent: Sunday, June 3, 2018 11:01 AM
> To: shawnguo@kernel.org; kernel@pengutronix.de; Fabio Estevam
> <fabio.estevam@nxp.com>; mturquette@baylibre.com; sboyd@kernel.org
> Cc: dl-linux-imx <linux-imx@nxp.com>; linux-arm-kernel@lists.infradead.org;
> linux-clk@vger.kernel.org; linux-kernel@vger.kernel.org
> Subject: [PATCH 4/4] clk: imx6ul: remove clks_init_on array
> 
> Clock framework will enable those clocks registered with CLK_IS_CRITICAL flag,
> so no need to have clks_init_on array during clock initialization now.
> 
> Signed-off-by: Anson Huang <Anson.Huang@nxp.com>
> ---
> 	This patch is based on "[V2,1/2] clk: imx6ul: add GPIO clock gates".
>  drivers/clk/imx/clk-imx6ul.c | 23 ++++++-----------------
>  1 file changed, 6 insertions(+), 17 deletions(-)
> 
> diff --git a/drivers/clk/imx/clk-imx6ul.c b/drivers/clk/imx/clk-imx6ul.c index
> 3ea2d97..d3f7f4d 100644
> --- a/drivers/clk/imx/clk-imx6ul.c
> +++ b/drivers/clk/imx/clk-imx6ul.c
> @@ -79,12 +79,6 @@ static const char *cko_sels[] = { "cko1", "cko2", };
> static struct clk *clks[IMX6UL_CLK_END];  static struct clk_onecell_data
> clk_data;
> 
> -static int const clks_init_on[] __initconst = {
> -	IMX6UL_CLK_AIPSTZ1, IMX6UL_CLK_AIPSTZ2,
> -	IMX6UL_CLK_AXI, IMX6UL_CLK_ARM, IMX6UL_CLK_ROM,
> -	IMX6UL_CLK_MMDC_P0_FAST, IMX6UL_CLK_MMDC_P0_IPG,
> -};
> -
>  static const struct clk_div_table clk_enet_ref_table[] = {
>  	{ .val = 0, .div = 20, },
>  	{ .val = 1, .div = 10, },
> @@ -129,7 +123,6 @@ static void __init imx6ul_clocks_init(struct
> device_node *ccm_node)  {
>  	struct device_node *np;
>  	void __iomem *base;
> -	int i;
> 
>  	clks[IMX6UL_CLK_DUMMY] = imx_clk_fixed("dummy", 0);
> 
> @@ -336,8 +329,8 @@ static void __init imx6ul_clocks_init(struct
> device_node *ccm_node)
>  	clks[IMX6UL_CLK_AHB]		= imx_clk_busy_divider("ahb",
> "periph",	base +  0x14, 10, 3,  base + 0x48, 1);
> 
>  	/* CCGR0 */
> -	clks[IMX6UL_CLK_AIPSTZ1]	= imx_clk_gate2("aips_tz1",	"ahb",
> 	base + 0x68,	0);
> -	clks[IMX6UL_CLK_AIPSTZ2]	= imx_clk_gate2("aips_tz2",	"ahb",
> 	base + 0x68,	2);
> +	clks[IMX6UL_CLK_AIPSTZ1]	= imx_clk_gate2_flags("aips_tz1", "ahb",
> base + 0x68, 0, CLK_IS_CRITICAL);
> +	clks[IMX6UL_CLK_AIPSTZ2]	= imx_clk_gate2_flags("aips_tz2", "ahb",
> base + 0x68, 2, CLK_IS_CRITICAL);
>  	clks[IMX6UL_CLK_APBHDMA]	= imx_clk_gate2("apbh_dma",
> 	"bch_podf",	base + 0x68,	4);
>  	clks[IMX6UL_CLK_ASRC_IPG]	= imx_clk_gate2_shared("asrc_ipg",
> 	"ahb",	base + 0x68,	6, &share_count_asrc);
>  	clks[IMX6UL_CLK_ASRC_MEM]	= imx_clk_gate2_shared("asrc_mem",
> 	"ahb",	base + 0x68,	6, &share_count_asrc);
> @@ -412,9 +405,9 @@ static void __init imx6ul_clocks_init(struct
> device_node *ccm_node)
>  	clks[IMX6UL_CLK_GPIO4]		= imx_clk_gate2("gpio4",	"ipg",
> 	base + 0x74,	12);
>  	clks[IMX6UL_CLK_QSPI]		= imx_clk_gate2("qspi1",	"qspi1_podf",
> 	base + 0x74,	14);
>  	clks[IMX6UL_CLK_WDOG1]		= imx_clk_gate2("wdog1",	"ipg",
> 	base + 0x74,	16);
> -	clks[IMX6UL_CLK_MMDC_P0_FAST]	= imx_clk_gate("mmdc_p0_fast",
> "mmdc_podf", base + 0x74,	20);
> -	clks[IMX6UL_CLK_MMDC_P0_IPG]	= imx_clk_gate2("mmdc_p0_ipg",
> 	"ipg",		base + 0x74,	24);
> -	clks[IMX6UL_CLK_AXI]		= imx_clk_gate("axi",	"axi_podf",	base
> + 0x74,	28);
> +	clks[IMX6UL_CLK_MMDC_P0_FAST]	=
> imx_clk_gate_flags("mmdc_p0_fast", "mmdc_podf", base + 0x74,	20,
> CLK_IS_CRITICAL);
> +	clks[IMX6UL_CLK_MMDC_P0_IPG]	=
> imx_clk_gate2_flags("mmdc_p0_ipg",	"ipg",		base + 0x74,	24,
> CLK_IS_CRITICAL);
> +	clks[IMX6UL_CLK_AXI]		= imx_clk_gate_flags("axi",	"axi_podf",
> 	base + 0x74,	28, CLK_IS_CRITICAL);
> 
>  	/* CCGR4 */
>  	clks[IMX6UL_CLK_PER_BCH]	= imx_clk_gate2("per_bch",	"bch_podf",
> 	base + 0x78,	12);
> @@ -428,7 +421,7 @@ static void __init imx6ul_clocks_init(struct
> device_node *ccm_node)
>  	clks[IMX6UL_CLK_GPMI_APB]	= imx_clk_gate2("gpmi_apb",
> 	"bch_podf",	base + 0x78,	30);
> 
>  	/* CCGR5 */
> -	clks[IMX6UL_CLK_ROM]		= imx_clk_gate2("rom",		"ahb",
> 	base + 0x7c,	0);
> +	clks[IMX6UL_CLK_ROM]		= imx_clk_gate2_flags("rom",	"ahb",
> 	base + 0x7c,	0,	CLK_IS_CRITICAL);
>  	clks[IMX6UL_CLK_SDMA]		= imx_clk_gate2("sdma",
> 	"ahb",		base + 0x7c,	6);
>  	clks[IMX6UL_CLK_KPP]		= imx_clk_gate2("kpp",		"ipg",
> 	base + 0x7c,	8);
>  	clks[IMX6UL_CLK_WDOG2]		= imx_clk_gate2("wdog2",	"ipg",
> 	base + 0x7c,	10);
> @@ -502,10 +495,6 @@ static void __init imx6ul_clocks_init(struct
> device_node *ccm_node)
>  	clk_set_rate(clks[IMX6UL_CLK_ENET2_REF], 50000000);
>  	clk_set_rate(clks[IMX6UL_CLK_CSI], 24000000);
> 
> -	/* keep all the clks on just for bringup */
> -	for (i = 0; i < ARRAY_SIZE(clks_init_on); i++)
> -		clk_prepare_enable(clks[clks_init_on[i]]);
> -
>  	if (clk_on_imx6ull())
>  		clk_prepare_enable(clks[IMX6UL_CLK_AIPSTZ3]);
> 
> --
> 2.7.4


  reply	other threads:[~2018-06-25  3:15 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-06-03  3:00 [PATCH 1/4] clk: imx6q: remove clks_init_on array Anson Huang
2018-06-03  3:00 ` [PATCH 2/4] clk: imx6sl: " Anson Huang
2018-06-03 12:17   ` Fabio Estevam
2018-06-03 12:45     ` Anson Huang
2018-06-03  3:00 ` [PATCH 3/4] clk: imx6sx: " Anson Huang
2018-06-03 12:52   ` Fabio Estevam
2018-06-03  3:00 ` [PATCH 4/4] clk: imx6ul: " Anson Huang
2018-06-25  3:15   ` Anson Huang [this message]
2018-06-03 12:44 ` [PATCH 1/4] clk: imx6q: " Fabio Estevam
2018-06-03 12:48   ` Anson Huang
2018-06-03 12:54     ` Fabio Estevam
2018-06-04  1:11       ` Anson 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=AM3PR04MB1315492102B943B04FBC4617F54A0@AM3PR04MB1315.eurprd04.prod.outlook.com \
    --to=anson.huang@nxp.com \
    --cc=fabio.estevam@nxp.com \
    --cc=kernel@pengutronix.de \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-clk@vger.kernel.org \
    --cc=linux-imx@nxp.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mturquette@baylibre.com \
    --cc=sboyd@kernel.org \
    --cc=shawnguo@kernel.org \
    /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).