]> git.baikalelectronics.ru Git - uboot.git/commit
net: zynq_gem: Don't hardcode the MDC clock divisor
authorVenkatesh Yadav Abbarapu <venkatesh.abbarapu@amd.com>
Mon, 19 Jun 2023 03:49:22 +0000 (09:19 +0530)
committerMichal Simek <michal.simek@amd.com>
Fri, 21 Jul 2023 07:00:38 +0000 (09:00 +0200)
commit22f8151e1a68bc13b1005e6f7d7c8e5fa049b31e
treefffd731ad7e173db95662cf6c9591e502be8b576
parent81acb41257ffcd78584cd51774407d7b35f8d210
net: zynq_gem: Don't hardcode the MDC clock divisor

As per spec MDC must not exceed 2.5MHz, read the pclk clock
from the device tree and update the MDC clock divisor.
GEM devices support larger clock divisors and have a different
range of divisors.  Program the MDIO clock divisors based on
the clock rate of the pclk clock.

Signed-off-by: Venkatesh Yadav Abbarapu <venkatesh.abbarapu@amd.com>
Link: https://lore.kernel.org/r/20230619034922.24019-1-venkatesh.abbarapu@amd.com
Signed-off-by: Michal Simek <michal.simek@amd.com>
drivers/net/zynq_gem.c