summaryrefslogtreecommitdiff
path: root/board/freescale/mpc8544ds/mpc8544ds.c
diff options
context:
space:
mode:
authorKumar Gala <galak@kernel.crashing.org>2010-12-16 14:28:06 -0600
committerKumar Gala <galak@kernel.crashing.org>2011-01-14 01:32:19 -0600
commit058d7dc7ba28a45ae6bb7f6ef12b978b31584406 (patch)
tree324b9bf4313a7ef919c3155b098b80231b450125 /board/freescale/mpc8544ds/mpc8544ds.c
parent5d27e02c04f8fef38341e58475a988f8b2c78b9f (diff)
downloadu-boot-imx-058d7dc7ba28a45ae6bb7f6ef12b978b31584406.zip
u-boot-imx-058d7dc7ba28a45ae6bb7f6ef12b978b31584406.tar.gz
u-boot-imx-058d7dc7ba28a45ae6bb7f6ef12b978b31584406.tar.bz2
powerpc/85xx: Cleanup SGMII detection and reporting
Use new is_serdes_configured to determine if TSECs are in SGMII mode and report that on the various boards that use or can be configured in SGMII mode in board_eth_init() instead of in the PCI init code. Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
Diffstat (limited to 'board/freescale/mpc8544ds/mpc8544ds.c')
-rw-r--r--board/freescale/mpc8544ds/mpc8544ds.c20
1 files changed, 9 insertions, 11 deletions
diff --git a/board/freescale/mpc8544ds/mpc8544ds.c b/board/freescale/mpc8544ds/mpc8544ds.c
index 3285cea..2b6900c 100644
--- a/board/freescale/mpc8544ds/mpc8544ds.c
+++ b/board/freescale/mpc8544ds/mpc8544ds.c
@@ -119,12 +119,6 @@ void pci_init_board(void)
debug (" pci_init_board: devdisr=%x, io_sel=%x\n", devdisr, io_sel);
- if (io_sel & 1) {
- if (!(gur->pordevsr & MPC85xx_PORDEVSR_SGMII1_DIS))
- printf("eTSEC1 is in sgmii mode.\n");
- if (!(gur->pordevsr & MPC85xx_PORDEVSR_SGMII3_DIS))
- printf("eTSEC3 is in sgmii mode.\n");
- }
puts("\n");
#ifdef CONFIG_PCIE3
@@ -324,20 +318,22 @@ int board_eth_init(bd_t *bis)
{
#ifdef CONFIG_TSEC_ENET
struct tsec_info_struct tsec_info[2];
- volatile ccsr_gur_t *gur = (void *)(CONFIG_SYS_MPC85xx_GUTS_ADDR);
- uint io_sel = (gur->pordevsr & MPC85xx_PORDEVSR_IO_SEL) >> 19;
int num = 0;
#ifdef CONFIG_TSEC1
SET_STD_TSEC_INFO(tsec_info[num], 1);
- if (!(gur->pordevsr & MPC85xx_PORDEVSR_SGMII1_DIS))
+ if (is_serdes_configured(SGMII_TSEC1)) {
+ puts("eTSEC1 is in sgmii mode.\n");
tsec_info[num].flags |= TSEC_SGMII;
+ }
num++;
#endif
#ifdef CONFIG_TSEC3
SET_STD_TSEC_INFO(tsec_info[num], 3);
- if (!(gur->pordevsr & MPC85xx_PORDEVSR_SGMII3_DIS))
+ if (is_serdes_configured(SGMII_TSEC3)) {
+ puts("eTSEC3 is in sgmii mode.\n");
tsec_info[num].flags |= TSEC_SGMII;
+ }
num++;
#endif
@@ -347,8 +343,10 @@ int board_eth_init(bd_t *bis)
return 0;
}
- if (io_sel & 1)
+ if (is_serdes_configured(SGMII_TSEC1) ||
+ is_serdes_configured(SGMII_TSEC3)) {
fsl_sgmii_riser_init(tsec_info, num);
+ }
tsec_eth_init(bis, tsec_info, num);