linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: heiko@sntech.de (Heiko Stübner)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v2] clk: rockchip: disable unused clocks
Date: Thu, 30 Oct 2014 19:46:14 +0100	[thread overview]
Message-ID: <4026123.YoLyKQfs2g@phil> (raw)
In-Reply-To: <1414676335-20203-1-git-send-email-kever.yang@rock-chips.com>

Hi Kever,

Am Donnerstag, 30. Oktober 2014, 21:38:55 schrieb Kever Yang:
> The rockchip clock driver use CLK_IGNORE_UNUSED flag to make sure
> all the clocks are available like default power on state.
> We have implement the clock manage in most of rockchip drivers,
> it is time to remove it for power save.
> Instead we add CLK_IGNORE_UNUSED for some clock nodes which should
> be on during boot or no module driver in kernel will initialize it.
> 
> Signed-off-by: Kever Yang <kever.yang@rock-chips.com>

I've tested this on all 3 currently supported Rockchip socs and was able to 
boot to an initramfs on all of them.

[...]

> diff --git a/drivers/clk/rockchip/clk-rk3288.c
> b/drivers/clk/rockchip/clk-rk3288.c index 279a662..cf9d8b0 100644
> --- a/drivers/clk/rockchip/clk-rk3288.c
> +++ b/drivers/clk/rockchip/clk-rk3288.c

[...]

> -	COMPOSITE_NOMUX(0, "armcore0", "armclk", 0,
> -			RK3288_CLKSEL_CON(36), 0, 3, DFLAGS | CLK_DIVIDER_READ_ONLY,
> +	COMPOSITE_NOMUX(0, "armcore0", "armclk", CLK_IGNORE_UNUSED,
> +			RK3288_CLKSEL_CON(36), 0, 3, DFLAGS,
>  			RK3288_CLKGATE_CON(12), 0, GFLAGS),
> -	COMPOSITE_NOMUX(0, "armcore1", "armclk", 0,
> -			RK3288_CLKSEL_CON(36), 4, 3, DFLAGS | CLK_DIVIDER_READ_ONLY,
> +	COMPOSITE_NOMUX(0, "armcore1", "armclk", CLK_IGNORE_UNUSED,
> +			RK3288_CLKSEL_CON(36), 4, 3, DFLAGS,
>  			RK3288_CLKGATE_CON(12), 1, GFLAGS),
> -	COMPOSITE_NOMUX(0, "armcore2", "armclk", 0,
> -			RK3288_CLKSEL_CON(36), 8, 3, DFLAGS | CLK_DIVIDER_READ_ONLY,
> +	COMPOSITE_NOMUX(0, "armcore2", "armclk", CLK_IGNORE_UNUSED,
> +			RK3288_CLKSEL_CON(36), 8, 3, DFLAGS,
>  			RK3288_CLKGATE_CON(12), 2, GFLAGS),
> -	COMPOSITE_NOMUX(0, "armcore3", "armclk", 0,
> -			RK3288_CLKSEL_CON(36), 12, 3, DFLAGS | CLK_DIVIDER_READ_ONLY,
> +	COMPOSITE_NOMUX(0, "armcore3", "armclk", CLK_IGNORE_UNUSED,
> +			RK3288_CLKSEL_CON(36), 12, 3, DFLAGS,
>  			RK3288_CLKGATE_CON(12), 3, GFLAGS),
> -	COMPOSITE_NOMUX(0, "l2ram", "armclk", 0,
> -			RK3288_CLKSEL_CON(37), 0, 3, DFLAGS | CLK_DIVIDER_READ_ONLY,
> +	COMPOSITE_NOMUX(0, "l2ram", "armclk", CLK_IGNORE_UNUSED,
> +			RK3288_CLKSEL_CON(37), 0, 3, DFLAGS,
>  			RK3288_CLKGATE_CON(12), 4, GFLAGS),
> -	COMPOSITE_NOMUX(0, "aclk_core_m0", "armclk", 0,
> -			RK3288_CLKSEL_CON(0), 0, 4, DFLAGS | CLK_DIVIDER_READ_ONLY,
> +	COMPOSITE_NOMUX(0, "aclk_core_m0", "armclk", CLK_IGNORE_UNUSED,
> +			RK3288_CLKSEL_CON(0), 0, 4, DFLAGS,
>  			RK3288_CLKGATE_CON(12), 5, GFLAGS),
> -	COMPOSITE_NOMUX(0, "aclk_core_mp", "armclk", 0,
> -			RK3288_CLKSEL_CON(0), 4, 4, DFLAGS | CLK_DIVIDER_READ_ONLY,
> +	COMPOSITE_NOMUX(0, "aclk_core_mp", "armclk", CLK_IGNORE_UNUSED,
> +			RK3288_CLKSEL_CON(0), 4, 4, DFLAGS,
>  			RK3288_CLKGATE_CON(12), 6, GFLAGS),
>  	COMPOSITE_NOMUX(0, "atclk", "armclk", 0,
>  			RK3288_CLKSEL_CON(37), 4, 5, DFLAGS | CLK_DIVIDER_READ_ONLY,

For these clocks you're removing the READ_ONLY dvider-flags. If this is 
necessary for something it should be a separate patch.
In this change it is nevertheless unrelated.


Heiko

  reply	other threads:[~2014-10-30 18:46 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-10-30 13:38 [PATCH v2] clk: rockchip: disable unused clocks Kever Yang
2014-10-30 18:46 ` Heiko Stübner [this message]
2014-10-30 20:28 ` Doug Anderson
2014-10-31  0:07 ` Doug Anderson

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=4026123.YoLyKQfs2g@phil \
    --to=heiko@sntech.de \
    --cc=linux-arm-kernel@lists.infradead.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).