zorro.h 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. #ifndef _ASM_M68K_ZORRO_H
  2. #define _ASM_M68K_ZORRO_H
  3. #include <asm/raw_io.h>
  4. #define z_readb raw_inb
  5. #define z_readw raw_inw
  6. #define z_readl raw_inl
  7. #define z_writeb raw_outb
  8. #define z_writew raw_outw
  9. #define z_writel raw_outl
  10. #define z_memset_io(a,b,c) memset((void *)(a),(b),(c))
  11. #define z_memcpy_fromio(a,b,c) memcpy((a),(void *)(b),(c))
  12. #define z_memcpy_toio(a,b,c) memcpy((void *)(a),(b),(c))
  13. static inline void __iomem *z_remap_nocache_ser(unsigned long physaddr,
  14. unsigned long size)
  15. {
  16. return __ioremap(physaddr, size, IOMAP_NOCACHE_SER);
  17. }
  18. static inline void __iomem *z_remap_nocache_nonser(unsigned long physaddr,
  19. unsigned long size)
  20. {
  21. return __ioremap(physaddr, size, IOMAP_NOCACHE_NONSER);
  22. }
  23. static inline void __iomem *z_remap_writethrough(unsigned long physaddr,
  24. unsigned long size)
  25. {
  26. return __ioremap(physaddr, size, IOMAP_WRITETHROUGH);
  27. }
  28. static inline void __iomem *z_remap_fullcache(unsigned long physaddr,
  29. unsigned long size)
  30. {
  31. return __ioremap(physaddr, size, IOMAP_FULL_CACHING);
  32. }
  33. #define z_unmap iounmap
  34. #define z_iounmap iounmap
  35. #define z_ioremap z_remap_nocache_ser
  36. #endif /* _ASM_M68K_ZORRO_H */