summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndy Fleming <afleming@freescale.com>2007-05-09 00:54:20 -0500
committerAndrew Fleming-AFLEMING <afleming@freescale.com>2007-07-11 18:19:06 -0500
commit2a3cee43c3b71fa5b8d91db19f05067865290f3e (patch)
tree079dcc0e05adc820e98a8d346aac9082d10ec2f1
parentccc091aac61a38cd998d575d92f7232e256d6312 (diff)
downloadu-boot-imx-2a3cee43c3b71fa5b8d91db19f05067865290f3e.zip
u-boot-imx-2a3cee43c3b71fa5b8d91db19f05067865290f3e.tar.gz
u-boot-imx-2a3cee43c3b71fa5b8d91db19f05067865290f3e.tar.bz2
tsec: Fix PHY code to match first driver
Jarrold Wen noticed that the generic PHY code always matches under the current implementation. Change it so the first match wins, and *only* unknown PHYs trigger the generic driver Signed-off-by: Andy Fleming <afleming@freescale.com>
-rw-r--r--drivers/tsec.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/tsec.c b/drivers/tsec.c
index c19d87f..467df84 100644
--- a/drivers/tsec.c
+++ b/drivers/tsec.c
@@ -1353,8 +1353,10 @@ struct phy_info *get_phy_info(struct eth_device *dev)
/* loop through all the known PHY types, and find one that */
/* matches the ID we read from the PHY. */
for (i = 0; phy_info[i]; i++) {
- if (phy_info[i]->id == (phy_ID >> phy_info[i]->shift))
+ if (phy_info[i]->id == (phy_ID >> phy_info[i]->shift)) {
theInfo = phy_info[i];
+ break;
+ }
}
if (theInfo == NULL) {