]> git.baikalelectronics.ru Git - kernel.git/commit
net: ethernet: stmmac: Enable interface clocks on probe for IPQ806x
authorJonathan McDowell <noodles@earth.li>
Thu, 21 May 2020 11:49:34 +0000 (12:49 +0100)
committerDavid S. Miller <davem@davemloft.net>
Fri, 22 May 2020 23:07:02 +0000 (16:07 -0700)
commite21506e31e692790af74ffd913c1e704536342b4
tree6d13f31bd478131d4f6e28ba9f686c5bca2fdb50
parent66d8e6043264c57be17615cf7b2b9c86a267f961
net: ethernet: stmmac: Enable interface clocks on probe for IPQ806x

The ipq806x_gmac_probe() function enables the PTP clock but not the
appropriate interface clocks. This means that if the bootloader hasn't
done so attempting to bring up the interface will fail with an error
like:

[   59.028131] ipq806x-gmac-dwmac 37600000.ethernet: Failed to reset the dma
[   59.028196] ipq806x-gmac-dwmac 37600000.ethernet eth1: stmmac_hw_setup: DMA engine initialization failed
[   59.034056] ipq806x-gmac-dwmac 37600000.ethernet eth1: stmmac_open: Hw setup failed

This patch, a slightly cleaned up version of one posted by Sergey
Sergeev in:

https://forum.openwrt.org/t/support-for-mikrotik-rb3011uias-rm/4064/257

correctly enables the clock; we have already configured the source just
before this.

Tested on a MikroTik RB3011.

Signed-off-by: Jonathan McDowell <noodles@earth.li>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/stmicro/stmmac/dwmac-ipq806x.c