summaryrefslogtreecommitdiff
path: root/board/freescale/mpc837xemds/mpc837xemds.c
diff options
context:
space:
mode:
Diffstat (limited to 'board/freescale/mpc837xemds/mpc837xemds.c')
-rw-r--r--board/freescale/mpc837xemds/mpc837xemds.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/board/freescale/mpc837xemds/mpc837xemds.c b/board/freescale/mpc837xemds/mpc837xemds.c
index 51dd692..650a4fe 100644
--- a/board/freescale/mpc837xemds/mpc837xemds.c
+++ b/board/freescale/mpc837xemds/mpc837xemds.c
@@ -21,6 +21,8 @@
#include <libfdt.h>
#include <fdt_support.h>
#include <fsl_esdhc.h>
+#include <fsl_mdio.h>
+#include <phy.h>
#include "pci.h"
#include "../common/pq-mds-pib.h"
@@ -86,6 +88,7 @@ int board_mmc_init(bd_t *bd)
#if defined(CONFIG_TSEC1) || defined(CONFIG_TSEC2)
int board_eth_init(bd_t *bd)
{
+ struct fsl_pq_mdio_info mdio_info;
struct tsec_info_struct tsec_info[2];
struct immap __iomem *im = (struct immap __iomem *)CONFIG_SYS_IMMR;
u32 rcwh = in_be32(&im->reset.rcwh);
@@ -131,6 +134,11 @@ int board_eth_init(bd_t *bd)
}
num++;
#endif
+
+ mdio_info.regs = (struct tsec_mii_mng *)CONFIG_SYS_MDIO_BASE_ADDR;
+ mdio_info.name = DEFAULT_MII_NAME;
+ fsl_pq_mdio_init(bd, &mdio_info);
+
return tsec_eth_init(bd, tsec_info, num);
}
@@ -148,7 +156,7 @@ static void __ft_tsec_fixup(void *blob, bd_t *bd, const char *alias,
return;
}
- err = fdt_fixup_phy_connection(blob, off, SGMII);
+ err = fdt_fixup_phy_connection(blob, off, PHY_INTERFACE_MODE_SGMII);
if (err) {
printf("WARNING: could not set phy-connection-type for %s: "