diff options
author | <m8@hekate.semihalf.com> | 2005-08-16 17:34:22 +0200 |
---|---|---|
committer | <m8@hekate.semihalf.com> | 2005-08-16 17:34:22 +0200 |
commit | 22e05df45cc343eda3266312bde676737d9bc70c (patch) | |
tree | 6f2209c6675e79d000e359725872a3ba15262140 /common/miiphyutil.c | |
parent | d4f5c72896b6b47cae276f49081a801491be6838 (diff) | |
parent | 98128f389cc318dbd1d597cf8d2d09902cddcb4b (diff) | |
download | u-boot-imx-22e05df45cc343eda3266312bde676737d9bc70c.zip u-boot-imx-22e05df45cc343eda3266312bde676737d9bc70c.tar.gz u-boot-imx-22e05df45cc343eda3266312bde676737d9bc70c.tar.bz2 |
Merge with pollux.denx.org:/home/git/u-boot/.git
Diffstat (limited to 'common/miiphyutil.c')
-rw-r--r-- | common/miiphyutil.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/common/miiphyutil.c b/common/miiphyutil.c index 2b0dcf4..13b9c65 100644 --- a/common/miiphyutil.c +++ b/common/miiphyutil.c @@ -93,7 +93,13 @@ int miiphy_reset (unsigned char addr) unsigned short reg; int loop_cnt; - if (miiphy_write (addr, PHY_BMCR, 0x8000) != 0) { + if (miiphy_read (addr, PHY_BMCR, ®) != 0) { +#ifdef DEBUG + printf ("PHY status read failed\n"); +#endif + return (-1); + } + if (miiphy_write (addr, PHY_BMCR, reg | 0x8000) != 0) { #ifdef DEBUG puts ("PHY reset failed\n"); #endif |