From d7ad2b760b12e24d15a45e91fce09d2d706b0c19 Mon Sep 17 00:00:00 2001 From: Max Krummenacher Date: Wed, 29 Oct 2014 22:05:08 +0100 Subject: apalis_imx6.c: divide enet reset from pinmuxing --- board/toradex/apalis_imx6/apalis_imx6.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/board/toradex/apalis_imx6/apalis_imx6.c b/board/toradex/apalis_imx6/apalis_imx6.c index ae09cb2041..d095a41f13 100644 --- a/board/toradex/apalis_imx6/apalis_imx6.c +++ b/board/toradex/apalis_imx6/apalis_imx6.c @@ -247,11 +247,16 @@ iomux_v3_cfg_t const enet_pads[] = { static void setup_iomux_enet(void) { imx_iomux_v3_setup_multiple_pads(enet_pads, ARRAY_SIZE(enet_pads)); +} +static int reset_enet_phy (struct mii_dev *bus) +{ /* Reset KSZ9031 PHY */ gpio_direction_output(GPIO_ENET_PHY_RESET, 0); mdelay(10); gpio_set_value(GPIO_ENET_PHY_RESET, 1); + + return 0; } iomux_v3_cfg_t const usb_pads[] = { @@ -409,6 +414,7 @@ int board_eth_init(bd_t *bis) bus = fec_get_miibus(base, -1); if (!bus) return 0; + bus->reset = reset_enet_phy; /* scan phy 4,5,6,7 */ phydev = phy_find_by_mask(bus, (0xf << 4), PHY_INTERFACE_MODE_RGMII); if (!phydev) { -- cgit v1.2.3