All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] [PATCH 2/4] armv8: fsl-lsch3: Initiaze 4 MACs per QSGMII in dpmac_info
@ 2015-08-07 12:46 Prabhakar Kushwaha
  0 siblings, 0 replies; 3+ messages in thread
From: Prabhakar Kushwaha @ 2015-08-07 12:46 UTC (permalink / raw)
  To: u-boot

Every QSGMII SerDes Protocol usage 4 MACs.

So add/repeat QSGMII information for 4 MACs in dpmac_info strucuture.

Signed-off-by: King Chung Lo at freescale.com <KingChungLo@freescale.com>
Signed-off-by: Prabhakar Kushwaha <prabhakar@freescale.com>
---
 arch/arm/cpu/armv8/fsl-lsch3/fsl_lsch3_serdes.c | 33 ++++++++++++++++++++++++-
 1 file changed, 32 insertions(+), 1 deletion(-)

diff --git a/arch/arm/cpu/armv8/fsl-lsch3/fsl_lsch3_serdes.c b/arch/arm/cpu/armv8/fsl-lsch3/fsl_lsch3_serdes.c
index 02ca126..ae08343 100644
--- a/arch/arm/cpu/armv8/fsl-lsch3/fsl_lsch3_serdes.c
+++ b/arch/arm/cpu/armv8/fsl-lsch3/fsl_lsch3_serdes.c
@@ -90,7 +90,38 @@ void serdes_init(u32 sd, u32 sd_addr, u32 sd_prctl_mask, u32 sd_prctl_shift,
 		else {
 			serdes_prtcl_map[lane_prtcl] = 1;
 #ifdef CONFIG_FSL_MC_ENET
-			wriop_init_dpmac(sd, lane + 1, (int)lane_prtcl);
+			switch (lane_prtcl) {
+			case QSGMII_A:
+				wriop_init_dpmac(sd, 5, (int)lane_prtcl);
+				wriop_init_dpmac(sd, 6, (int)lane_prtcl);
+				wriop_init_dpmac(sd, 7, (int)lane_prtcl);
+				wriop_init_dpmac(sd, 8, (int)lane_prtcl);
+				break;
+			case QSGMII_B:
+				wriop_init_dpmac(sd, 1, (int)lane_prtcl);
+				wriop_init_dpmac(sd, 2, (int)lane_prtcl);
+				wriop_init_dpmac(sd, 3, (int)lane_prtcl);
+				wriop_init_dpmac(sd, 4, (int)lane_prtcl);
+				break;
+			case QSGMII_C:
+				wriop_init_dpmac(sd, 13, (int)lane_prtcl);
+				wriop_init_dpmac(sd, 14, (int)lane_prtcl);
+				wriop_init_dpmac(sd, 15, (int)lane_prtcl);
+				wriop_init_dpmac(sd, 16, (int)lane_prtcl);
+				break;
+			case QSGMII_D:
+				wriop_init_dpmac(sd, 9, (int)lane_prtcl);
+				wriop_init_dpmac(sd, 10, (int)lane_prtcl);
+				wriop_init_dpmac(sd, 11, (int)lane_prtcl);
+				wriop_init_dpmac(sd, 12, (int)lane_prtcl);
+				break;
+			default:
+				 if (lane_prtcl >= SGMII1 &&
+					   lane_prtcl <= SGMII16)
+					wriop_init_dpmac(sd, lane + 1,
+							 (int)lane_prtcl);
+				break;
+			}
 #endif
 		}
 	}
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [U-Boot] [PATCH 2/4] armv8: fsl-lsch3: Initiaze 4 MACs per QSGMII in dpmac_info
  2015-08-07 12:31 Prabhakar Kushwaha
