From: Sandeep Paulraj Date: Tue, 28 Dec 2010 19:37:33 +0000 (-0500) Subject: DaVinci EMAC: Fix davinci_eth_gigabit_enable X-Git-Tag: v2011.03-rc1~2^2~17 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=4b9b9e7c665bfcff43bc720b579b6b03a5078736;p=u-boot DaVinci EMAC: Fix davinci_eth_gigabit_enable 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 Signed-off-by: Sandeep Paulraj --- diff --git a/drivers/net/davinci_emac.c b/drivers/net/davinci_emac.c index 56cd2aaf49..2642a5aaf0 100644 --- a/drivers/net/davinci_emac.c +++ b/drivers/net/davinci_emac.c @@ -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); } } }