diff options
author | Wolfgang Denk <wd@denx.de> | 2008-04-07 23:59:10 +0200 |
---|---|---|
committer | Wolfgang Denk <wd@denx.de> | 2008-04-07 23:59:10 +0200 |
commit | e59af4b611408adcdfb5e19bc5194a7d1f8b4dc3 (patch) | |
tree | e700a523f54c5ed18bf15f832158f90a31517c85 /board/freescale/mpc837xemds/mpc837xemds.c | |
parent | 23c5189e6c969255f8c91b30fdf1cf81b698329d (diff) | |
parent | 70431e8a7393b6b793f77957f95b999fc9a269b8 (diff) | |
download | u-boot-imx-e59af4b611408adcdfb5e19bc5194a7d1f8b4dc3.zip u-boot-imx-e59af4b611408adcdfb5e19bc5194a7d1f8b4dc3.tar.gz u-boot-imx-e59af4b611408adcdfb5e19bc5194a7d1f8b4dc3.tar.bz2 |
Merge branch 'master' of git://www.denx.de/git/u-boot-mpc83xx
Conflicts:
lib_ppc/board.c
Signed-off-by: Wolfgang Denk <wd@denx.de>
Diffstat (limited to 'board/freescale/mpc837xemds/mpc837xemds.c')
-rw-r--r-- | board/freescale/mpc837xemds/mpc837xemds.c | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/board/freescale/mpc837xemds/mpc837xemds.c b/board/freescale/mpc837xemds/mpc837xemds.c index e57a53f..f7cd5fe 100644 --- a/board/freescale/mpc837xemds/mpc837xemds.c +++ b/board/freescale/mpc837xemds/mpc837xemds.c @@ -12,6 +12,8 @@ #include <common.h> #include <i2c.h> +#include <asm/io.h> +#include <asm/fsl_serdes.h> #include <spd_sdram.h> #if defined(CONFIG_OF_LIBFDT) #include <libfdt.h> @@ -29,6 +31,34 @@ int board_early_init_f(void) /* Clear all of the interrupt of BCSR */ bcsr[0xe] = 0xff; +#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) { + case SPR_8377: + 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; + case SPR_8378: + fsl_setup_serdes(CONFIG_FSL_SERDES1, FSL_SERDES_PROTO_PEX, + FSL_SERDES_CLK_100, FSL_SERDES_VDD_1V); + break; + case SPR_8379: + 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; + default: + printf("serdes not configured: unknown CPU part number: " + "%04x\n", spridr >> 16); + break; + } +#endif /* CONFIG_FSL_SERDES */ return 0; } |