mirror of
https://github.com/u-boot/u-boot.git
synced 2025-04-19 03:15:00 +00:00
net: dwc_eth_qos: Make eqos_get_tick_clk_rate callback optional
Signed-off-by: Sumit Garg <sumit.garg@linaro.org> Reviewed-by: Ramon Fried <rfried.dev@gmail.com>
This commit is contained in:
parent
56443285f2
commit
9d53f335f6
1 changed files with 6 additions and 3 deletions
|
@ -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,
|
||||
|
|
Loading…
Add table
Reference in a new issue