net: mv643xx_eth: support MII/GMII/RGMII modes for Kirkwood
authorDavid Yang <mmyangfl@gmail.com>
Fri, 28 Oct 2022 02:01:01 +0000 (10:01 +0800)
committerDavid S. Miller <davem@davemloft.net>
Mon, 7 Nov 2022 08:42:19 +0000 (08:42 +0000)
commitd08cb25556773c65efb21761b75f92c804ad0975
treea1c358e443bc866f49c3fb156502ddc4b1fd6523
parent63d9e12914840400e9f96c2ae9a51cd9702c2daf
net: mv643xx_eth: support MII/GMII/RGMII modes for Kirkwood

Support mode switch properly, which is not available before.

If SoC has two Ethernet controllers, by setting both of them into MII
mode, the first controller enters GMII mode, while the second
controller is effectively disabled. This requires configuring (and
maybe enabling) the second controller in the device tree, even though
it cannot be used.

Signed-off-by: David Yang <mmyangfl@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/marvell/mv643xx_eth.c
include/linux/mv643xx_eth.h