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 <abrod...@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 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 <abrod...@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 <abrod...@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 + -- 2.5.0 _______________________________________________ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel