]> git.kernelconcepts.de Git - karo-tx-uboot.git/commitdiff
DaVinci EMAC: Fix davinci_eth_gigabit_enable
authorSandeep Paulraj <s-paulraj@ti.com>
Tue, 28 Dec 2010 19:37:33 +0000 (14:37 -0500)
committerAlbert Aribaud <albert.aribaud@free.fr>
Tue, 1 Feb 2011 23:54:44 +0000 (00:54 +0100)
Enabling the gigabit was overwriting the
previous configuration by setting up only GIGAFORCE and
GIG bits of MAC control register.
Modified to retain previous configuration while
gigabit enabling.

Signed-off-by: Prakash PM <prakash.pm@ti.com>
Signed-off-by: Sandeep Paulraj <s-paulraj@ti.com>
drivers/net/davinci_emac.c

index 56cd2aaf492b63cfeeb6e9bd8631c9d3dc847862..2642a5aaf0d71738697a0c9231f7cad96bb1eb71 100644 (file)
@@ -322,9 +322,10 @@ static void  __attribute__((unused)) davinci_eth_gigabit_enable(void)
                         * Check if link detected is giga-bit
                         * If Gigabit mode detected, enable gigbit in MAC
                         */
-                       writel(EMAC_MACCONTROL_GIGFORCE |
-                              EMAC_MACCONTROL_GIGABIT_ENABLE,
-                              &adap_emac->MACCONTROL);
+                       writel(readl(&adap_emac->MACCONTROL) |
+                               EMAC_MACCONTROL_GIGFORCE |
+                               EMAC_MACCONTROL_GIGABIT_ENABLE,
+                               &adap_emac->MACCONTROL);
                }
        }
 }