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

Anton Vorontsov avorontsov at ru.mvista.com
Fri Mar 14 21:19:50 CET 2008


On the MPC8377ERDB: 2 SATA and 2 PCI-E.
On the MPC8378ERDB: 2 PCI-E
On the MPC8379ERDB: 4 SATA

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

diff --git a/MAKEALL b/MAKEALL
index 0e1c0cb..65f0626 100755
--- a/MAKEALL
+++ b/MAKEALL
@@ -323,6 +323,9 @@ LIST_83xx="		\
 	MPC8360ERDK_66	\
 	MPC837XEMDS	\
 	MPC837XERDB	\
+	MPC8377ERDB	\
+	MPC8378ERDB	\
+	MPC8379ERDB	\
 	sbc8349		\
 	TQM834x		\
 "
diff --git a/Makefile b/Makefile
index b464c72..7d112ab 100644
--- a/Makefile
+++ b/Makefile
@@ -2087,7 +2087,24 @@ MPC837XEMDS_HOST_config:	unconfig
 	fi ;
 	@$(MKCONFIG) -a MPC837XEMDS ppc mpc83xx mpc837xemds freescale
 
+MPC8377ERDB_config \
+MPC8378ERDB_config \
+MPC8379ERDB_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 ; \
+	if [ "$(findstring MPC8378ERDB,$@)" ] ; then \
+		$(XECHO) -n "... MPC8378ERDB " ; \
+		echo "#define CONFIG_MPC8378ERDB" >>$(obj)include/config.h ; \
+	fi ; \
+	if [ "$(findstring MPC8379ERDB,$@)" ] ; then \
+		$(XECHO) -n "... MPC8379ERDB " ; \
+		echo "#define CONFIG_MPC8379ERDB" >>$(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..992c9cf 100644
--- a/board/freescale/mpc837xerdb/mpc837xerdb.c
+++ b/board/freescale/mpc837xerdb/mpc837xerdb.c
@@ -16,6 +16,7 @@
 #include <i2c.h>
 #include <spd.h>
 #include <asm/io.h>
+#include <asm/fsl_serdes.h>
 #if defined(CONFIG_SPD_EEPROM)
 #include <spd_sdram.h>
 #endif
@@ -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..1a3d05f 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,30 @@
 #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)
+#ifdef CONFIG_MPC8378ERDB
+#define CONFIG_FSL_SERDES1_PROTO	FSL_SERDES_PROTO_PEX
+#else
+#define CONFIG_FSL_SERDES1_PROTO	FSL_SERDES_PROTO_SATA
+#endif /* CONFIG_MPC8378ERDB */
+#define CONFIG_FSL_SERDES1_CLK		FSL_SERDES_CLK_100
+#define CONFIG_FSL_SERDES1_VDD_1V	1
+
+#if defined(CONFIG_MPC8377ERDB) || defined(CONFIG_MPC8379ERDB)
+#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 /* CONFIG_MPC8377ERDB */
+#define CONFIG_FSL_SERDES2_CLK		FSL_SERDES_CLK_100
+#define CONFIG_FSL_SERDES2_VDD_1V	1
+#endif /* defined(CONFIG_MPC8377ERDB) || defined(CONFIG_MPC8379ERDB) */
+
 /* Use the HUSH parser */
 #define CFG_HUSH_PARSER
 #ifdef	CFG_HUSH_PARSER
-- 
1.5.2.2





More information about the U-Boot mailing list