u-boot.lists.denx.de archive mirror
 help / color / mirror / Atom feed
* [PATCH] clk: stm32mp1: remove error for disabled clock in stm32mp1_clk_get_parent
@ 2023-06-23 13:05 Patrick Delaunay
  2023-08-04 15:51 ` Patrice CHOTARD
  2023-08-16 13:23 ` Patrice CHOTARD
  0 siblings, 2 replies; 3+ messages in thread
From: Patrick Delaunay @ 2023-06-23 13:05 UTC (permalink / raw)
  To: u-boot
  Cc: Patrick Delaunay, Lukasz Majewski, Patrice Chotard,
	Sean Anderson, U-Boot STM32

To disabled a clock in clock tree initialization for a mux of STM32MP15,
the selected clock source index is set with the latest possible index for
the number of bit used. Today this valid configuration cause a error
in U-Boot messages, for example with CLK_ETH_DISABLED, when this clock
is not needed for the used ETH PHY without crystal:

   no parents defined for clk id 123

This patch change the level of this message to avoid this trace for
valid clock tree.

Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
---

 drivers/clk/stm32/clk-stm32mp1.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/clk/stm32/clk-stm32mp1.c b/drivers/clk/stm32/clk-stm32mp1.c
index 4f4524fcb2c6..615028769495 100644
--- a/drivers/clk/stm32/clk-stm32mp1.c
+++ b/drivers/clk/stm32/clk-stm32mp1.c
@@ -881,7 +881,8 @@ static int stm32mp1_clk_get_parent(struct stm32mp1_clk_priv *priv,
 		return sel[s].parent[p];
 	}
 
-	log_err("no parents defined for clk id %d\n", (u32)id);
+	/* clock is DISABLED when the clock src is not in clk_parent[] range */
+	log_debug("no parents defined for clk id %d\n", (u32)id);
 
 	return -EINVAL;
 }
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] clk: stm32mp1: remove error for disabled clock in stm32mp1_clk_get_parent
  2023-06-23 13:05 [PATCH] clk: stm32mp1: remove error for disabled clock in stm32mp1_clk_get_parent Patrick Delaunay
@ 2023-08-04 15:51 ` Patrice CHOTARD
  2023-08-16 13:23 ` Patrice CHOTARD
  1 sibling, 0 replies; 3+ messages in thread
From: Patrice CHOTARD @ 2023-08-04 15:51 UTC (permalink / raw)
  To: Patrick Delaunay, u-boot; +Cc: Lukasz Majewski, Sean Anderson, U-Boot STM32



On 6/23/23 15:05, Patrick Delaunay wrote:
> To disabled a clock in clock tree initialization for a mux of STM32MP15,
> the selected clock source index is set with the latest possible index for
> the number of bit used. Today this valid configuration cause a error
> in U-Boot messages, for example with CLK_ETH_DISABLED, when this clock
> is not needed for the used ETH PHY without crystal:
> 
>    no parents defined for clk id 123
> 
> This patch change the level of this message to avoid this trace for
> valid clock tree.
> 
> Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
> ---
> 
>  drivers/clk/stm32/clk-stm32mp1.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/clk/stm32/clk-stm32mp1.c b/drivers/clk/stm32/clk-stm32mp1.c
> index 4f4524fcb2c6..615028769495 100644
> --- a/drivers/clk/stm32/clk-stm32mp1.c
> +++ b/drivers/clk/stm32/clk-stm32mp1.c
> @@ -881,7 +881,8 @@ static int stm32mp1_clk_get_parent(struct stm32mp1_clk_priv *priv,
>  		return sel[s].parent[p];
>  	}
>  
> -	log_err("no parents defined for clk id %d\n", (u32)id);
> +	/* clock is DISABLED when the clock src is not in clk_parent[] range */
> +	log_debug("no parents defined for clk id %d\n", (u32)id);
>  
>  	return -EINVAL;
>  }

Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>

Thanks
Patrice

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] clk: stm32mp1: remove error for disabled clock in stm32mp1_clk_get_parent
  2023-06-23 13:05 [PATCH] clk: stm32mp1: remove error for disabled clock in stm32mp1_clk_get_parent Patrick Delaunay
  2023-08-04 15:51 ` Patrice CHOTARD
@ 2023-08-16 13:23 ` Patrice CHOTARD
  1 sibling, 0 replies; 3+ messages in thread
From: Patrice CHOTARD @ 2023-08-16 13:23 UTC (permalink / raw)
  To: Patrick Delaunay, u-boot; +Cc: Lukasz Majewski, Sean Anderson, U-Boot STM32



On 6/23/23 15:05, Patrick Delaunay wrote:
> To disabled a clock in clock tree initialization for a mux of STM32MP15,
> the selected clock source index is set with the latest possible index for
> the number of bit used. Today this valid configuration cause a error
> in U-Boot messages, for example with CLK_ETH_DISABLED, when this clock
> is not needed for the used ETH PHY without crystal:
> 
>    no parents defined for clk id 123
> 
> This patch change the level of this message to avoid this trace for
> valid clock tree.
> 
> Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
> ---
> 
>  drivers/clk/stm32/clk-stm32mp1.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/clk/stm32/clk-stm32mp1.c b/drivers/clk/stm32/clk-stm32mp1.c
> index 4f4524fcb2c6..615028769495 100644
> --- a/drivers/clk/stm32/clk-stm32mp1.c
> +++ b/drivers/clk/stm32/clk-stm32mp1.c
> @@ -881,7 +881,8 @@ static int stm32mp1_clk_get_parent(struct stm32mp1_clk_priv *priv,
>  		return sel[s].parent[p];
>  	}
>  
> -	log_err("no parents defined for clk id %d\n", (u32)id);
> +	/* clock is DISABLED when the clock src is not in clk_parent[] range */
> +	log_debug("no parents defined for clk id %d\n", (u32)id);
>  
>  	return -EINVAL;
>  }

applied on stm32-master

Thanka
Patrice

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2023-08-16 13:23 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-06-23 13:05 [PATCH] clk: stm32mp1: remove error for disabled clock in stm32mp1_clk_get_parent Patrick Delaunay
2023-08-04 15:51 ` Patrice CHOTARD
2023-08-16 13:23 ` Patrice CHOTARD

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).