]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
nds32: ftmac100: Fix write mac addr fail problem.
authorrick <rick@andestech.com>
Tue, 29 Aug 2017 02:15:05 +0000 (10:15 +0800)
committerAndes <uboot@andestech.com>
Thu, 21 Sep 2017 02:30:22 +0000 (10:30 +0800)
After soft reset complete, write mac address immediately will fail.
Add delay to work around this problem.

Signed-off-by: rick <rick@andestech.com>
drivers/net/ftmac100.c

index 4e45f00b3d28d287e24b396ab57f26c792ab8d98..e64bf3d6513561ce0b3d86c4df814a4e7e33a0f8 100644 (file)
@@ -40,7 +40,12 @@ static void ftmac100_reset(struct ftmac100_data *priv)
        writel (FTMAC100_MACCR_SW_RST, &ftmac100->maccr);
 
        while (readl (&ftmac100->maccr) & FTMAC100_MACCR_SW_RST)
-               ;
+               mdelay(1);
+       /*
+        * When soft reset complete, write mac address immediately maybe fail somehow
+        *  Wait for a while can avoid this problem
+        */
+       mdelay(1);
 }
 
 /*