]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
SMC911x driver fixed for NFS boot
authorManikandan Pillai <mani.pillai@ti.com>
Wed, 8 Apr 2009 03:44:35 +0000 (09:14 +0530)
committerBen Warren <biggerbadderben@gmail.com>
Tue, 9 Jun 2009 05:57:21 +0000 (22:57 -0700)
eth_halt() function in the smc911x drivers used to call the
smc911x_reset() function. eth_halt() used to be called after
tftp transfers. This used to put the ethernet chip in reset
while the linux boots up resulting in the ethernet driver
not coming up. NFS boot used to fail as a result.

This patch calls smc911x_shutdown() instead of smc911x_reset().
Some comments received has also been fixed.

Signed-off-by: Manikandan Pillai <mani.pillai@ti.com>
Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
drivers/net/smc911x.c

index 8c9a2a8a0572f0bd67d6a0163f912e5a30bf25ad..455b055a9c114cca6bc5cf7a2ce857e800b31047 100644 (file)
@@ -117,6 +117,27 @@ static int smc911x_phy_reset(void)
        return 0;
 }
 
+static void smc911x_shutdown(void)
+{
+       unsigned int 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;
@@ -225,7 +246,7 @@ int eth_send(volatile void *packet, int length)
 
 void eth_halt(void)
 {
-       smc911x_reset();
+       smc911x_shutdown();
 }
 
 int eth_rx(void)