On Fri, Jan 20, 2023 at 9:18 AM Sumit Garg <[email protected]> wrote: > > Signed-off-by: Sumit Garg <[email protected]> > --- > drivers/net/dwc_eth_qos.c | 9 ++++++--- > 1 file changed, 6 insertions(+), 3 deletions(-) > > diff --git a/drivers/net/dwc_eth_qos.c b/drivers/net/dwc_eth_qos.c > index afc47b56ff..753a912607 100644 > --- a/drivers/net/dwc_eth_qos.c > +++ b/drivers/net/dwc_eth_qos.c > @@ -774,10 +774,13 @@ static int eqos_start(struct udevice *dev) > pr_err("eqos_calibrate_pads() failed: %d", ret); > goto err_stop_resets; > } > - rate = eqos->config->ops->eqos_get_tick_clk_rate(dev); > > - val = (rate / 1000000) - 1; > - writel(val, &eqos->mac_regs->us_tic_counter); > + if (eqos->config->ops->eqos_get_tick_clk_rate) { > + rate = eqos->config->ops->eqos_get_tick_clk_rate(dev); > + > + val = (rate / 1000000) - 1; > + writel(val, &eqos->mac_regs->us_tic_counter); > + } > > /* > * if PHY was already connected and configured, > -- > 2.34.1 > Reviewed-by: Ramon Fried <[email protected]>
- [PATCH 00/14] QCS404: Add ethernet and I2C drivers Sumit Garg
- [PATCH 01/14] qcs404: sysmap: Don't map reserved memor... Sumit Garg
- [PATCH 02/14] qcs404-evb: Enable msm_gpio driver suppo... Sumit Garg
- [PATCH 03/14] clocks: qcs404: Add support for ethernet... Sumit Garg
- [PATCH 04/14] pinctrl: qcs404: Enable ethernet pinmux ... Sumit Garg
- [PATCH 05/14] pinctrl-snapdragon: Get rid of custom dr... Sumit Garg
- [PATCH 06/14] net: dwc_eth_qos: Make eqos_get_tick_clk... Sumit Garg
- Re: [PATCH 06/14] net: dwc_eth_qos: Make eqos_get_... Ramon Fried
- [PATCH 07/14] net: dwc_eth_qos: Allow platform to over... Sumit Garg
- [PATCH 08/14] net: dwc_eth_qos: Add Qcom ethernet driv... Sumit Garg
- [PATCH 09/14] dts: qcs404-evb: Add ethernet controller... Sumit Garg
- [PATCH 10/14] clock-snapdragon: Add clk_rcg_set_rate()... Sumit Garg
- [PATCH 11/14] clocks: qcs404: Add support for I2C cloc... Sumit Garg
- [PATCH 12/14] pinctrl: qcs404: Enable I2C pinmux optio... Sumit Garg
- [PATCH 13/14] i2c: Add support for Qualcomm I2C driver Sumit Garg
- Re: [PATCH 13/14] i2c: Add support for Qualcomm I2... Heiko Schocher

