]> git.kernelconcepts.de Git - karo-tx-uboot.git/commitdiff
Preserve PHY_BMCR during a soft reset.
authorWolfgang Denk <wd@pollux.denx.de>
Fri, 12 Aug 2005 21:15:53 +0000 (23:15 +0200)
committerWolfgang Denk <wd@pollux.denx.de>
Fri, 12 Aug 2005 21:15:53 +0000 (23:15 +0200)
Patch by Carl Riechers, 24 Jun 2005

CHANGELOG
common/miiphyutil.c

index 249905f2fb2bb4696e2df117dc6a73dec89874f8..a6c64f6444ef84f0f8bfb122d8f9c536843699b2 100644 (file)
--- 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
index 2b0dcf4f2ce1af67d7f02f7100757dad921c85d4..13b9c65dc8771668add77b8d88c7317ae4ad1443 100644 (file)
@@ -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, &reg) != 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