mirror of
				https://github.com/smaeul/u-boot.git
				synced 2025-11-03 21:48:15 +00:00 
			
		
		
		
	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>
		
			
				
	
	
		
			35 lines
		
	
	
		
			760 B
		
	
	
	
		
			C
		
	
	
	
	
	
			
		
		
	
	
			35 lines
		
	
	
		
			760 B
		
	
	
	
		
			C
		
	
	
	
	
	
/*
 | 
						|
 * (C) Copyright 2007
 | 
						|
 * Stelian Pop <stelian@popies.net>
 | 
						|
 * Lead Tech Design <www.leadtechdesign.com>
 | 
						|
 *
 | 
						|
 * SPDX-License-Identifier:	GPL-2.0+
 | 
						|
 */
 | 
						|
#ifndef __ASM_ARM_DMA_MAPPING_H
 | 
						|
#define __ASM_ARM_DMA_MAPPING_H
 | 
						|
 | 
						|
enum dma_data_direction {
 | 
						|
	DMA_BIDIRECTIONAL	= 0,
 | 
						|
	DMA_TO_DEVICE		= 1,
 | 
						|
	DMA_FROM_DEVICE		= 2,
 | 
						|
};
 | 
						|
 | 
						|
static void *dma_alloc_coherent(size_t len, unsigned long *handle)
 | 
						|
{
 | 
						|
	*handle = (unsigned long)memalign(ARCH_DMA_MINALIGN, len);
 | 
						|
	return (void *)*handle;
 | 
						|
}
 | 
						|
 | 
						|
static inline unsigned long dma_map_single(volatile void *vaddr, size_t len,
 | 
						|
					   enum dma_data_direction dir)
 | 
						|
{
 | 
						|
	return (unsigned long)vaddr;
 | 
						|
}
 | 
						|
 | 
						|
static inline void dma_unmap_single(volatile void *vaddr, size_t len,
 | 
						|
				    unsigned long paddr)
 | 
						|
{
 | 
						|
}
 | 
						|
 | 
						|
#endif /* __ASM_ARM_DMA_MAPPING_H */
 |