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