Commit 2e53759dc6f813db4e826e98f041f3448adcf6f5
Committed by
Prabhakar Kushwaha
1 parent
8c4875395b
Exists in
smarc_8mq_lf_v2020.04
and in
11 other branches
armv8: fsl-layerscape: reorder rgmii dpmacs' enablement
some dpmacs in armv8a based freescale layerscape SOCs can be configured via both serdes(sgmii, xfi, xlaui etc) bits and via EC*_PMUX(rgmii) bits in RCW. e.g. dpmac 17 and 18 in LX2160A can be configured as SGMII from serdes bits and as RGMII via EC1_PMUX/EC2_PMUX bits Now if a dpmac is enabled by serdes bits then it takes precedence over EC*_PMUX bits. i.e. in LX2160A if we select serdes protocol that configures dpmac17 as SGMII and set the EC1_PMUX as RGMII, then the dpmac is SGMII and not RGMII. Therefore, move the fsl_rgmii_init after fsl_serdes_init. in fsl_rgmii_init function of SOC, we will check if the dpmac is enabled or not? if it is (fsl_serdes_init has already enabled the dpmac), then don't enable it. Signed-off-by: Pankaj Bansal <pankaj.bansal@nxp.com> Reviewed-by: Prabhakar Kushwaha <prabhakar.kushwaha@nxp.com>
Showing 1 changed file with 18 additions and 4 deletions Side-by-side Diff
arch/arm/cpu/armv8/fsl-layerscape/cpu.c
... | ... | @@ -1099,14 +1099,28 @@ |
1099 | 1099 | printf("Did not wake secondary cores\n"); |
1100 | 1100 | } |
1101 | 1101 | |
1102 | -#ifdef CONFIG_SYS_FSL_HAS_RGMII | |
1103 | - fsl_rgmii_init(); | |
1104 | -#endif | |
1105 | - | |
1106 | 1102 | config_core_prefetch(); |
1107 | 1103 | |
1108 | 1104 | #ifdef CONFIG_SYS_HAS_SERDES |
1109 | 1105 | fsl_serdes_init(); |
1106 | +#endif | |
1107 | +#ifdef CONFIG_SYS_FSL_HAS_RGMII | |
1108 | + /* some dpmacs in armv8a based freescale layerscape SOCs can be | |
1109 | + * configured via both serdes(sgmii, xfi, xlaui etc) bits and via | |
1110 | + * EC*_PMUX(rgmii) bits in RCW. | |
1111 | + * e.g. dpmac 17 and 18 in LX2160A can be configured as SGMII from | |
1112 | + * serdes bits and as RGMII via EC1_PMUX/EC2_PMUX bits | |
1113 | + * Now if a dpmac is enabled by serdes bits then it takes precedence | |
1114 | + * over EC*_PMUX bits. i.e. in LX2160A if we select serdes protocol | |
1115 | + * that configures dpmac17 as SGMII and set the EC1_PMUX as RGMII, | |
1116 | + * then the dpmac is SGMII and not RGMII. | |
1117 | + * | |
1118 | + * Therefore, move the fsl_rgmii_init after fsl_serdes_init. in | |
1119 | + * fsl_rgmii_init function of SOC, we will check if the dpmac is enabled | |
1120 | + * or not? if it is (fsl_serdes_init has already enabled the dpmac), | |
1121 | + * then don't enable it. | |
1122 | + */ | |
1123 | + fsl_rgmii_init(); | |
1110 | 1124 | #endif |
1111 | 1125 | #ifdef CONFIG_FMAN_ENET |
1112 | 1126 | fman_enet_init(); |