[U-Boot] [PATCH 03/10] powerpc/85xx: add SerDes bank 4 lanes only if we have a bank 4

York Sun yorksun at freescale.com
Fri Mar 22 17:38:06 CET 2013


From: Timur Tabi

Only some chips have four SerDes banks, so don't define lanes for a bank
that doesn't exist.

This fixes warning message "excess elements in array initializer" for
array lanes[], because that array is defined with a size of SRDS_MAX_LANES,
and the value of SRDS_MAX_LANES depends on the number of SerDes banks.

Signed-off-by: Timur Tabi
---
 arch/powerpc/cpu/mpc85xx/fsl_corenet_serdes.c |    4 ++++
 1 file changed, 4 insertions(+)

diff --git a/arch/powerpc/cpu/mpc85xx/fsl_corenet_serdes.c b/arch/powerpc/cpu/mpc85xx/fsl_corenet_serdes.c
index 5495dc5..00e1c11 100644
--- a/arch/powerpc/cpu/mpc85xx/fsl_corenet_serdes.c
+++ b/arch/powerpc/cpu/mpc85xx/fsl_corenet_serdes.c
@@ -103,6 +103,10 @@ static const struct {
 	{ 22, 168, FSL_SRDS_BANK_3 },
 	{ 23, 169, FSL_SRDS_BANK_3 },
 #endif
+#if SRDS_MAX_BANK > 3
+	{ 24, 175, FSL_SRDS_BANK_4 },
+	{ 25, 176, FSL_SRDS_BANK_4 },
+#endif
 };
 
 int serdes_get_lane_idx(int lane)
-- 
1.7.9.5




More information about the U-Boot mailing list