zorro.h 1.2 KB

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