1#ifndef _ASM_M68K_ZORRO_H
2#define _ASM_M68K_ZORRO_H
3#include <asm/raw_io.h>
4
5#define z_readb raw_inb
6#define z_readw raw_inw
7#define z_readl raw_inl
8
9#define z_writeb raw_outb
10#define z_writew raw_outw
11#define z_writel raw_outl
12
13#define z_memset_io(a,b,c)	memset((void *)(a),(b),(c))
14#define z_memcpy_fromio(a,b,c)	memcpy((a),(void *)(b),(c))
15#define z_memcpy_toio(a,b,c)	memcpy((void *)(a),(b),(c))
16
17
18/* Values for nocacheflag and cmode */
19#ifndef IOMAP_FULL_CACHING
20#define IOMAP_FULL_CACHING		0
21#define IOMAP_NOCACHE_SER		1
22#define IOMAP_NOCACHE_NONSER		2
23#define IOMAP_WRITETHROUGH		3
24#endif
25
26extern void iounmap(void *addr);
27
28extern void *__ioremap(unsigned long physaddr, unsigned long size,
29		       int cacheflag);
30extern void __iounmap(void *addr, unsigned long size);
31
32
33extern inline void *z_remap_nocache_ser(unsigned long physaddr,
34					  unsigned long size)
35{
36	return __ioremap(physaddr, size, IOMAP_NOCACHE_SER);
37}
38
39extern inline void *z_remap_nocache_nonser(unsigned long physaddr,
40					     unsigned long size)
41{
42	return __ioremap(physaddr, size, IOMAP_NOCACHE_NONSER);
43}
44
45extern inline void *z_remap_writethrough(unsigned long physaddr,
46					   unsigned long size)
47{
48	return __ioremap(physaddr, size, IOMAP_WRITETHROUGH);
49}
50extern inline void *z_remap_fullcache(unsigned long physaddr,
51					unsigned long size)
52{
53	return __ioremap(physaddr, size, IOMAP_FULL_CACHING);
54}
55
56#define z_unmap iounmap
57#define z_iounmap iounmap
58#define z_ioremap z_remap_nocache_ser
59
60#endif /* _ASM_ZORRO_H */
61