Skip to contentSkip to conversation

armv8, lx2160a: Initialize ethernet array in serdes_init

PATCH New Priyanka Jain 2 participants 2 messages Nov 28, 2018 – Feb 20, 2019 Arm (32-bit)

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 armv8, lx2160a: Initialize ethernet array in serdes_init

Add code to initial ethernet interface arrays with corresponding dpmac-id values in serdes_init function for LX2160A.

---
 arch/arm/cpu/armv8/fsl-layerscape/fsl_lsch3_serdes.c | 20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)
arch/arm/cpu/armv8/fsl-layerscape/fsl_lsch3_serdes.c +20 -0
index ab1be3f..1a747a9 100644
@@ -548,12 +548,32 @@ void fsl_serdes_init(void)
 #if defined(CONFIG_FSL_MC_ENET) && !defined(CONFIG_SPL_BUILD)
 	int i , j;
 
+#ifdef CONFIG_ARCH_LX2160A
+	for (i = XFI1, j = 1; i <= XFI14; i++, j++)
+		xfi_dpmac[i] = j;
+
+	for (i = SGMII1, j = 1; i <= SGMII18; i++, j++)
+		sgmii_dpmac[i] = j;
+
+	for (i = _25GE1, j = 1; i <= _25GE10; i++, j++)
+		a25gaui_dpmac[i] = j;
+
+	for (i = _40GE1, j = 1; i <= _40GE2; i++, j++)
+		xlaui_dpmac[i] = j;
+
+	for (i = _50GE1, j = 1; i <= _50GE2; i++, j++)
+		caui2_dpmac[i] = j;
+
+	for (i = _100GE1, j = 1; i <= _100GE2; i++, j++)
+		caui4_dpmac[i] = j;
+#else
 	for (i = XFI1, j = 1; i <= XFI8; i++, j++)
 		xfi_dpmac[i] = j;
 
 	for (i = SGMII1, j = 1; i <= SGMII16; i++, j++)
 		sgmii_dpmac[i] = j;
 #endif
+#endif
 
 #ifdef CONFIG_SYS_FSL_SRDS_1
 	serdes_init(FSL_SRDS_1,
Signature · 1 line
2.7.4
#1 lore raw

PATCH 1/1 armv8, lx2160a: Initialize ethernet array in serdes_init

Quoted 9 lines

-----Original Message-----
From: U-Boot <[email protected]> On Behalf Of Priyanka Jain
Sent: Wednesday, November 28, 2018 3:30 PM
To: u-boot at lists.denx.de; York Sun <[email protected]>
Cc: Priyanka Jain <[email protected]>
Subject: [U-Boot] [PATCH] armv8, lx2160a: Initialize ethernet array in serdes_init

Quoted 5 lines

Add code to initial ethernet interface arrays with corresponding dpmac-id values in serdes_init function for LX2160A.

---

This patch been applied to fsl-qoriq master, awaiting upstream.

--pk