IxOsalOs.h 670 B

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