diff mbox

[OpenWrt-Devel] arc770/axs101: accomodate DW GMAC long reset sequence

Message ID 1448268345-31698-1-git-send-email-abrodkin@synopsys.com
State Rejected
Headers show

Commit Message

Alexey Brodkin Nov. 23, 2015, 8:45 a.m. UTC
On ARC SDP board DMA block of DW GMAC gets out of reset much
longer than expected by default driver.

For now to accomodate this issue we're extending timeout value.

Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
---
 .../0003-fix-GMAC-init-by-longer-reset-wait.patch  | 45 ++++++++++++++++++++++
 1 file changed, 45 insertions(+)
 create mode 100644 target/linux/arc770/patches-4.3/0003-fix-GMAC-init-by-longer-reset-wait.patch

Comments

Alexey Brodkin Nov. 23, 2015, 3 p.m. UTC | #1
Hi Felix,

On Mon, 2015-11-23 at 11:45 +0300, Alexey Brodkin wrote:
> On ARC SDP board DMA block of DW GMAC gets out of reset much
> longer than expected by default driver.
> 
> For now to accomodate this issue we're extending timeout value.
> 
> Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>

Please disregard that patch.
This problem as it turned out was already fixed in hardware,
so the patch is no longer required.

-Alexey
diff mbox

Patch

diff --git a/target/linux/arc770/patches-4.3/0003-fix-GMAC-init-by-longer-reset-wait.patch b/target/linux/arc770/patches-4.3/0003-fix-GMAC-init-by-longer-reset-wait.patch
new file mode 100644
index 0000000..8bab11d
--- /dev/null
+++ b/target/linux/arc770/patches-4.3/0003-fix-GMAC-init-by-longer-reset-wait.patch
@@ -0,0 +1,45 @@ 
+From ed78bec3722022f6622f1810111f43e5e752baf6 Mon Sep 17 00:00:00 2001
+From: Alexey Brodkin <abrodkin@synopsys.com>
+Date: Mon, 16 Nov 2015 23:15:54 +0300
+Subject: [PATCH] fix GMAC init by longer reset wait
+
+On ARC SDP board DMA block of DW GMAC gets out of reset much
+longer than expected by default driver.
+
+For now to accomodate this issue we're extending timeout value.
+
+Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
+---
+ drivers/net/ethernet/stmicro/stmmac/dwmac1000_dma.c | 2 +-
+ drivers/net/ethernet/stmicro/stmmac/dwmac100_dma.c  | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac1000_dma.c b/drivers/net/ethernet/stmicro/stmmac/dwmac1000_dma.c
+index 0e8937c..f29cf5b 100644
+--- a/drivers/net/ethernet/stmicro/stmmac/dwmac1000_dma.c
++++ b/drivers/net/ethernet/stmicro/stmmac/dwmac1000_dma.c
+@@ -39,7 +39,7 @@ static int dwmac1000_dma_init(void __iomem *ioaddr, int pbl, int fb, int mb,
+ 	/* DMA SW reset */
+ 	value |= DMA_BUS_MODE_SFT_RESET;
+ 	writel(value, ioaddr + DMA_BUS_MODE);
+-	limit = 10;
++	limit = 1000;
+ 	while (limit--) {
+ 		if (!(readl(ioaddr + DMA_BUS_MODE) & DMA_BUS_MODE_SFT_RESET))
+ 			break;
+diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac100_dma.c b/drivers/net/ethernet/stmicro/stmmac/dwmac100_dma.c
+index 9d0971c..651d94c 100644
+--- a/drivers/net/ethernet/stmicro/stmmac/dwmac100_dma.c
++++ b/drivers/net/ethernet/stmicro/stmmac/dwmac100_dma.c
+@@ -41,7 +41,7 @@ static int dwmac100_dma_init(void __iomem *ioaddr, int pbl, int fb, int mb,
+ 	/* DMA SW reset */
+ 	value |= DMA_BUS_MODE_SFT_RESET;
+ 	writel(value, ioaddr + DMA_BUS_MODE);
+-	limit = 10;
++	limit = 1000;
+ 	while (limit--) {
+ 		if (!(readl(ioaddr + DMA_BUS_MODE) & DMA_BUS_MODE_SFT_RESET))
+ 			break;
+-- 
+2.5.0
+