^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1) /* SPDX-License-Identifier: GPL-2.0 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2) #ifndef _ASM_M68K_NUBUS_H
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3) #define _ASM_M68K_NUBUS_H
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 4)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 5) #include <asm/raw_io.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 6) #include <asm/kmap.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 7)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 8) #define nubus_readb raw_inb
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 9) #define nubus_readw raw_inw
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 10) #define nubus_readl raw_inl
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 11)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 12) #define nubus_writeb raw_outb
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 13) #define nubus_writew raw_outw
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 14) #define nubus_writel raw_outl
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 15)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 16) #define nubus_memset_io(a,b,c) memset((void *)(a),(b),(c))
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 17) #define nubus_memcpy_fromio(a,b,c) memcpy((a),(void *)(b),(c))
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 18) #define nubus_memcpy_toio(a,b,c) memcpy((void *)(a),(b),(c))
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 19)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 20) static inline void *nubus_remap_nocache_ser(unsigned long physaddr,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 21) unsigned long size)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 22) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 23) return __ioremap(physaddr, size, IOMAP_NOCACHE_SER);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 24) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 25)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 26) static inline void *nubus_remap_nocache_nonser(unsigned long physaddr,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 27) unsigned long size)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 28) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 29) return __ioremap(physaddr, size, IOMAP_NOCACHE_NONSER);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 30) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 31)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 32) static inline void *nbus_remap_writethrough(unsigned long physaddr,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 33) unsigned long size)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 34) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 35) return __ioremap(physaddr, size, IOMAP_WRITETHROUGH);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 36) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 37)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 38) static inline void *nubus_remap_fullcache(unsigned long physaddr,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 39) unsigned long size)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 40) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 41) return __ioremap(physaddr, size, IOMAP_FULL_CACHING);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 42) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 43)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 44) #define nubus_unmap iounmap
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 45) #define nubus_iounmap iounmap
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 46) #define nubus_ioremap nubus_remap_nocache_ser
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 47)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 48) #endif /* _ASM_NUBUS_H */