public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Anton Vorontsov <avorontsov@ru.mvista.com>
To: u-boot@lists.denx.de
Subject: [U-Boot-Users] [PATCH 4/7] 83xx: initialize serdes for MPC837XRDB boards
Date: Fri, 14 Mar 2008 23:19:50 +0300	[thread overview]
Message-ID: <20080314201950.GD22581@localhost.localdomain> (raw)

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@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

             reply	other threads:[~2008-03-14 20:19 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-03-14 20:19 Anton Vorontsov [this message]
2008-03-20  1:20 ` [U-Boot-Users] [PATCH 4/7] 83xx: initialize serdes for MPC837XRDB boards Kim Phillips

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20080314201950.GD22581@localhost.localdomain \
    --to=avorontsov@ru.mvista.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox