Re: [PATCH 09/11] net: dwc_eth_qos: Request clk-ck earlier in probe on STM32

2024-04-05 Thread Christophe ROULLIER

On 3/9/24 03:11, Marek Vasut wrote:

From: Patrick Delaunay 

Request the clk-ck earlier in probe in preparation for obtaining the
clock rate from these clk-ck in eqos_probe_syscfg_stm32() in the
follow up patch.

Signed-off-by: Patrick Delaunay 
---
Cc: Christophe Roullier 
Cc: Joe Hershberger 
Cc: Patrice Chotard 
Cc: Patrick Delaunay 
Cc: Ramon Fried 
Cc: u-b...@dh-electronics.com
Cc: uboot-st...@st-md-mailman.stormreply.com
---
  drivers/net/dwc_eth_qos_stm32.c | 10 +-
  1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/net/dwc_eth_qos_stm32.c
b/drivers/net/dwc_eth_qos_stm32.c index 33477925ff1..4db18130765
100644
--- a/drivers/net/dwc_eth_qos_stm32.c
+++ b/drivers/net/dwc_eth_qos_stm32.c
@@ -201,6 +201,11 @@ static int eqos_probe_resources_stm32(struct udevice *dev)
   return -EINVAL;
   }

+ /* Get ETH_CLK clocks (optional) */
+ ret = clk_get_by_name(dev, "eth-ck", >clk_ck);
+ if (ret)
+ dev_dbg(dev, "No phy clock provided %d", ret);
+
   ret = eqos_probe_syscfg_stm32(dev, interface);
   if (ret)
   return -EINVAL;
@@ -223,11 +228,6 @@ static int eqos_probe_resources_stm32(struct udevice *dev)
   goto err_probe;
   }

- /*  Get ETH_CLK clocks (optional) */
- ret = clk_get_by_name(dev, "eth-ck", >clk_ck);
- if (ret)
- dev_warn(dev, "No phy clock provided %d\n", ret);
-
   dev_dbg(dev, "%s: OK\n", __func__);

   return 0;


Reviewed-by: Christophe ROULLIER 



Re: [PATCH 09/11] net: dwc_eth_qos: Request clk-ck earlier in probe on STM32

2024-03-12 Thread Patrice CHOTARD



On 3/9/24 03:11, Marek Vasut wrote:
> From: Patrick Delaunay 
> 
> Request the clk-ck earlier in probe in preparation for obtaining
> the clock rate from these clk-ck in eqos_probe_syscfg_stm32() in
> the follow up patch.
> 
> Signed-off-by: Patrick Delaunay 
> ---
> Cc: Christophe Roullier 
> Cc: Joe Hershberger 
> Cc: Patrice Chotard 
> Cc: Patrick Delaunay 
> Cc: Ramon Fried 
> Cc: u-b...@dh-electronics.com
> Cc: uboot-st...@st-md-mailman.stormreply.com
> ---
>  drivers/net/dwc_eth_qos_stm32.c | 10 +-
>  1 file changed, 5 insertions(+), 5 deletions(-)
> 
> diff --git a/drivers/net/dwc_eth_qos_stm32.c b/drivers/net/dwc_eth_qos_stm32.c
> index 33477925ff1..4db18130765 100644
> --- a/drivers/net/dwc_eth_qos_stm32.c
> +++ b/drivers/net/dwc_eth_qos_stm32.c
> @@ -201,6 +201,11 @@ static int eqos_probe_resources_stm32(struct udevice 
> *dev)
>   return -EINVAL;
>   }
>  
> + /* Get ETH_CLK clocks (optional) */
> + ret = clk_get_by_name(dev, "eth-ck", >clk_ck);
> + if (ret)
> + dev_dbg(dev, "No phy clock provided %d", ret);
> +
>   ret = eqos_probe_syscfg_stm32(dev, interface);
>   if (ret)
>   return -EINVAL;
> @@ -223,11 +228,6 @@ static int eqos_probe_resources_stm32(struct udevice 
> *dev)
>   goto err_probe;
>   }
>  
> - /*  Get ETH_CLK clocks (optional) */
> - ret = clk_get_by_name(dev, "eth-ck", >clk_ck);
> - if (ret)
> - dev_warn(dev, "No phy clock provided %d\n", ret);
> -
>   dev_dbg(dev, "%s: OK\n", __func__);
>  
>   return 0;
Reviewed-by: Patrice Chotard 

Thanks
Patrice


[PATCH 09/11] net: dwc_eth_qos: Request clk-ck earlier in probe on STM32

2024-03-08 Thread Marek Vasut
From: Patrick Delaunay 

Request the clk-ck earlier in probe in preparation for obtaining
the clock rate from these clk-ck in eqos_probe_syscfg_stm32() in
the follow up patch.

Signed-off-by: Patrick Delaunay 
---
Cc: Christophe Roullier 
Cc: Joe Hershberger 
Cc: Patrice Chotard 
Cc: Patrick Delaunay 
Cc: Ramon Fried 
Cc: u-b...@dh-electronics.com
Cc: uboot-st...@st-md-mailman.stormreply.com
---
 drivers/net/dwc_eth_qos_stm32.c | 10 +-
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/net/dwc_eth_qos_stm32.c b/drivers/net/dwc_eth_qos_stm32.c
index 33477925ff1..4db18130765 100644
--- a/drivers/net/dwc_eth_qos_stm32.c
+++ b/drivers/net/dwc_eth_qos_stm32.c
@@ -201,6 +201,11 @@ static int eqos_probe_resources_stm32(struct udevice *dev)
return -EINVAL;
}
 
+   /* Get ETH_CLK clocks (optional) */
+   ret = clk_get_by_name(dev, "eth-ck", >clk_ck);
+   if (ret)
+   dev_dbg(dev, "No phy clock provided %d", ret);
+
ret = eqos_probe_syscfg_stm32(dev, interface);
if (ret)
return -EINVAL;
@@ -223,11 +228,6 @@ static int eqos_probe_resources_stm32(struct udevice *dev)
goto err_probe;
}
 
-   /*  Get ETH_CLK clocks (optional) */
-   ret = clk_get_by_name(dev, "eth-ck", >clk_ck);
-   if (ret)
-   dev_warn(dev, "No phy clock provided %d\n", ret);
-
dev_dbg(dev, "%s: OK\n", __func__);
 
return 0;
-- 
2.43.0