From: Wolfgang Denk Date: Fri, 12 Aug 2005 21:15:53 +0000 (+0200) Subject: Preserve PHY_BMCR during a soft reset. X-Git-Tag: LABEL_2006_03_12_0025~226^2~7 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=f89920c3e4be1528ceb5b645d8aaf19968275609;p=u-boot Preserve PHY_BMCR during a soft reset. Patch by Carl Riechers, 24 Jun 2005 --- diff --git a/CHANGELOG b/CHANGELOG index 249905f2fb..a6c64f6444 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -2,6 +2,9 @@ Changes for U-Boot 1.1.3: ====================================================================== +* Preserve PHY_BMCR during a soft reset. + Patch by Carl Riechers, 24 Jun 2005 + * VoiceBlue update: eeprom tool can also store firmware version now. eeprom.bin is runable by jumping at load address. Patch by Ladislav Michl, 23 May 2005 diff --git a/common/miiphyutil.c b/common/miiphyutil.c index 2b0dcf4f2c..13b9c65dc8 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