Patchwork [U-Boot,2/5,v2] altera_tse: Fix SGDMA reset triggering

login
register
mail settings
Submitter Joachim Foerster
Date Oct. 26, 2011, 8:39 a.m.
Message ID <1319618398-1878-3-git-send-email-joachim.foerster@missinglinkelectronics.com>
Download mbox | patch
Permalink /patch/121856/
State Accepted
Headers show

Comments

Joachim Foerster - Oct. 26, 2011, 8:39 a.m.
The SW_RESET needs to be set instead of being masked out!

Signed-off-by: Joachim Foerster <joachim.foerster@missinglinkelectronics.com>
---
Changes for v2:
	- Remove period from end of summary line
	- Be more specific in commit message

 drivers/net/altera_tse.c |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)
Wolfgang Denk - Oct. 26, 2011, 7:27 p.m.
Dear Joachim Foerster,

In message <1319618398-1878-3-git-send-email-joachim.foerster@missinglinkelectronics.com> you wrote:
> The SW_RESET needs to be set instead of being masked out!
> 
> Signed-off-by: Joachim Foerster <joachim.foerster@missinglinkelectronics.com>
> ---
> Changes for v2:
> 	- Remove period from end of summary line
> 	- Be more specific in commit message
> 
>  drivers/net/altera_tse.c |    8 ++++----
>  1 files changed, 4 insertions(+), 4 deletions(-)

Applied, thanks.

Best regards,

Wolfgang Denk

Patch

diff --git a/drivers/net/altera_tse.c b/drivers/net/altera_tse.c
index 47d0047..47b5761 100644
--- a/drivers/net/altera_tse.c
+++ b/drivers/net/altera_tse.c
@@ -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;