c572da7f10
The MDIO bus frequency is configured as a divisor off of the MDIO bus reference clock. For the AR9344 and later, the MDIO bus frequency can be faster than normal (ie, up to 100MHz) and thus a static divisor may not be very applicable. So, for those boards that may require an actual frequency to be selected regardless of what crazy stuff the vendor throws in uboot, one can now set the MDIO bus frequency. It uses the MDIO frequency and the target frequency to choose a divisor that doesn't exceed the target frequency. By default it will choose: * DIV_28 on everything; except * DIV_58 on the AR9344 to be conservative. Whilst I'm here, add some comments about the defaults being not quite right. For the other internal switch devices (like the AR933x, AR724x) the divisor can be higher - it's internal and the reference MDIO clock is much lower than 100MHz. The divisor tables and loop code is inspired from Linux/OpenWRT. It's very simple; I didn't feel that reimplementing it would yield a substantially different solution. Tested: * AR9331 (mips24k) * AR9344 (mips74k) Obtained from: Linux/OpenWRT |
||
---|---|---|
.. | ||
apb.c | ||
apbvar.h | ||
ar71xx_bus_space_reversed.c | ||
ar71xx_bus_space_reversed.h | ||
ar71xx_chip.c | ||
ar71xx_chip.h | ||
ar71xx_cpudef.h | ||
ar71xx_ehci.c | ||
ar71xx_fixup.c | ||
ar71xx_fixup.h | ||
ar71xx_gpio.c | ||
ar71xx_gpiovar.h | ||
ar71xx_machdep.c | ||
ar71xx_ohci.c | ||
ar71xx_pci_bus_space.c | ||
ar71xx_pci_bus_space.h | ||
ar71xx_pci.c | ||
ar71xx_setup.c | ||
ar71xx_setup.h | ||
ar71xx_spi.c | ||
ar71xx_wdog.c | ||
ar71xxreg.h | ||
ar91xx_chip.c | ||
ar91xx_chip.h | ||
ar91xxreg.h | ||
ar724x_chip.c | ||
ar724x_chip.h | ||
ar724x_pci.c | ||
ar724xreg.h | ||
ar933x_chip.c | ||
ar933x_chip.h | ||
ar933x_uart.h | ||
ar933xreg.h | ||
ar934x_chip.c | ||
ar934x_chip.h | ||
ar934xreg.h | ||
files.ar71xx | ||
if_arge.c | ||
if_argevar.h | ||
pcf2123_rtc.c | ||
pcf2123reg.h | ||
std.ar71xx | ||
uart_bus_ar71xx.c | ||
uart_bus_ar933x.c | ||
uart_cpu_ar71xx.c | ||
uart_cpu_ar933x.c | ||
uart_dev_ar933x.c | ||
uart_dev_ar933x.h |