diff options
author | Ooi, Joyce <joyce.ooi@intel.com> | 2018-09-24 23:31:45 -0700 |
---|---|---|
committer | Marek Vasut <marex@denx.de> | 2018-10-03 12:56:50 +0200 |
commit | 8be11fb3c1d8d89ff6b60bd3937efcea2dc9c91d (patch) | |
tree | 5ae6d01dbb5b489ece194d220153ca9ef2b33bf6 /arch/arm | |
parent | 74c78024a0ad6fcdc899bf8d7696e6512b472633 (diff) |
arm: socfpga: stratix10: add sgmii in phymode setup
Additional sgmii phymode is added in socfpga_phymode_setup() along with
a minor fix for maximum number of GMACs.
Signed-off-by: Ooi, Joyce <joyce.ooi@intel.com>
Diffstat (limited to 'arch/arm')
-rw-r--r-- | arch/arm/mach-socfpga/misc_s10.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/arch/arm/mach-socfpga/misc_s10.c b/arch/arm/mach-socfpga/misc_s10.c index 918baac502..e599362f14 100644 --- a/arch/arm/mach-socfpga/misc_s10.c +++ b/arch/arm/mach-socfpga/misc_s10.c @@ -36,7 +36,8 @@ static u32 socfpga_phymode_setup(u32 gmac_index, const char *phymode) if (!phymode) return -EINVAL; - if (!strcmp(phymode, "mii") || !strcmp(phymode, "gmii")) + if (!strcmp(phymode, "mii") || !strcmp(phymode, "gmii") || + !strcmp(phymode, "sgmii")) modereg = SYSMGR_EMACGRP_CTRL_PHYSEL_ENUM_GMII_MII; else if (!strcmp(phymode, "rgmii")) modereg = SYSMGR_EMACGRP_CTRL_PHYSEL_ENUM_RGMII; @@ -58,7 +59,7 @@ static int socfpga_set_phymode(void) struct fdtdec_phandle_args args; const char *phy_mode; u32 gmac_index; - int nodes[2]; /* Max. 3 GMACs */ + int nodes[3]; /* Max. 3 GMACs */ int ret, count; int i, node; |