mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Steffen Trumtrar <s.trumtrar@pengutronix.de>
To: barebox@lists.infradead.org
Cc: Steffen Trumtrar <s.trumtrar@pengutronix.de>,
	Nicolas Ferre <nicolas.ferre@atmel.com>
Subject: [PATCH 2/2] net: macb: turn off endian_swp_pkt_en
Date: Wed, 13 Mar 2013 09:48:14 +0100	[thread overview]
Message-ID: <1363164494-3614-2-git-send-email-s.trumtrar@pengutronix.de> (raw)
In-Reply-To: <1363164494-3614-1-git-send-email-s.trumtrar@pengutronix.de>

The core has a bit for swapping packet data endianism.
Reset default from Cadence is off. Xilinx however, that uses this core on the
Zynq SoCs, opted for on. Turn it off for all devices.

Signed-off-by: Steffen Trumtrar <s.trumtrar@pengutronix.de>
Cc: Nicolas Ferre <nicolas.ferre@atmel.com>
Cc: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
---
 drivers/net/macb.c | 1 +
 drivers/net/macb.h | 2 ++
 2 files changed, 3 insertions(+)

diff --git a/drivers/net/macb.c b/drivers/net/macb.c
index a12eea7..005234e 100644
--- a/drivers/net/macb.c
+++ b/drivers/net/macb.c
@@ -277,6 +277,7 @@ static void macb_configure_dma(struct macb_device *bp)
 		dmacfg |= GEM_BF(FBLDO, 16);
 		dmacfg |= GEM_BIT(TXPBMS) | GEM_BF(RXBMS, -1L);
 		dmacfg |= GEM_BIT(DDRP);
+		dmacfg &= ~GEM_BIT(ENDIA);
 		gem_writel(bp, DMACFG, dmacfg);
 	}
 }
diff --git a/drivers/net/macb.h b/drivers/net/macb.h
index cadd561..1be9ff9 100644
--- a/drivers/net/macb.h
+++ b/drivers/net/macb.h
@@ -168,6 +168,8 @@
 /* Bitfields in DMACFG. */
 #define GEM_FBLDO_OFFSET			0
 #define GEM_FBLDO_SIZE				5
+#define GEM_ENDIA_OFFSET			7
+#define GEM_ENDIA_SIZE				1
 #define GEM_RXBMS_OFFSET			8
 #define GEM_RXBMS_SIZE				2
 #define GEM_TXPBMS_OFFSET			10
-- 
1.8.2.rc2


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

  reply	other threads:[~2013-03-13  8:48 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-03-13  8:48 [PATCH 1/2] net: macb: remove gem_recv and reorder probe Steffen Trumtrar
2013-03-13  8:48 ` Steffen Trumtrar [this message]
2013-03-13  9:04   ` [PATCH 2/2] net: macb: turn off endian_swp_pkt_en Jean-Christophe PLAGNIOL-VILLARD
2013-03-13  9:17     ` Steffen Trumtrar
2013-03-13  9:03 ` [PATCH 1/2] net: macb: remove gem_recv and reorder probe Jean-Christophe PLAGNIOL-VILLARD
2013-03-13  9:19   ` Steffen Trumtrar
2013-03-13  9:32     ` Jean-Christophe PLAGNIOL-VILLARD
2013-03-13  9:33       ` Jean-Christophe PLAGNIOL-VILLARD
2013-03-13 10:15   ` Sascha Hauer
2013-03-13 12:17     ` Jean-Christophe PLAGNIOL-VILLARD
2013-03-13 13:08       ` Steffen Trumtrar
2013-03-13 15:36         ` Jean-Christophe PLAGNIOL-VILLARD

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=1363164494-3614-2-git-send-email-s.trumtrar@pengutronix.de \
    --to=s.trumtrar@pengutronix.de \
    --cc=barebox@lists.infradead.org \
    --cc=nicolas.ferre@atmel.com \
    /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