From mboxrd@z Thu Jan 1 00:00:00 1970 From: Marek Vasut Date: Sat, 26 Apr 2014 20:27:40 +0200 Subject: [U-Boot] [PATCH 1/3] net/designware: ensure device private data is DMA aligned. In-Reply-To: <1397915542-987-1-git-send-email-ijc@hellion.org.uk> References: <1397914214.19277.50.camel@hastur.hellion.org.uk> <1397915542-987-1-git-send-email-ijc@hellion.org.uk> Message-ID: <201404262027.40507.marex@denx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On Saturday, April 19, 2014 at 03:52:20 PM, Ian Campbell wrote: > 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 > --- > drivers/net/designware.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/drivers/net/designware.c b/drivers/net/designware.c > index 6ece479..1120f70 100644 > --- a/drivers/net/designware.c > +++ b/drivers/net/designware.c > @@ -412,7 +412,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)); Acked-by: Marek Vasut Best regards, Marek Vasut