Commit 1341494c7db46f4e4db59f7bb797c9ab79f4c51b

Authored by rick
Committed by Andes
1 parent e336b73d8a

nds32: ftmac100: Fix write mac addr fail problem.

After soft reset complete, write mac address immediately will fail.
Add delay to work around this problem.

Signed-off-by: rick <rick@andestech.com>

Showing 1 changed file with 6 additions and 1 deletions Side-by-side Diff

drivers/net/ftmac100.c
... ... @@ -40,7 +40,12 @@
40 40 writel (FTMAC100_MACCR_SW_RST, &ftmac100->maccr);
41 41  
42 42 while (readl (&ftmac100->maccr) & FTMAC100_MACCR_SW_RST)
43   - ;
  43 + mdelay(1);
  44 + /*
  45 + * When soft reset complete, write mac address immediately maybe fail somehow
  46 + * Wait for a while can avoid this problem
  47 + */
  48 + mdelay(1);
44 49 }
45 50  
46 51 /*