blob: 5ce97c22b582e316aac672db4887ee8486aa239d [file] [log] [blame]
Linus Torvalds1da177e2005-04-16 15:20:36 -07001#ifndef _ASM_M68K_ZORRO_H
2#define _ASM_M68K_ZORRO_H
3
4#include <asm/raw_io.h>
5
6#define z_readb raw_inb
7#define z_readw raw_inw
8#define z_readl raw_inl
9
10#define z_writeb raw_outb
11#define z_writew raw_outw
12#define z_writel raw_outl
13
14#define z_memset_io(a,b,c) memset((void *)(a),(b),(c))
15#define z_memcpy_fromio(a,b,c) memcpy((a),(void *)(b),(c))
16#define z_memcpy_toio(a,b,c) memcpy((void *)(a),(b),(c))
17
Al Viroad9ec4f2006-01-12 01:06:24 -080018static inline void __iomem *z_remap_nocache_ser(unsigned long physaddr,
Linus Torvalds1da177e2005-04-16 15:20:36 -070019 unsigned long size)
20{
21 return __ioremap(physaddr, size, IOMAP_NOCACHE_SER);
22}
23
Al Viroad9ec4f2006-01-12 01:06:24 -080024static inline void __iomem *z_remap_nocache_nonser(unsigned long physaddr,
Linus Torvalds1da177e2005-04-16 15:20:36 -070025 unsigned long size)
26{
27 return __ioremap(physaddr, size, IOMAP_NOCACHE_NONSER);
28}
29
Al Viroad9ec4f2006-01-12 01:06:24 -080030static inline void __iomem *z_remap_writethrough(unsigned long physaddr,
Linus Torvalds1da177e2005-04-16 15:20:36 -070031 unsigned long size)
32{
33 return __ioremap(physaddr, size, IOMAP_WRITETHROUGH);
34}
Al Viroad9ec4f2006-01-12 01:06:24 -080035static inline void __iomem *z_remap_fullcache(unsigned long physaddr,
Linus Torvalds1da177e2005-04-16 15:20:36 -070036 unsigned long size)
37{
38 return __ioremap(physaddr, size, IOMAP_FULL_CACHING);
39}
40
41#define z_unmap iounmap
42#define z_iounmap iounmap
43#define z_ioremap z_remap_nocache_ser
44
45#endif /* _ASM_M68K_ZORRO_H */