@ 2015-09-02  2:45 ` York Sun
  0 siblings, 0 replies; 3+ messages in thread
From: York Sun @ 2015-09-02  2:45 UTC (permalink / raw)
  To: u-boot



On 08/07/2015 07:31 AM, Prabhakar Kushwaha wrote:
> Every QSGMII SerDes Protocol usage 4 MACs.
> 
> So add/repeat QSGMII information for 4 MACs in dpmac_info strucuture.
> 
> Signed-off-by: King Chung Lo at freescale.com <KingChungLo@freescale.com>
> Signed-off-by: Prabhakar Kushwaha <prabhakar@freescale.com>
> ---

Applied to fsl-qoriq master branch. Awaiting upstream.

York

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [U-Boot] [PATCH 2/4] armv8: fsl-lsch3: Initiaze 4 MACs per QSGMII in dpmac_info
@ 2015-08-07 12:31 Prabhakar Kushwaha
  2015-09-02  2:45 ` York Sun
  0 siblings, 1 reply; 3+ messages in thread
From: Prabhakar Kushwaha @ 2015-08-07 12:31 UTC (permalink / raw)
  To: u-boot

Every QSGMII SerDes Protocol usage 4 MACs.

So add/repeat QSGMII information for 4 MACs in dpmac_info strucuture.

Signed-off-by: King Chung Lo at freescale.com <KingChungLo@freescale.com>
Signed-off-by: Prabhakar Kushwaha <prabhakar@freescale.com>
---
 arch/arm/cpu/armv8/fsl-lsch3/fsl_lsch3_serdes.c | 33 ++++++++++++++++++++++++-
 1 file changed, 32 insertions(+), 1 deletion(-)

diff --git a/arch/arm/cpu/armv8/fsl-lsch3/fsl_lsch3_serdes.c b/arch/arm/cpu/armv8/fsl-lsch3/fsl_lsch3_serdes.c
index 02ca126..ae08343 100644
--- a/arch/arm/cpu/armv8/fsl-lsch3/fsl_lsch3_serdes.c
+++ b/arch/arm/cpu/armv8/fsl-lsch3/fsl_lsch3_serdes.c
@@ -90,7 +90,38 @@ void serdes_init(u32 sd, u32 sd_addr, u32 sd_prctl_mask, u32 sd_prctl_shift,
 		else {
 			serdes_prtcl_map[lane_prtcl] = 1;
 #ifdef CONFIG_FSL_MC_ENET
-			wriop_init_dpmac(sd, lane + 1, (int)lane_prtcl);
+			switch (lane_prtcl) {
+			case QSGMII_A:
+				wriop_init_dpmac(sd, 5, (int)lane_prtcl);
+				wriop_init_dpmac(sd, 6, (int)lane_prtcl);
+				wriop_init_dpmac(sd, 7, (int)lane_prtcl);
+				wriop_init_dpmac(sd, 8, (int)lane_prtcl);
+				break;
+			case QSGMII_B:
+				wriop_init_dpmac(sd, 1, (int)lane_prtcl);
+				wriop_init_dpmac(sd, 2, (int)lane_prtcl);
+				wriop_init_dpmac(sd, 3, (int)lane_prtcl);
+				wriop_init_dpmac(sd, 4, (int)lane_prtcl);
+				break;
+			case QSGMII_C:
+				wriop_init_dpmac(sd, 13, (int)lane_prtcl);
+				wriop_init_dpmac(sd, 14, (int)lane_prtcl);
+				wriop_init_dpmac(sd, 15, (int)lane_prtcl);
+				wriop_init_dpmac(sd, 16, (int)lane_prtcl);
+				break;
+			case QSGMII_D:
+				wriop_init_dpmac(sd, 9, (int)lane_prtcl);
+				wriop_init_dpmac(sd, 10, (int)lane_prtcl);
+				wriop_init_dpmac(sd, 11, (int)lane_prtcl);
+				wriop_init_dpmac(sd, 12, (int)lane_prtcl);
+				break;
+			default:
+				 if (lane_prtcl >= SGMII1 &&
+					   lane_prtcl <= SGMII16)
+					wriop_init_dpmac(sd, lane + 1,
+							 (int)lane_prtcl);
+				break;
+			}
 #endif
 		}
 	}
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2015-09-02  2:45 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-08-07 12:46 [U-Boot] [PATCH 2/4] armv8: fsl-lsch3: Initiaze 4 MACs per QSGMII in dpmac_info Prabhakar Kushwaha
  -- strict thread matches above, loose matches on Subject: below --
2015-08-07 12:31 Prabhakar Kushwaha
2015-09-02  2:45 ` York Sun

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.