net: stmmac: dwmac-sunxi: Allow all RGMII modes
authorChen-Yu Tsai <wens@csie.org>
Mon, 6 Jan 2020 03:09:22 +0000 (11:09 +0800)
committerDavid S. Miller <davem@davemloft.net>
Wed, 8 Jan 2020 20:30:19 +0000 (12:30 -0800)
Allow all the RGMII modes to be used. This would allow us to represent
the hardware better in the device tree with RGMII_ID where in most
cases the PHY's internal delay for both RX and TX are used.

Fixes: af0bd4e9ba80 ("net: stmmac: sunxi platform extensions for GMAC in Allwinner A20 SoC's")
Signed-off-by: Chen-Yu Tsai <wens@csie.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/stmicro/stmmac/dwmac-sunxi.c

index 26353ef616b8bf1329f332ce01d8ae692ab617f1..7d40760e9ba887693e5b6b2a925eee73bd7ad92d 100644 (file)
@@ -44,7 +44,7 @@ static int sun7i_gmac_init(struct platform_device *pdev, void *priv)
         * rate, which then uses the auto-reparenting feature of the
         * clock driver, and enabling/disabling the clock.
         */
-       if (gmac->interface == PHY_INTERFACE_MODE_RGMII) {
+       if (phy_interface_mode_is_rgmii(gmac->interface)) {
                clk_set_rate(gmac->tx_clk, SUN7I_GMAC_GMII_RGMII_RATE);
                clk_prepare_enable(gmac->tx_clk);
                gmac->clk_enabled = 1;