lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <4026123.YoLyKQfs2g@phil>
Date:	Thu, 30 Oct 2014 19:46:14 +0100
From:	Heiko Stübner <heiko@...ech.de>
To:	Kever Yang <kever.yang@...k-chips.com>
Cc:	dianders@...omium.org, sonnyrao@...omium.org,
	addy.ke@...k-chips.com, cf@...k-chips.com, xjq@...k-chips.com,
	hj@...k-chips.com, dkl@...k-chips.com, huangtao@...k-chips.com,
	linux-rockchip@...ts.infradead.org,
	Mike Turquette <mturquette@...aro.org>,
	linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2] clk: rockchip: disable unused clocks

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@...k-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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