[U-Boot] [PATCH v2] net: configure DWMAC DMA by default AXI burst length

Sonic Zhang sonic.adi at gmail.com
Thu Jan 29 06:20:52 CET 2015


From: Sonic Zhang <sonic.zhang at analog.com>

Board can define its own AXI burst length to improve DWMAC DMA performance.

v2-changes:
- Avoid write burst len register when the Macro is not defined.

Signed-off-by: Sonic Zhang <sonic.zhang at analog.com>
---
 drivers/net/designware.c |    4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/net/designware.c b/drivers/net/designware.c
index 9ded895..51eff85 100644
--- a/drivers/net/designware.c
+++ b/drivers/net/designware.c
@@ -256,6 +256,10 @@ static int dw_eth_init(struct eth_device *dev, bd_t *bis)
 
 	writel(readl(&dma_p->opmode) | RXSTART | TXSTART, &dma_p->opmode);
 
+#ifdef CONFIG_DW_AXI_BURST_LEN
+	writel((CONFIG_DW_AXI_BURST_LEN & 0x1FF >> 1), &dma_p->axibus);
+#endif
+
 	/* Start up the PHY */
 	if (phy_startup(priv->phydev)) {
 		printf("Could not initialize PHY %s\n",
-- 
1.7.9.5



More information about the U-Boot mailing list