mirror of
https://github.com/smaeul/u-boot.git
synced 2025-10-14 04:46:01 +01:00
net: gem: Check rate before setting it up
On QEMU setting rate for fixed clock is failing. That's why check a rate first if the rate is the same there is no need to ask for the change. Signed-off-by: Michal Simek <michal.simek@amd.com> Link: https://lore.kernel.org/r/bc465ffd4904bfd65208b782daa06732b915db54.1661502645.git.michal.simek@amd.com
This commit is contained in:
parent
aaf0793be3
commit
bae7d37e52
@ -500,11 +500,14 @@ static int zynq_gem_init(struct udevice *dev)
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
ret = clk_get_rate(&priv->tx_clk);
|
||||||
|
if (ret != clk_rate) {
|
||||||
ret = clk_set_rate(&priv->tx_clk, clk_rate);
|
ret = clk_set_rate(&priv->tx_clk, clk_rate);
|
||||||
if (IS_ERR_VALUE(ret)) {
|
if (IS_ERR_VALUE(ret)) {
|
||||||
dev_err(dev, "failed to set tx clock rate\n");
|
dev_err(dev, "failed to set tx clock rate %ld\n", clk_rate);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
ret = clk_enable(&priv->tx_clk);
|
ret = clk_enable(&priv->tx_clk);
|
||||||
if (ret) {
|
if (ret) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user