summaryrefslogtreecommitdiffstats
path: root/drivers/net/ftmac100.c
diff options
context:
space:
mode:
authorrick <rick@andestech.com>2017-08-29 10:15:05 +0800
committerAndes <uboot@andestech.com>2017-09-21 10:30:22 +0800
commit1341494c7db46f4e4db59f7bb797c9ab79f4c51b (patch)
tree7c189a307dd0e830f56305a0ee57121974277c6a /drivers/net/ftmac100.c
parente336b73d8ae06dbcc532d1833d7a5567babecca8 (diff)
downloadu-boot-1341494c7db46f4e4db59f7bb797c9ab79f4c51b.tar.gz
u-boot-1341494c7db46f4e4db59f7bb797c9ab79f4c51b.tar.xz
u-boot-1341494c7db46f4e4db59f7bb797c9ab79f4c51b.zip
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>
Diffstat (limited to 'drivers/net/ftmac100.c')
-rw-r--r--drivers/net/ftmac100.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/net/ftmac100.c b/drivers/net/ftmac100.c
index 4e45f00b3d..e64bf3d651 100644
--- a/drivers/net/ftmac100.c
+++ b/drivers/net/ftmac100.c
@@ -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);
}
/*