memory.h 392 B

12345678910111213141516171819
  1. #ifndef __MT_MEMORY_H__
  2. #define __MT_MEMORY_H__
  3. /*
  4. * Define macros.
  5. */
  6. /* IO_VIRT = 0xF0000000 | IO_PHYS[27:0] */
  7. #define IO_VIRT_TO_PHYS(v) (0x10000000 | ((v) & 0x0fffffff))
  8. #define IO_PHYS_TO_VIRT(p) (0xf0000000 | ((p) & 0x0fffffff))
  9. #ifndef CONFIG_MTK_LM_MODE
  10. #ifndef __ASSEMBLER__
  11. static inline unsigned int enable_4G(void)
  12. {
  13. return 0;
  14. }
  15. #endif
  16. #endif
  17. #endif /* !__MT_MEMORY_H__ */