Message ID | 20240309021831.264018-10-marex@denx.de |
---|---|
State | Superseded |
Delegated to: | Patrice Chotard |
Headers | show |
Series | net: dwc_eth_qos: Clean up STM32 glue code and add STM32MP13xx support | expand |
On 3/9/24 03:11, Marek Vasut wrote: > From: Patrick Delaunay <patrick.delaunay@foss.st.com> > > 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 <patrick.delaunay@foss.st.com> > --- > Cc: Christophe Roullier <christophe.roullier@st.com> > Cc: Joe Hershberger <joe.hershberger@ni.com> > Cc: Patrice Chotard <patrice.chotard@foss.st.com> > Cc: Patrick Delaunay <patrick.delaunay@foss.st.com> > Cc: Ramon Fried <rfried.dev@gmail.com> > Cc: u-boot@dh-electronics.com > Cc: uboot-stm32@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", &eqos->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", &eqos->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 <patrice.chotard@foss.st.com> Thanks Patrice
> On 3/9/24 03:11, Marek Vasut wrote: >> From: Patrick Delaunay <patrick.delaunay@foss.st.com> >> >> 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 <patrick.delaunay@foss.st.com> >> --- >> Cc: Christophe Roullier <christophe.roullier@st.com> >> Cc: Joe Hershberger <joe.hershberger@ni.com> >> Cc: Patrice Chotard <patrice.chotard@foss.st.com> >> Cc: Patrick Delaunay <patrick.delaunay@foss.st.com> >> Cc: Ramon Fried <rfried.dev@gmail.com> >> Cc: u-boot@dh-electronics.com >> Cc: uboot-stm32@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", &eqos->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", &eqos->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 <christophe.roullier@foss.st.com>
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", &eqos->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", &eqos->clk_ck); - if (ret) - dev_warn(dev, "No phy clock provided %d\n", ret); - dev_dbg(dev, "%s: OK\n", __func__); return 0;