diff options
author | Vipin Kumar <vipin.kumar@st.com> | 2012-05-07 13:06:44 +0530 |
---|---|---|
committer | Albert ARIBAUD <albert.u.boot@aribaud.net> | 2012-07-07 14:07:40 +0200 |
commit | 9afc1af01f2d4b033e0da5df105b399949976a12 (patch) | |
tree | f0df7ec6f543b2c6f2d0baad645cec5f96c2c289 /board/spear/spear310 | |
parent | 8eb0ee6a649d09a41155bf6c9dbd4d531ed41f9e (diff) | |
download | u-boot-imx-9afc1af01f2d4b033e0da5df105b399949976a12.zip u-boot-imx-9afc1af01f2d4b033e0da5df105b399949976a12.tar.gz u-boot-imx-9afc1af01f2d4b033e0da5df105b399949976a12.tar.bz2 |
SPEAr: Add interface information in initialization
Few Designware peripheral registers need to be modified based on the
ethernet interface selected by the board. This patch supports interface
information in ethernet driver
Signed-off-by: Vipin Kumar <vipin.kumar@st.com>
Signed-off-by: Amit Virdi <amit.virdi@st.com>
Signed-off-by: Stefan Roese <sr@denx.de>
Diffstat (limited to 'board/spear/spear310')
-rw-r--r-- | board/spear/spear310/spear310.c | 23 |
1 files changed, 13 insertions, 10 deletions
diff --git a/board/spear/spear310/spear310.c b/board/spear/spear310/spear310.c index c0e6829..8609a59 100644 --- a/board/spear/spear310/spear310.c +++ b/board/spear/spear310/spear310.c @@ -23,6 +23,7 @@ */ #include <common.h> +#include <miiphy.h> #include <netdev.h> #include <nand.h> #include <asm/io.h> @@ -68,25 +69,27 @@ int board_eth_init(bd_t *bis) int ret = 0; #if defined(CONFIG_DESIGNWARE_ETH) - if (designware_initialize(0, CONFIG_SPEAR_ETHBASE, CONFIG_DW0_PHY) < 0) - ret += -1; + u32 interface = PHY_INTERFACE_MODE_MII; + if (designware_initialize(0, CONFIG_SPEAR_ETHBASE, CONFIG_DW0_PHY, + interface) >= 0) + ret++; #endif #if defined(CONFIG_MACB) if (macb_eth_initialize(0, (void *)CONFIG_SYS_MACB0_BASE, - CONFIG_MACB0_PHY) < 0) - ret += -1; + CONFIG_MACB0_PHY) >= 0) + ret++; if (macb_eth_initialize(1, (void *)CONFIG_SYS_MACB1_BASE, - CONFIG_MACB1_PHY) < 0) - ret += -1; + CONFIG_MACB1_PHY) >= 0) + ret++; if (macb_eth_initialize(2, (void *)CONFIG_SYS_MACB2_BASE, - CONFIG_MACB2_PHY) < 0) - ret += -1; + CONFIG_MACB2_PHY) >= 0) + ret++; if (macb_eth_initialize(3, (void *)CONFIG_SYS_MACB3_BASE, - CONFIG_MACB3_PHY) < 0) - ret += -1; + CONFIG_MACB3_PHY) >= 0) + ret++; #endif return ret; } |