* [U-Boot-Users] [PATCH 4/7] 83xx: initialize serdes for MPC837XRDB boards
@ 2008-03-14 20:19 Anton Vorontsov
2008-03-20 1:20 ` Kim Phillips
0 siblings, 1 reply; 2+ messages in thread
From: Anton Vorontsov @ 2008-03-14 20:19 UTC (permalink / raw)
To: u-boot
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
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [U-Boot-Users] [PATCH 4/7] 83xx: initialize serdes for MPC837XRDB boards
2008-03-14 20:19 [U-Boot-Users] [PATCH 4/7] 83xx: initialize serdes for MPC837XRDB boards Anton Vorontsov
@ 2008-03-20 1:20 ` Kim Phillips
0 siblings, 0 replies; 2+ messages in thread
From: Kim Phillips @ 2008-03-20 1:20 UTC (permalink / raw)
To: u-boot
On Fri, 14 Mar 2008 23:19:50 +0300
Anton Vorontsov <avorontsov@ru.mvista.com> wrote:
> 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
can't we get this info dynamically from the SVR instead?
Kim
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2008-03-20 1:20 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-03-14 20:19 [U-Boot-Users] [PATCH 4/7] 83xx: initialize serdes for MPC837XRDB boards Anton Vorontsov
2008-03-20 1:20 ` Kim Phillips
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox