diff options
author | Maxim Kochetkov <fido_max@inbox.ru> | 2021-01-11 07:39:03 +0300 |
---|---|---|
committer | Jakub Kicinski <kuba@kernel.org> | 2021-01-13 07:03:49 +0300 |
commit | 5bc8f5ab3b752306d6a1e0e4fa6c4473c15a2924 (patch) | |
tree | 6645af622063db2eaff7c735b00064bfec888de4 /drivers/net/ethernet/freescale/fman | |
parent | 9cc8976c69eb626a7a5100239eb7c69b1a1a609f (diff) | |
download | linux-5bc8f5ab3b752306d6a1e0e4fa6c4473c15a2924.tar.xz |
fsl/fman: Add MII mode support.
Set proper value to IF_MODE register for MII mode.
Signed-off-by: Maxim Kochetkov <fido_max@inbox.ru>
Link: https://lore.kernel.org/r/20210111043903.8044-1-fido_max@inbox.ru
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'drivers/net/ethernet/freescale/fman')
-rw-r--r-- | drivers/net/ethernet/freescale/fman/fman_memac.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/net/ethernet/freescale/fman/fman_memac.c b/drivers/net/ethernet/freescale/fman/fman_memac.c index bb9887f98841..62f42921933d 100644 --- a/drivers/net/ethernet/freescale/fman/fman_memac.c +++ b/drivers/net/ethernet/freescale/fman/fman_memac.c @@ -111,6 +111,7 @@ do { \ #define IF_MODE_MASK 0x00000003 /* 30-31 Mask on i/f mode bits */ #define IF_MODE_10G 0x00000000 /* 30-31 10G interface */ +#define IF_MODE_MII 0x00000001 /* 30-31 MII interface */ #define IF_MODE_GMII 0x00000002 /* 30-31 GMII (1G) interface */ #define IF_MODE_RGMII 0x00000004 #define IF_MODE_RGMII_AUTO 0x00008000 @@ -442,6 +443,9 @@ static int init(struct memac_regs __iomem *regs, struct memac_cfg *cfg, case PHY_INTERFACE_MODE_XGMII: tmp |= IF_MODE_10G; break; + case PHY_INTERFACE_MODE_MII: + tmp |= IF_MODE_MII; + break; default: tmp |= IF_MODE_GMII; if (phy_if == PHY_INTERFACE_MODE_RGMII || |