Skip to content

Commit

Permalink
fsl/fman: Add MII mode support.
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Maxim Kochetkov authored and Jakub Kicinski committed Jan 13, 2021
1 parent 9cc8976 commit 5bc8f5a
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions drivers/net/ethernet/freescale/fman/fman_memac.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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 ||
Expand Down

0 comments on commit 5bc8f5a

Please sign in to comment.