mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-11-26 14:40:41 +00:00
arm: dma_alloc_coherent: malloc() -> memalign()
Even though the MMU/D-cache is off, some DMA engines still expect strict address alignment. For example, the incoming Faraday FTMAC110 & FTGMAC100 ethernet controllers expect the tx/rx descriptors should always be aligned to 16-bytes boundary. Signed-off-by: Kuo-Jung Su <dantesu@faraday-tech.com> CC: Albert ARIBAUD <albert.u.boot@aribaud.net>
This commit is contained in:
parent
fb8d49cb44
commit
771f74c3d3
1 changed files with 1 additions and 1 deletions
|
@ -16,7 +16,7 @@ enum dma_data_direction {
|
|||
|
||||
static void *dma_alloc_coherent(size_t len, unsigned long *handle)
|
||||
{
|
||||
*handle = (unsigned long)malloc(len);
|
||||
*handle = (unsigned long)memalign(ARCH_DMA_MINALIGN, len);
|
||||
return (void *)*handle;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue