blob: 96f64bf7bcaa39c4a14b45c514d928c70c3726d1 [file] [log] [blame]
Greg Kroah-Hartmanb2441312017-11-01 15:07:57 +01001/* SPDX-License-Identifier: GPL-2.0 */
Linus Torvalds1da177e2005-04-16 15:20:36 -07002#ifndef _ASM_M68K_ZORRO_H
3#define _ASM_M68K_ZORRO_H
4
5#include <asm/raw_io.h>
6
7#define z_readb raw_inb
8#define z_readw raw_inw
9#define z_readl raw_inl
10
11#define z_writeb raw_outb
12#define z_writew raw_outw
13#define z_writel raw_outl
14
15#define z_memset_io(a,b,c) memset((void *)(a),(b),(c))
16#define z_memcpy_fromio(a,b,c) memcpy((a),(void *)(b),(c))
17#define z_memcpy_toio(a,b,c) memcpy((void *)(a),(b),(c))
18
Al Viroad9ec4f2006-01-12 01:06:24 -080019static inline void __iomem *z_remap_nocache_ser(unsigned long physaddr,
Linus Torvalds1da177e2005-04-16 15:20:36 -070020 unsigned long size)
21{
22 return __ioremap(physaddr, size, IOMAP_NOCACHE_SER);
23}
24
Al Viroad9ec4f2006-01-12 01:06:24 -080025static inline void __iomem *z_remap_nocache_nonser(unsigned long physaddr,
Linus Torvalds1da177e2005-04-16 15:20:36 -070026 unsigned long size)
27{
28 return __ioremap(physaddr, size, IOMAP_NOCACHE_NONSER);
29}
30
Al Viroad9ec4f2006-01-12 01:06:24 -080031static inline void __iomem *z_remap_writethrough(unsigned long physaddr,
Linus Torvalds1da177e2005-04-16 15:20:36 -070032 unsigned long size)
33{
34 return __ioremap(physaddr, size, IOMAP_WRITETHROUGH);
35}
Al Viroad9ec4f2006-01-12 01:06:24 -080036static inline void __iomem *z_remap_fullcache(unsigned long physaddr,
Linus Torvalds1da177e2005-04-16 15:20:36 -070037 unsigned long size)
38{
39 return __ioremap(physaddr, size, IOMAP_FULL_CACHING);
40}
41
42#define z_unmap iounmap
43#define z_iounmap iounmap
44#define z_ioremap z_remap_nocache_ser
45
46#endif /* _ASM_M68K_ZORRO_H */