[U-Boot-Users] [PATCH 3/3] 83xx: initialize serdes for MPC837XRDB boards

Anton Vorontsov avorontsov at ru.mvista.com
Fri Mar 7 16:07:46 CET 2008


MPC8377ERDB is special, second serdes should be configured
for PEX (x1).

Signed-off-by: Anton Vorontsov <avorontsov at ru.mvista.com>
---
 Makefile                                  |    7 +++++++
 board/freescale/mpc837xerdb/mpc837xerdb.c |    2 ++
 include/configs/MPC837XERDB.h             |   19 +++++++++++++++++++
 3 files changed, 28 insertions(+), 0 deletions(-)

diff --git a/Makefile b/Makefile
index b464c72..c88344d 100644
--- a/Makefile
+++ b/Makefile
@@ -2087,7 +2087,14 @@ MPC837XEMDS_HOST_config:	unconfig
 	fi ;
 	@$(MKCONFIG) -a MPC837XEMDS ppc mpc83xx mpc837xemds freescale
 
+MPC8377ERDB_config \
 MPC837XERDB_config:	unconfig
+	@mkdir -p $(obj)include
+	@echo "" >$(obj)include/config.h ; \
+	if [ "$(findstring MPC8377ERDB,$@)" ] ; then \
+		$(XECHO) -n "... MPC8377ERDB " ; \
+		echo "#define CONFIG_MPC8377ERDB" >>$(obj)include/config.h ; \
+	fi ;
 	@$(MKCONFIG) -a MPC837XERDB ppc mpc83xx mpc837xerdb freescale
 
 sbc8349_config:		unconfig
diff --git a/board/freescale/mpc837xerdb/mpc837xerdb.c b/board/freescale/mpc837xerdb/mpc837xerdb.c
index 2d42595..2dd0fa7 100644
--- a/board/freescale/mpc837xerdb/mpc837xerdb.c
+++ b/board/freescale/mpc837xerdb/mpc837xerdb.c
@@ -19,6 +19,7 @@
 #if defined(CONFIG_SPD_EEPROM)
 #include <spd_sdram.h>
 #endif
+#include <fsl_serdes.h>
 
 #if defined(CFG_DRAM_TEST)
 int
@@ -61,6 +62,7 @@ testdram(void)
 
 int board_early_init_f(void)
 {
+	fsl_setup_serdes();
 	return 0;
 }
 
diff --git a/include/configs/MPC837XERDB.h b/include/configs/MPC837XERDB.h
index 7c19d1e..8b9d028 100644
--- a/include/configs/MPC837XERDB.h
+++ b/include/configs/MPC837XERDB.h
@@ -32,6 +32,8 @@
 
 #define CONFIG_PCI	1
 
+#define CONFIG_BOARD_EARLY_INIT_F
+
 /*
  * System Clock Setup
  */
@@ -296,6 +298,23 @@
 #define CFG_NS16550_COM1	(CFG_IMMR+0x4500)
 #define CFG_NS16550_COM2	(CFG_IMMR+0x4600)
 
+/*
+ * SERDES
+ */
+#define CONFIG_FSL_SERDES
+#define CONFIG_FSL_SERDES1		(CFG_IMMR + 0xe3000)
+#define CONFIG_FSL_SERDES1_PROTO	FSL_SERDES_PROTO_SATA
+#define CONFIG_FSL_SERDES1_CLK		FSL_SERDES_CLK_100
+#define CONFIG_FSL_SERDES1_VDD_1V	1
+#define CONFIG_FSL_SERDES2		(CFG_IMMR + 0xe3100)
+#ifdef CONFIG_MPC8377ERDB
+#define CONFIG_FSL_SERDES2_PROTO	FSL_SERDES_PROTO_PEX
+#else
+#define CONFIG_FSL_SERDES2_PROTO	FSL_SERDES_PROTO_SATA
+#endif
+#define CONFIG_FSL_SERDES2_CLK		FSL_SERDES_CLK_100
+#define CONFIG_FSL_SERDES2_VDD_1V	1
+
 /* Use the HUSH parser */
 #define CFG_HUSH_PARSER
 #ifdef	CFG_HUSH_PARSER
-- 
1.5.2.2




More information about the U-Boot mailing list