1 #ifndef _ASM_IO_H
2 #define _ASM_IO_H
3
4 #include <linux/config.h>
5 #include <linux/types.h>
6 #include <asm/gsc.h>
7
8 #define virt_to_phys(a) ((unsigned long)__pa(a))
9 #define phys_to_virt(a) __va(a)
10 #define virt_to_bus virt_to_phys
11 #define bus_to_virt phys_to_virt
12
13 #define inb_p inb
14 #define inw_p inw
15 #define inl_p inl
16 #define outb_p outb
17 #define outw_p outw
18 #define outl_p outl
19
20 #define readb gsc_readb
21 #define readw gsc_readw
22 #define readl gsc_readl
23 #define writeb gsc_writeb
24 #define writew gsc_writew
25 #define writel gsc_writel
26
27
28 #if defined(CONFIG_PCI) || defined(CONFIG_ISA)
29 /*
30 * So we get clear link errors
31 */
32 extern u8 inb(unsigned long addr);
33 extern u16 inw(unsigned long addr);
34 extern u32 inl(unsigned long addr);
35
36 extern void outb(unsigned char b, unsigned long addr);
37 extern void outw(unsigned short b, unsigned long addr);
38 extern void outl(u32 b, unsigned long addr);
39
40 static inline void memcpy_toio(void *dest, void *src, int count)
41 {
42 while(count--)
43 writeb(*((char *)src)++, (char *)dest++);
44 }
45
46 #endif
47
48 /* IO Port space is : BBiiii where BB is HBA number. */
49 #define IO_SPACE_LIMIT 0x00ffffff
50
51 /* Right now we don't support Dino-on-a-card and V class which do PCI MMIO
52 * through address/data registers. */
53
54 #define ioremap(__offset, __size) ((void *)(__offset))
55 #define iounmap(__addr)
56
57 #define dma_cache_inv(_start,_size) do { flush_kernel_dcache_range(_start,_size); } while(0)
58 #define dma_cache_wback(_start,_size) do { flush_kernel_dcache_range(_start,_size); } while (0)
59 #define dma_cache_wback_inv(_start,_size) do { flush_kernel_dcache_range(_start,_size); } while (0)
60
61 #endif
62
This page was automatically generated by the
LXR engine.
Visit the LXR main site for more
information.