[U-Boot] [PATCH] net: Support DMA threshold mode in DWMAC driver
Sonic Zhang
sonic.adi at gmail.com
Thu Jan 29 07:38:50 CET 2015
From: Sonic Zhang <sonic.zhang at analog.com>
- DMA threshold mode can be selected in board config head file.
Signed-off-by: Sonic Zhang <sonic.zhang at analog.com>
---
drivers/net/designware.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/drivers/net/designware.c b/drivers/net/designware.c
index 51eff85..bc3c88f 100644
--- a/drivers/net/designware.c
+++ b/drivers/net/designware.c
@@ -251,8 +251,13 @@ static int dw_eth_init(struct eth_device *dev, bd_t *bis)
writel(FIXEDBURST | PRIORXTX_41 | DMA_PBL, &dma_p->busmode);
+#ifndef CONFIG_DW_MAC_FORCE_THRESHOLD_MODE
writel(readl(&dma_p->opmode) | FLUSHTXFIFO | STOREFORWARD,
&dma_p->opmode);
+#else
+ writel(readl(&dma_p->opmode) | FLUSHTXFIFO,
+ &dma_p->opmode);
+#endif
writel(readl(&dma_p->opmode) | RXSTART | TXSTART, &dma_p->opmode);
--
1.7.9.5
More information about the U-Boot
mailing list