summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPrabhakar Lad <prabhakar.csengg@gmail.com>2011-11-17 02:53:23 +0000
committerAlbert ARIBAUD <albert.u.boot@aribaud.net>2011-12-06 23:59:37 +0100
commitb609009801b8a00644926f49b7d0d0cc0d3d8797 (patch)
treea28c1b84228e190be72a5cc2cda03658005427e1
parent5cb939fb04a3d5f2ca1174a367a3fc27aed30c6a (diff)
downloadu-boot-imx-b609009801b8a00644926f49b7d0d0cc0d3d8797.zip
u-boot-imx-b609009801b8a00644926f49b7d0d0cc0d3d8797.tar.gz
u-boot-imx-b609009801b8a00644926f49b7d0d0cc0d3d8797.tar.bz2
ARM: davici_emac: Fix condition for number of phy detects
Fix the condition for number of phys in davinci_eth_phy_detect() function. CONFIG_SYS_DAVINCI_EMAC_PHY_COUNT indicates number of phys. From this commit id dc02badab480563b0bf9d3908046ea9d6b22ae63 davinci emac initilazed one less than the number of phy count. Signed-off-by: Prabhakar Lad <prabhakar.csengg@gmail.com> Acked-by: Heiko Schocher <hs@denx.de>
-rw-r--r--drivers/net/davinci_emac.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/davinci_emac.c b/drivers/net/davinci_emac.c
index d6c4e63..fbd0f1b 100644
--- a/drivers/net/davinci_emac.c
+++ b/drivers/net/davinci_emac.c
@@ -220,7 +220,7 @@ static int davinci_eth_phy_detect(void)
for (i = 0, j = 0; i < 32; i++)
if (phy_act_state & (1 << i)) {
count++;
- if (count < CONFIG_SYS_DAVINCI_EMAC_PHY_COUNT) {
+ if (count <= CONFIG_SYS_DAVINCI_EMAC_PHY_COUNT) {
active_phy_addr[j++] = i;
} else {
printf("%s: to many PHYs detected.\n",