]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
arm: socfpga: stratix10: add sgmii in phymode setup
authorOoi, Joyce <joyce.ooi@intel.com>
Tue, 25 Sep 2018 06:31:45 +0000 (23:31 -0700)
committerMarek Vasut <marex@denx.de>
Wed, 3 Oct 2018 10:56:50 +0000 (12:56 +0200)
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>
arch/arm/mach-socfpga/misc_s10.c

index 918baac502589a44e72af94d944221a1b03f357e..e599362f145861abd6f57412c4c8d5784c59d92d 100644 (file)
@@ -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;