1#ifndef IxOsalOs_H 2#define IxOsalOs_H 3 4#ifndef IX_OSAL_CACHED 5#error "Uncached memory not supported in linux environment" 6#endif 7 8static inline unsigned long __v2p(unsigned long v) 9{ 10 if (v < 0x40000000) 11 return (v & 0xfffffff); 12 else 13 return v; 14} 15 16#define IX_OSAL_OS_MMU_VIRT_TO_PHYS(addr) __v2p((u32)addr) 17#define IX_OSAL_OS_MMU_PHYS_TO_VIRT(addr) (addr) 18 19/* 20 * Data cache not enabled (hopefully) 21 */ 22#define IX_OSAL_OS_CACHE_INVALIDATE(addr, size) 23#define IX_OSAL_OS_CACHE_FLUSH(addr, size) 24#define HAL_DCACHE_INVALIDATE(addr, size) 25#define HAL_DCACHE_FLUSH(addr, size) 26 27#define __ixp42X /* sr: U-Boot needs this define */ 28 29#endif /* IxOsalOs_H */ 30 31