Skip to contentSkip to conversation

powerpc/hydra: fix judging condition of RGMII selection

PATCH New shh.xie at gmail.com 2 participants 2 messages Nov 24, 2014 – Dec 5, 2014

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 powerpc/hydra: fix judging condition of RGMII selection

From: Minghuan Lian <[email protected]>

BRDCFG1_EMI1_SEL_MASK has been changed to 0x78, which contains selection bits and connected status bit. So the Corresponding mux value of RGMII is changed to BRDCFG1_EMI1_SEL_RGMII | BRDCFG1_EMI1_EN.

---
 board/freescale/corenet_ds/eth_hydra.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
board/freescale/corenet_ds/eth_hydra.c +2 -1
index 35825c4..9d8ca9e 100644
@@ -250,11 +250,12 @@ void board_ft_fman_fixup_port(void *fdt, char *compat, phys_addr_t addr,
 		return;
 	}
 
-	if (mux == BRDCFG1_EMI1_SEL_RGMII) {
+	if (mux == (BRDCFG1_EMI1_SEL_RGMII | BRDCFG1_EMI1_EN)) {
 		/* RGMII */
 		/* The RGMII PHY is identified by the MAC connected to it */
 		sprintf(phy, "phy_rgmii_%u", port == FM1_DTSEC4 ? 0 : 1);
 		fdt_set_phy_handle(fdt, compat, addr, phy);
+		return;
 	}
 
 	/* If it's not RGMII or XGMII, it must be SGMII */
Signature · 1 line
2.1.0.27.g96db324
#1 lore raw

PATCH 1/1 powerpc/hydra: fix judging condition of RGMII selection

Quoted 9 lines · shh.xie at gmail.com

From: Minghuan Lian <[email protected]>

BRDCFG1_EMI1_SEL_MASK has been changed to 0x78, which contains selection bits and connected status bit. So the Corresponding mux value of RGMII is changed to BRDCFG1_EMI1_SEL_RGMII | BRDCFG1_EMI1_EN.

---

Applied to u-boot-mpc85xx, awaiting upstream.

York