All of lore.kernel.org
 help / color / mirror / Atom feed
From: sonic.adi at gmail.com <sonic.adi@gmail.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] net: configure DWMAC DMA by default AXI burst length
Date: Tue, 27 Jan 2015 10:54:52 +0800	[thread overview]
Message-ID: <1422327292-6039-1-git-send-email-sonic.adi@gmail.com> (raw)

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

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

Signed-off-by: Sonic Zhang <sonic.zhang@analog.com>
---

 drivers/net/designware.c |    2 ++
 drivers/net/designware.h |    5 +++++
 2 files changed, 7 insertions(+)

diff --git a/drivers/net/designware.c b/drivers/net/designware.c
index 9ded895..d8d6792 100644
--- a/drivers/net/designware.c
+++ b/drivers/net/designware.c
@@ -256,6 +256,8 @@ static int dw_eth_init(struct eth_device *dev, bd_t *bis)
 
 	writel(readl(&dma_p->opmode) | RXSTART | TXSTART, &dma_p->opmode);
 
+	writel((CONFIG_DW_AXI_BURST_LEN & 0x1FF >> 1), &dma_p->axibus);
+
 	/* Start up the PHY */
 	if (phy_startup(priv->phydev)) {
 		printf("Could not initialize PHY %s\n",
diff --git a/drivers/net/designware.h b/drivers/net/designware.h
index ce51102..d8bd84d 100644
--- a/drivers/net/designware.h
+++ b/drivers/net/designware.h
@@ -102,6 +102,11 @@ struct eth_dma_regs {
 #define TXSECONDFRAME		(1 << 2)
 #define RXSTART			(1 << 1)
 
+/* Default AXI BUS Burst length */
+#ifndef CONFIG_DW_AXI_BURST_LEN
+#define CONFIG_DW_AXI_BURST_LEN 0
+#endif
+
 /* Descriptior related definitions */
 #define MAC_MAX_FRAME_SZ	(1600)
 
-- 
1.7.9.5

             reply	other threads:[~2015-01-27  2:54 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-27  2:54 sonic.adi at gmail.com [this message]
2015-01-27 20:43 ` [U-Boot] [PATCH] net: configure DWMAC DMA by default AXI burst length Joe Hershberger
2015-01-28  3:24   ` Sonic Zhang
2015-01-28  9:42     ` Joe Hershberger
2015-01-29  5:15       ` Sonic Zhang

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1422327292-6039-1-git-send-email-sonic.adi@gmail.com \
    --to=sonic.adi@gmail.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.