18c2ecf20Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0 */ 28c2ecf20Sopenharmony_ci#ifndef _ASM_M68K_ZORRO_H 38c2ecf20Sopenharmony_ci#define _ASM_M68K_ZORRO_H 48c2ecf20Sopenharmony_ci 58c2ecf20Sopenharmony_ci#include <asm/raw_io.h> 68c2ecf20Sopenharmony_ci#include <asm/kmap.h> 78c2ecf20Sopenharmony_ci 88c2ecf20Sopenharmony_ci#define z_readb raw_inb 98c2ecf20Sopenharmony_ci#define z_readw raw_inw 108c2ecf20Sopenharmony_ci#define z_readl raw_inl 118c2ecf20Sopenharmony_ci 128c2ecf20Sopenharmony_ci#define z_writeb raw_outb 138c2ecf20Sopenharmony_ci#define z_writew raw_outw 148c2ecf20Sopenharmony_ci#define z_writel raw_outl 158c2ecf20Sopenharmony_ci 168c2ecf20Sopenharmony_ci#define z_memset_io(a,b,c) memset((void *)(a),(b),(c)) 178c2ecf20Sopenharmony_ci#define z_memcpy_fromio(a,b,c) memcpy((a),(void *)(b),(c)) 188c2ecf20Sopenharmony_ci#define z_memcpy_toio(a,b,c) memcpy((void *)(a),(b),(c)) 198c2ecf20Sopenharmony_ci 208c2ecf20Sopenharmony_cistatic inline void __iomem *z_remap_nocache_ser(unsigned long physaddr, 218c2ecf20Sopenharmony_ci unsigned long size) 228c2ecf20Sopenharmony_ci{ 238c2ecf20Sopenharmony_ci return __ioremap(physaddr, size, IOMAP_NOCACHE_SER); 248c2ecf20Sopenharmony_ci} 258c2ecf20Sopenharmony_ci 268c2ecf20Sopenharmony_cistatic inline void __iomem *z_remap_nocache_nonser(unsigned long physaddr, 278c2ecf20Sopenharmony_ci unsigned long size) 288c2ecf20Sopenharmony_ci{ 298c2ecf20Sopenharmony_ci return __ioremap(physaddr, size, IOMAP_NOCACHE_NONSER); 308c2ecf20Sopenharmony_ci} 318c2ecf20Sopenharmony_ci 328c2ecf20Sopenharmony_cistatic inline void __iomem *z_remap_writethrough(unsigned long physaddr, 338c2ecf20Sopenharmony_ci unsigned long size) 348c2ecf20Sopenharmony_ci{ 358c2ecf20Sopenharmony_ci return __ioremap(physaddr, size, IOMAP_WRITETHROUGH); 368c2ecf20Sopenharmony_ci} 378c2ecf20Sopenharmony_cistatic inline void __iomem *z_remap_fullcache(unsigned long physaddr, 388c2ecf20Sopenharmony_ci unsigned long size) 398c2ecf20Sopenharmony_ci{ 408c2ecf20Sopenharmony_ci return __ioremap(physaddr, size, IOMAP_FULL_CACHING); 418c2ecf20Sopenharmony_ci} 428c2ecf20Sopenharmony_ci 438c2ecf20Sopenharmony_ci#define z_unmap iounmap 448c2ecf20Sopenharmony_ci#define z_iounmap iounmap 458c2ecf20Sopenharmony_ci#define z_ioremap z_remap_nocache_ser 468c2ecf20Sopenharmony_ci 478c2ecf20Sopenharmony_ci#endif /* _ASM_M68K_ZORRO_H */ 48