diff options
author | Liu Yu <yu.liu@freescale.com> | 2008-10-10 11:40:58 +0800 |
---|---|---|
committer | Wolfgang Denk <wd@denx.de> | 2008-10-18 21:54:07 +0200 |
commit | bff188baf9427c35745356439435acf3864d4c65 (patch) | |
tree | 2d3c628de7bcb2f7340250823d4d50162470ea64 /board/freescale/common | |
parent | 5e981d683d2363204c76773941c2e9c2044c808f (diff) | |
download | bootable_bootloader_goldelico_gta04-bff188baf9427c35745356439435acf3864d4c65.zip bootable_bootloader_goldelico_gta04-bff188baf9427c35745356439435acf3864d4c65.tar.gz bootable_bootloader_goldelico_gta04-bff188baf9427c35745356439435acf3864d4c65.tar.bz2 |
Make pixis_set_sgmii more general to support MPC85xx boards.
The pixis sgmii command depend on the FPGA support on the board, some 85xx
boards support SGMII riser card but did not support this command, define
CONFIG_PIXIS_SGMII_CMD for those boards which support the sgmii command.
Not like 8544, 8572 has 4 eTsec so that the other two's pixis bits
are not supported by 8544. Therefor, define PIXIS_VSPEED2_MASK and
PIXIS_VCFGEN1_MASK in header file for both boards.
Signed-off-by: Liu Yu <yu.liu@freescale.com>
Diffstat (limited to 'board/freescale/common')
-rw-r--r-- | board/freescale/common/pixis.c | 22 |
1 files changed, 19 insertions, 3 deletions
diff --git a/board/freescale/common/pixis.c b/board/freescale/common/pixis.c index de3a182..96820ac 100644 --- a/board/freescale/common/pixis.c +++ b/board/freescale/common/pixis.c @@ -283,7 +283,7 @@ U_BOOT_CMD( "diswd - Disable watchdog timer \n", NULL); -#ifdef CONFIG_FSL_SGMII_RISER +#ifdef CONFIG_PIXIS_SGMII_CMD int pixis_set_sgmii(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) { int which_tsec = -1; @@ -295,17 +295,33 @@ int pixis_set_sgmii(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) which_tsec = simple_strtoul(argv[1], NULL, 0); switch (which_tsec) { +#ifdef CONFIG_TSEC1 case 1: mask = PIXIS_VSPEED2_TSEC1SER; switch_mask = PIXIS_VCFGEN1_TSEC1SER; break; +#endif +#ifdef CONFIG_TSEC2 + case 2: + mask = PIXIS_VSPEED2_TSEC2SER; + switch_mask = PIXIS_VCFGEN1_TSEC2SER; + break; +#endif +#ifdef CONFIG_TSEC3 case 3: mask = PIXIS_VSPEED2_TSEC3SER; switch_mask = PIXIS_VCFGEN1_TSEC3SER; break; +#endif +#ifdef CONFIG_TSEC4 + case 4: + mask = PIXIS_VSPEED2_TSEC4SER; + switch_mask = PIXIS_VCFGEN1_TSEC4SER; + break; +#endif default: - mask = PIXIS_VSPEED2_TSEC1SER | PIXIS_VSPEED2_TSEC3SER; - switch_mask = PIXIS_VCFGEN1_TSEC1SER | PIXIS_VCFGEN1_TSEC3SER; + mask = PIXIS_VSPEED2_MASK; + switch_mask = PIXIS_VCFGEN1_MASK; break; } |