dm: net: macb: Implement link speed change callback
authorBin Meng <bmeng.cn@gmail.com>
Wed, 22 May 2019 07:09:46 +0000 (00:09 -0700)
committerJoe Hershberger <joe.hershberger@ni.com>
Sat, 1 Jun 2019 18:33:17 +0000 (13:33 -0500)
commit3ef64444de157a2e4f6a61b3ea617b9d201a6836
treec4754e75f073584577c59bc4ee56bb922cbc8ba9
parenta5e3d2350b271d6281c01ae7ad0dd7290ba66aee
dm: net: macb: Implement link speed change callback

At present the link speed change callback is a nop. According to
macb device tree bindings, an optional "tx_clk" is used to clock
the ethernet controller's TX_CLK under different link speed.

In 10/100 MII mode, transmit logic must be clocked from a free
running clock generated by the external PHY. In gigabit GMII mode,
the controller, not the external PHY, must generate the 125 MHz
transmit clock towards the PHY.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Lukas Auer <lukas.auer@aisec.fraunhofer.de>
Tested-by: Lukas Auer <lukas.auer@aisec.fraunhofer.de>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
drivers/net/macb.c