summaryrefslogtreecommitdiff
path: root/drivers/net
diff options
context:
space:
mode:
authorIan Campbell <ijc@hellion.org.uk>2014-05-08 22:26:32 +0100
committerAlbert ARIBAUD <albert.u.boot@aribaud.net>2014-05-25 17:23:12 +0200
commit1c848a258600490f6964597b92b69a107af141d6 (patch)
treed976eec07a0404f5e8c9b36d681d810e275ad2a9 /drivers/net
parent50827a5991bb345319bd0ce76f5e2402fac0c391 (diff)
net/designware: ensure device private data is DMA aligned.
struct dw_eth_dev contains fields which are accessed via DMA, so make sure it is aligned to a dma boundary. Without this I see: ERROR: v7_dcache_inval_range - start address is not aligned - 0x7fb677e0 Signed-off-by: Ian Campbell <ijc@hellion.org.uk> Reviewed-by: Alexey Brodkin <abrodkin@synopsys.com> Acked-by: Marek Vasut <marex@denx.de>
Diffstat (limited to 'drivers/net')
-rw-r--r--drivers/net/designware.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/net/designware.c b/drivers/net/designware.c
index 78751b2600c..41ab3ac0b6f 100644
--- a/drivers/net/designware.c
+++ b/drivers/net/designware.c
@@ -414,7 +414,8 @@ int designware_initialize(ulong base_addr, u32 interface)
* Since the priv structure contains the descriptors which need a strict
* buswidth alignment, memalign is used to allocate memory
*/
- priv = (struct dw_eth_dev *) memalign(16, sizeof(struct dw_eth_dev));
+ priv = (struct dw_eth_dev *) memalign(ARCH_DMA_MINALIGN,
+ sizeof(struct dw_eth_dev));
if (!priv) {
free(dev);
return -ENOMEM;