Greg Kroah-Hartman | b244131 | 2017-11-01 15:07:57 +0100 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0 */ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 2 | #ifndef _ASM_M68K_ZORRO_H |
| 3 | #define _ASM_M68K_ZORRO_H |
| 4 | |
| 5 | #include <asm/raw_io.h> |
Greg Ungerer | 9746882 | 2018-03-25 22:17:38 +1000 | [diff] [blame] | 6 | #include <asm/kmap.h> |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 7 | |
| 8 | #define z_readb raw_inb |
| 9 | #define z_readw raw_inw |
| 10 | #define z_readl raw_inl |
| 11 | |
| 12 | #define z_writeb raw_outb |
| 13 | #define z_writew raw_outw |
| 14 | #define z_writel raw_outl |
| 15 | |
| 16 | #define z_memset_io(a,b,c) memset((void *)(a),(b),(c)) |
| 17 | #define z_memcpy_fromio(a,b,c) memcpy((a),(void *)(b),(c)) |
| 18 | #define z_memcpy_toio(a,b,c) memcpy((void *)(a),(b),(c)) |
| 19 | |
Al Viro | ad9ec4f | 2006-01-12 01:06:24 -0800 | [diff] [blame] | 20 | static inline void __iomem *z_remap_nocache_ser(unsigned long physaddr, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 21 | unsigned long size) |
| 22 | { |
| 23 | return __ioremap(physaddr, size, IOMAP_NOCACHE_SER); |
| 24 | } |
| 25 | |
Al Viro | ad9ec4f | 2006-01-12 01:06:24 -0800 | [diff] [blame] | 26 | static inline void __iomem *z_remap_nocache_nonser(unsigned long physaddr, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 27 | unsigned long size) |
| 28 | { |
| 29 | return __ioremap(physaddr, size, IOMAP_NOCACHE_NONSER); |
| 30 | } |
| 31 | |
Al Viro | ad9ec4f | 2006-01-12 01:06:24 -0800 | [diff] [blame] | 32 | static inline void __iomem *z_remap_writethrough(unsigned long physaddr, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 33 | unsigned long size) |
| 34 | { |
| 35 | return __ioremap(physaddr, size, IOMAP_WRITETHROUGH); |
| 36 | } |
Al Viro | ad9ec4f | 2006-01-12 01:06:24 -0800 | [diff] [blame] | 37 | static inline void __iomem *z_remap_fullcache(unsigned long physaddr, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 38 | unsigned long size) |
| 39 | { |
| 40 | return __ioremap(physaddr, size, IOMAP_FULL_CACHING); |
| 41 | } |
| 42 | |
| 43 | #define z_unmap iounmap |
| 44 | #define z_iounmap iounmap |
| 45 | #define z_ioremap z_remap_nocache_ser |
| 46 | |
| 47 | #endif /* _ASM_M68K_ZORRO_H */ |