Skip to content
Snippets Groups Projects
Commit b6090098 authored by Prabhakar Lad's avatar Prabhakar Lad Committed by Albert ARIBAUD
Browse files

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 dc02bada
davinci emac initilazed one less than the number of phy count.

Signed-off-by: default avatarPrabhakar Lad <prabhakar.csengg@gmail.com>
Acked-by: default avatarHeiko Schocher <hs@denx.de>
parent 5cb939fb
No related branches found
No related tags found
No related merge requests found
......@@ -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",
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment