summaryrefslogtreecommitdiff
path: root/recipes/u-boot/u-boot-git/omap3evm/0002-Fix-for-NFS-boot-for-OMAP3-EVM.patch
blob: 243f17572886c68f7cae5c6c41f3cb1af95cc2ac (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
From 57a0438b9f70bb3e98a20773134b17ef33e266b9 Mon Sep 17 00:00:00 2001
From: Manikandan Pillai <mani.pillai@ti.com>
Date: Tue, 7 Apr 2009 14:27:31 +0530
Subject: [PATCH 02/16] Fix for NFS boot for OMAP3 EVM

The eth_halt() function has been modified to remove the
chip reset and instead stop the transmit/receive from the device.
---
 drivers/net/smc911x.c |   23 ++++++++++++++++++++++-
 1 files changed, 22 insertions(+), 1 deletions(-)

diff --git a/drivers/net/smc911x.c b/drivers/net/smc911x.c
index 1ded8f0..2f0852e 100644
--- a/drivers/net/smc911x.c
+++ b/drivers/net/smc911x.c
@@ -116,6 +116,27 @@ static int smc911x_phy_reset(void)
 	return 0;
 }
 
+static void smc911x_shutdown(void)
+{
+	unsigned cr;
+
+	/* Turn of Rx and TX */
+	cr = smc911x_get_mac_csr(MAC_CR);
+	cr &= ~(MAC_CR_TXEN | MAC_CR_RXEN | MAC_CR_HBDIS);
+	smc911x_set_mac_csr(MAC_CR, cr);
+
+	/* Stop Transmission */
+	cr = smc911x_get_mac_csr(TX_CFG);
+	cr &= ~(TX_CFG_STOP_TX);
+	smc911x_set_mac_csr(TX_CFG, cr);
+	/* Stop receiving packets */
+	cr = smc911x_get_mac_csr(RX_CFG);
+	cr &= ~(RX_CFG_RXDOFF);
+	smc911x_set_mac_csr(RX_CFG, cr);
+
+}
+
+
 static void smc911x_phy_configure(void)
 {
 	int timeout;
@@ -224,7 +245,7 @@ int eth_send(volatile void *packet, int length)
 
 void eth_halt(void)
 {
-	smc911x_reset();
+	smc911x_shutdown();
 }
 
 int eth_rx(void)
-- 
1.6.2.4