]> git.sur5r.net Git - u-boot/commitdiff
altera_tse: Fix SGDMA reset triggering
authorJoachim Foerster <joachim.foerster@missinglinkelectronics.com>
Mon, 17 Oct 2011 05:24:43 +0000 (05:24 +0000)
committerWolfgang Denk <wd@denx.de>
Wed, 26 Oct 2011 19:26:48 +0000 (21:26 +0200)
The SW_RESET needs to be set instead of being masked out!

Signed-off-by: Joachim Foerster <joachim.foerster@missinglinkelectronics.com>
drivers/net/altera_tse.c

index 47d0047fd6fc572bb78dff6e34ba4c5e6cb0f1e2..47b57616d91051877bae969618fde724a1e6455c 100644 (file)
@@ -357,8 +357,8 @@ static void tse_eth_reset(struct eth_device *dev)
 
        if (counter >= ALT_TSE_SGDMA_BUSY_WATCHDOG_CNTR) {
                debug("Timeout waiting for rx sgdma!\n");
-               rx_sgdma->control &= ALT_SGDMA_CONTROL_SOFTWARERESET_MSK;
-               rx_sgdma->control &= ALT_SGDMA_CONTROL_SOFTWARERESET_MSK;
+               rx_sgdma->control = ALT_SGDMA_CONTROL_SOFTWARERESET_MSK;
+               rx_sgdma->control = ALT_SGDMA_CONTROL_SOFTWARERESET_MSK;
        }
 
        counter = 0;
@@ -370,8 +370,8 @@ static void tse_eth_reset(struct eth_device *dev)
 
        if (counter >= ALT_TSE_SGDMA_BUSY_WATCHDOG_CNTR) {
                debug("Timeout waiting for tx sgdma!\n");
-               tx_sgdma->control &= ALT_SGDMA_CONTROL_SOFTWARERESET_MSK;
-               tx_sgdma->control &= ALT_SGDMA_CONTROL_SOFTWARERESET_MSK;
+               tx_sgdma->control = ALT_SGDMA_CONTROL_SOFTWARERESET_MSK;
+               tx_sgdma->control = ALT_SGDMA_CONTROL_SOFTWARERESET_MSK;
        }
        /* reset the mac */
        mac_dev->command_config.bits.transmit_enable = 1;