ioremap.h 701 B

12345678910111213141516171819202122232425262728293031323334
  1. #ifndef __ASM_MACH_BMIPS_IOREMAP_H
  2. #define __ASM_MACH_BMIPS_IOREMAP_H
  3. #include <linux/types.h>
  4. static inline phys_addr_t fixup_bigphys_addr(phys_addr_t phys_addr, phys_addr_t size)
  5. {
  6. return phys_addr;
  7. }
  8. static inline int is_bmips_internal_registers(phys_addr_t offset)
  9. {
  10. if (offset >= 0xfff80000)
  11. return 1;
  12. return 0;
  13. }
  14. static inline void __iomem *plat_ioremap(phys_addr_t offset, unsigned long size,
  15. unsigned long flags)
  16. {
  17. if (is_bmips_internal_registers(offset))
  18. return (void __iomem *)offset;
  19. return NULL;
  20. }
  21. static inline int plat_iounmap(const volatile void __iomem *addr)
  22. {
  23. return is_bmips_internal_registers((unsigned long)addr);
  24. }
  25. #endif /* __ASM_MACH_BMIPS_IOREMAP_H */