Fix dm9161.c initialization
authorWolfgang Denk <wd@pollux.denx.de>
Tue, 4 Oct 2005 23:54:04 +0000 (01:54 +0200)
committerWolfgang Denk <wd@pollux.denx.de>
Tue, 4 Oct 2005 23:54:04 +0000 (01:54 +0200)
Patch by Anders Larsen, 29 Apr 2005

CHANGELOG
cpu/arm920t/at91rm9200/dm9161.c

index 6d0ef81..af39df8 100644 (file)
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -2,6 +2,9 @@
 Changes for U-Boot 1.1.4:
 ======================================================================
 
+* Fix dm9161.c initialization
+  Patch by Anders Larsen, 29 Apr 2005
+
 * Fix problems introduced by Patch by Steven Scholz, 02 Mar 2005
   (8e2be51de8dd03c1ce4d06cbb18ad06133d47cd5)
 
index 19f85de..4b13c23 100644 (file)
@@ -138,9 +138,9 @@ UCHAR dm9161_InitPhy (AT91PS_EMAC p_mac)
 
        /* Disable PHY Interrupts */
        at91rm9200_EmacReadPhy (p_mac, DM9161_MDINTR, &IntValue);
-       /* clear FDX, SPD, Link, INTR masks */
-       IntValue &= ~(DM9161_FDX_MASK | DM9161_SPD_MASK |
-                     DM9161_LINK_MASK | DM9161_INTR_MASK);
+       /* set FDX, SPD, Link, INTR masks */
+       IntValue |= (DM9161_FDX_MASK | DM9161_SPD_MASK |
+                    DM9161_LINK_MASK | DM9161_INTR_MASK);
        at91rm9200_EmacWritePhy (p_mac, DM9161_MDINTR, &IntValue);
        at91rm9200_EmacDisableMDIO (p_mac);
 
@@ -190,6 +190,7 @@ UCHAR dm9161_AutoNegotiate (AT91PS_EMAC p_mac, int *status)
                return FALSE;
        /* Restart Auto_negotiation  */
        value |= DM9161_RESTART_AUTONEG;
+       value &= ~DM9161_ISOLATE;
        if (!at91rm9200_EmacWritePhy (p_mac, DM9161_BMCR, &value))
                return FALSE;