mbox series

[v5,resend,0/4] drivers: clk: renesas: ignore all clocks which are assigned to non-Linux system

Message ID 87edeqgfbu.wl-kuninori.morimoto.gx@renesas.com (mailing list archive)
Headers show
Series drivers: clk: renesas: ignore all clocks which are assigned to non-Linux system | expand

Message

Kuninori Morimoto Jan. 10, 2024, 1:14 a.m. UTC
Hi Rob, Geert
Cc Aymeric, Goda-san

This is v5 resend of ignoring non Linux system assinged device.

Some board might use Linux and another OS in the same time. In such
case, current Linux will stop necessary module clock when booting
which is not used on Linux side, but is used on another OS side.

To avoid such situation, this patch-set try to find status = "reserved"
devices, and add CLK_IGNORE_UNUSED flag to its clock.

Table 2.4: Values for status property
https://github.com/devicetree-org/devicetree-specification/releases/download/v0.4/devicetree-specification-v0.4.pdf

"reserved"
	Indicates that the device is operational, but should not be
	used. Typically this is used for devices that are controlled
	by another software component, such as platform firmware.

[1/4] - [3/4] : expand existing function for "reserved"
[4/4]         : adjust to "reserved" device on Renesas CPG

v5 resend
	- add Acked-by from Rob

v4 -> v5
	- typo fix s/assinged/assigned/
	- separate error check on cpg_mssr_reserved_init()
	- care it.node on cpg_mssr_reserved_init() error
	- care of_clk_del_provider()
	- rename label "reserve_err" -> "reserve_exit"

v3 -> v4
	- add Reviewed-by from Geert
	- Tidyup many English
	- use of_for_each_phandle() instead of while(!of_parse_phandle_with_args())
	- move cpg_mssr_reserved_init() into cpg_mssr_common_init()

v2 -> v3
	- "__of_get_next_status_child()" -> "of_get_next_status_child()"
	- add Reviewed-by from Rob

v1 -> v2
	- remove "default_ret" from __of_device_is_status()
	- add new parameter explanation on cpg_mssr_priv

Kuninori Morimoto (4):
  of: add __of_device_is_status() and makes more generic status check
  of: add of_get_next_status_child() and makes more generic of_get_next
  of: add for_each_reserved_child_of_node()
  drivers: clk: renesas: ignore all clocks which are assigned to non-Linux system

 drivers/clk/renesas/renesas-cpg-mssr.c | 111 +++++++++++++++++++++++--
 drivers/of/base.c                      | 111 ++++++++++++++++++-------
 include/linux/of.h                     |  11 +++
 3 files changed, 196 insertions(+), 37 deletions(-)

Comments

Geert Uytterhoeven Jan. 12, 2024, 2:21 p.m. UTC | #1
Hi Morimoto-san, Rob,

On Wed, Jan 10, 2024 at 2:14 AM Kuninori Morimoto
<kuninori.morimoto.gx@renesas.com> wrote:
> This is v5 resend of ignoring non Linux system assinged device.

Thanks for the update!

> v5 resend
>         - add Acked-by from Rob

You mean Reviewed-by?
With an Acked-by, I wouldn't have to ask the next question ;-)

Rob: How to proceed:
  1. I give my Acked-by, you merge the series?
  2. You give your Acked-by, I merge the series?
  3. We do the immutable branch dance?
       a. You apply 1-3 to an immutable branch
       b. I merge the immutable branch and apply 4.

You get to choose, as there are more DT than renesas-clk patches ;-)

Thanks!

Gr{oetje,eeting}s,

                        Geert
Rob Herring (Arm) Jan. 22, 2024, 4:04 p.m. UTC | #2
On Fri, Jan 12, 2024 at 03:21:41PM +0100, Geert Uytterhoeven wrote:
> Hi Morimoto-san, Rob,
> 
> On Wed, Jan 10, 2024 at 2:14 AM Kuninori Morimoto
> <kuninori.morimoto.gx@renesas.com> wrote:
> > This is v5 resend of ignoring non Linux system assinged device.
> 
> Thanks for the update!
> 
> > v5 resend
> >         - add Acked-by from Rob
> 
> You mean Reviewed-by?
> With an Acked-by, I wouldn't have to ask the next question ;-)
> 
> Rob: How to proceed:
>   1. I give my Acked-by, you merge the series?
>   2. You give your Acked-by, I merge the series?
>   3. We do the immutable branch dance?
>        a. You apply 1-3 to an immutable branch
>        b. I merge the immutable branch and apply 4.
> 
> You get to choose, as there are more DT than renesas-clk patches ;-)

You can take it. I don't give Reviewed-by nor Acked-by if I plan to 
apply it.

Rob