summaryrefslogtreecommitdiffstats
path: root/board/freescale/p1_p2_rdb
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/p1_p2_rdb
parent5d27e02c04f8fef38341e58475a988f8b2c78b9f (diff)
downloadblackbird-obmc-uboot-058d7dc7ba28a45ae6bb7f6ef12b978b31584406.tar.gz
blackbird-obmc-uboot-058d7dc7ba28a45ae6bb7f6ef12b978b31584406.zip
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/p1_p2_rdb')
-rw-r--r--board/freescale/p1_p2_rdb/p1_p2_rdb.c8
-rw-r--r--board/freescale/p1_p2_rdb/pci.c3
2 files changed, 4 insertions, 7 deletions
diff --git a/board/freescale/p1_p2_rdb/p1_p2_rdb.c b/board/freescale/p1_p2_rdb/p1_p2_rdb.c
index 1c4c0200e8..440fcb924a 100644
--- a/board/freescale/p1_p2_rdb/p1_p2_rdb.c
+++ b/board/freescale/p1_p2_rdb/p1_p2_rdb.c
@@ -26,6 +26,7 @@
#include <asm/mmu.h>
#include <asm/cache.h>
#include <asm/immap_85xx.h>
+#include <asm/fsl_serdes.h>
#include <asm/io.h>
#include <miiphy.h>
#include <libfdt.h>
@@ -166,10 +167,8 @@ int board_early_init_r(void)
int board_eth_init(bd_t *bis)
{
struct tsec_info_struct tsec_info[4];
- volatile ccsr_gur_t *gur = (void *)(CONFIG_SYS_MPC85xx_GUTS_ADDR);
int num = 0;
char *tmp;
- u32 pordevsr;
unsigned int vscfw_addr;
#ifdef CONFIG_TSEC1
@@ -182,9 +181,10 @@ int board_eth_init(bd_t *bis)
#endif
#ifdef CONFIG_TSEC3
SET_STD_TSEC_INFO(tsec_info[num], 3);
- pordevsr = in_be32(&gur->pordevsr);
- if (!(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
if (!num) {
diff --git a/board/freescale/p1_p2_rdb/pci.c b/board/freescale/p1_p2_rdb/pci.c
index e95431b7a3..2034459b66 100644
--- a/board/freescale/p1_p2_rdb/pci.c
+++ b/board/freescale/p1_p2_rdb/pci.c
@@ -53,9 +53,6 @@ void pci_init_board(void)
devdisr = in_be32(&gur->devdisr);
pordevsr = in_be32(&gur->pordevsr);
- if (!(pordevsr & MPC85xx_PORDEVSR_SGMII2_DIS))
- printf("eTSEC2 is in sgmii mode.\n");
-
puts("\n");
#ifdef CONFIG_PCIE2
pcie_configured = is_serdes_configured(PCIE2);
OpenPOWER on IntegriCloud