aboutsummaryrefslogtreecommitdiffstats
path: root/board/freescale
diff options
context:
space:
mode:
authorAnton Vorontsov <avorontsov@ru.mvista.com>2008-03-24 17:40:43 +0300
committerKim Phillips <kim.phillips@freescale.com>2008-03-25 19:16:45 -0500
commit2bd7460e9283ec98565189b3cdbcfb2bcdcdd635 (patch)
tree73d485ae9d19e48e6ef4d8128caeddd0835ad3c6 /board/freescale
parent453316a2a19642d8afcbca7452e40a6b44a197b1 (diff)
downloadu-boot-midas-2bd7460e9283ec98565189b3cdbcfb2bcdcdd635.tar.gz
u-boot-midas-2bd7460e9283ec98565189b3cdbcfb2bcdcdd635.tar.bz2
u-boot-midas-2bd7460e9283ec98565189b3cdbcfb2bcdcdd635.zip
83xx: initialize serdes for MPC837XRDB boards
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>
Diffstat (limited to 'board/freescale')
-rw-r--r--board/freescale/mpc837xerdb/mpc837xerdb.c37
1 files changed, 37 insertions, 0 deletions
diff --git a/board/freescale/mpc837xerdb/mpc837xerdb.c b/board/freescale/mpc837xerdb/mpc837xerdb.c
index a3b20b8f95..d091538058 100644
--- a/board/freescale/mpc837xerdb/mpc837xerdb.c
+++ b/board/freescale/mpc837xerdb/mpc837xerdb.c
@@ -15,6 +15,7 @@
#include <common.h>
#include <i2c.h>
#include <asm/io.h>
+#include <asm/fsl_serdes.h>
#include <spd_sdram.h>
#include <vsc7385.h>
@@ -132,6 +133,42 @@ int checkboard(void)
return 0;
}
+int board_early_init_f(void)
+{
+#ifdef CONFIG_FSL_SERDES
+ immap_t *immr = (immap_t *)CFG_IMMR;
+ u32 spridr = in_be32(&immr->sysconf.spridr);
+
+ /* we check only part num, and don't look for CPU revisions */
+ switch (spridr >> 16) {
+ case SPR_8379E_REV10 >> 16:
+ case SPR_8379_REV10 >> 16:
+ fsl_setup_serdes(CONFIG_FSL_SERDES1, FSL_SERDES_PROTO_SATA,
+ FSL_SERDES_CLK_100, FSL_SERDES_VDD_1V);
+ fsl_setup_serdes(CONFIG_FSL_SERDES2, FSL_SERDES_PROTO_SATA,
+ FSL_SERDES_CLK_100, FSL_SERDES_VDD_1V);
+ break;
+ case SPR_8378E_REV10 >> 16:
+ case SPR_8378_REV10 >> 16:
+ fsl_setup_serdes(CONFIG_FSL_SERDES1, FSL_SERDES_PROTO_PEX,
+ FSL_SERDES_CLK_100, FSL_SERDES_VDD_1V);
+ break;
+ case SPR_8377E_REV10 >> 16:
+ case SPR_8377_REV10 >> 16:
+ fsl_setup_serdes(CONFIG_FSL_SERDES1, FSL_SERDES_PROTO_SATA,
+ FSL_SERDES_CLK_100, FSL_SERDES_VDD_1V);
+ fsl_setup_serdes(CONFIG_FSL_SERDES2, FSL_SERDES_PROTO_PEX,
+ FSL_SERDES_CLK_100, FSL_SERDES_VDD_1V);
+ break;
+ default:
+ printf("serdes not configured: unknown CPU part number: "
+ "%04x\n", spridr >> 16);
+ break;
+ }
+#endif /* CONFIG_FSL_SERDES */
+ return 0;
+}
+
/*
* Miscellaneous late-boot configurations
*