Patchwork [U-Boot,8/9] net: force PKTALIGN to ARCH_DMA_MINALIGN

login
register
mail settings
Submitter Marek Vasut
Date March 16, 2012, 4:33 a.m.
Message ID <1331872405-1451-9-git-send-email-marex@denx.de>
Download mbox | patch
Permalink /patch/147137/
State Accepted
Delegated to: Albert ARIBAUD
Headers show

Comments

Marek Vasut - March 16, 2012, 4:33 a.m.
From: Eric Nelson <eric.nelson@boundarydevices.com>

This will prevent the need for architectures whose DMA alignment
is greater than 32 to have bounce buffers.

Signed-off-by: Eric Nelson <eric.nelson@boundarydevices.com>
---
 include/net.h |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

Patch

diff --git a/include/net.h b/include/net.h
index 1707a7f..14a0d33 100644
--- a/include/net.h
+++ b/include/net.h
@@ -16,6 +16,7 @@ 
 #include <commproc.h>
 #endif	/* CONFIG_8xx */
 
+#include <asm/cache.h>
 #include <asm/byteorder.h>	/* for nton* / ntoh* stuff */
 
 
@@ -31,7 +32,7 @@ 
 # define PKTBUFSRX	4
 #endif
 
-#define PKTALIGN	32
+#define PKTALIGN	ARCH_DMA_MINALIGN
 
 /* IPv4 addresses are always 32 bits in size */
 typedef u32		IPaddr_t;