Skip to content
Snippets Groups Projects
Commit 1c848a25 authored by Ian Campbell's avatar Ian Campbell Committed by Albert ARIBAUD
Browse files

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: default avatarIan Campbell <ijc@hellion.org.uk>
Reviewed-by: default avatarAlexey Brodkin <abrodkin@synopsys.com>
Acked-by: default avatarMarek Vasut <marex@denx.de>
parent 50827a59
No related branches found
No related tags found
No related merge requests found
...@@ -414,7 +414,8 @@ int designware_initialize(ulong base_addr, u32 interface) ...@@ -414,7 +414,8 @@ int designware_initialize(ulong base_addr, u32 interface)
* Since the priv structure contains the descriptors which need a strict * Since the priv structure contains the descriptors which need a strict
* buswidth alignment, memalign is used to allocate memory * 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) { if (!priv) {
free(dev); free(dev);
return -ENOMEM; return -ENOMEM;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment