From: gfilip@ee.ethz.ch
To: netdev@vger.kernel.org
Cc: glikely@secretlab.ca, Filip Gospodinov <gfilip@ee.ethz.ch>
Subject: [PATCH 4/5] temac: dma MMIO for Virtex4
Date: Mon, 22 Feb 2010 20:07:00 +0100 [thread overview]
Message-ID: <1266865621-28955-4-git-send-email-gfilip@ee.ethz.ch> (raw)
In-Reply-To: <1266865621-28955-3-git-send-email-gfilip@ee.ethz.ch>
This patch belongs to a set of patches which extends the temac driver to support Virtex4-FX. It was successfully tested on the ML403 evaluation board.
Signed-off-by: Filip Gospodinov <gfilip@ee.ethz.ch>
---
drivers/net/ll_temac_main.c | 12 ++++++++++++
1 files changed, 12 insertions(+), 0 deletions(-)
diff --git a/drivers/net/ll_temac_main.c b/drivers/net/ll_temac_main.c
index 2e7421c..8b4e1b9 100644
--- a/drivers/net/ll_temac_main.c
+++ b/drivers/net/ll_temac_main.c
@@ -115,6 +115,17 @@ void temac_indirect_out32(struct temac_local *lp, int reg, u32 value)
temac_iow(lp, XTE_CTL0_OFFSET, CNTLREG_WRITE_ENABLE_MASK | reg);
}
+#ifdef CONFIG_XILINX_VIRTEX_4_FX
+static u32 temac_dma_in32(struct temac_local *lp, int reg)
+{
+ return in_be32((u32 *)(lp->dma_regs + reg));
+}
+
+static void temac_dma_out32(struct temac_local *lp, int reg, u32 value)
+{
+ out_be32((u32 *)(lp->dma_regs + reg), value);
+}
+#else
static u32 temac_dma_in32(struct temac_local *lp, int reg)
{
return dcr_read(lp->sdma_dcrs, reg);
@@ -124,6 +135,7 @@ static void temac_dma_out32(struct temac_local *lp, int reg, u32 value)
{
dcr_write(lp->sdma_dcrs, reg, value);
}
+#endif
/**
* temac_dma_bd_init - Setup buffer descriptor rings
--
1.6.4.4
next prev parent reply other threads:[~2010-02-22 19:14 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-02-22 19:06 [PATCH 1/5] temac: Add Virtex4 address mappings gfilip
2010-02-22 19:06 ` [PATCH 2/5] temac: dma init for Virtex4 gfilip
2010-02-22 19:06 ` [PATCH 3/5] temac: dma deinit gfilip
2010-02-22 19:07 ` gfilip [this message]
2010-02-22 19:07 ` [PATCH 5/5] temac: add missing mask gfilip
2010-02-22 22:25 ` Grant Likely
2010-02-22 22:23 ` [PATCH 2/5] temac: dma init for Virtex4 Grant Likely
2010-02-22 22:10 ` [PATCH 1/5] temac: Add Virtex4 address mappings Grant Likely
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=1266865621-28955-4-git-send-email-gfilip@ee.ethz.ch \
--to=gfilip@ee.ethz.ch \
--cc=glikely@secretlab.ca \
--cc=netdev@vger.kernel.org \
/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;
as well as URLs for NNTP newsgroup(s).