]> git.dujemihanovic.xyz Git - u-boot.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)
commit22836f088d6027ee8e4bde17abbf71644a8388f5
treefffd731ad7e173db95662cf6c9591e502be8b576
parent9a45365ae9cd80e0f060e480c544c17bb9a81e51
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