U-Boot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Sonic Zhang <sonic.adi@gmail.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] net: Support DMA threshold mode in DWMAC driver
Date: Thu, 29 Jan 2015 14:38:50 +0800	[thread overview]
Message-ID: <1422513530-17861-1-git-send-email-sonic.adi@gmail.com> (raw)

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

- DMA threshold mode can be selected in board config head file.

Signed-off-by: Sonic Zhang <sonic.zhang@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

             reply	other threads:[~2015-01-29  6:38 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-29  6:38 Sonic Zhang [this message]
2015-03-06 15:43 ` [U-Boot] net: Support DMA threshold mode in DWMAC driver Tom Rini

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=1422513530-17861-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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox