[U-Boot] [PATCH] DaVinci EMAC: Fix davinci_eth_gigabit_enable
s-paulraj at ti.com
s-paulraj at ti.com
Tue Dec 28 20:38:02 CET 2010
From: Sandeep Paulraj <s-paulraj at ti.com>
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 at ti.com>
Signed-off-by: Sandeep Paulraj <s-paulraj at ti.com>
---
drivers/net/davinci_emac.c | 7 ++++---
1 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/drivers/net/davinci_emac.c b/drivers/net/davinci_emac.c
index 43a3d79..9371d96 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);
}
}
}
--
1.6.0.4
More information about the U-Boot
mailing list