- Alan Cox: synch. PA-RISC arch and bitops cleanups
[davej-history.git] / include / asm-parisc / io.h
blob65f2a29e721be747557c087f59078050f4c50277
1 #ifndef _ASM_IO_H
2 #define _ASM_IO_H
4 #include <linux/types.h>
5 #include <asm/gsc.h>
7 #define virt_to_phys(a) ((unsigned long)__pa(a))
8 #define phys_to_virt(a) __va(a)
9 #define virt_to_bus virt_to_phys
10 #define bus_to_virt phys_to_virt
12 #define inb_p inb
13 #define inw_p inw
14 #define inl_p inl
15 #define outb_p outb
16 #define outw_p outw
17 #define outl_p outl
19 #define readb gsc_readb
20 #define readw gsc_readw
21 #define readl gsc_readl
22 #define writeb gsc_writeb
23 #define writew gsc_writew
24 #define writel gsc_writel
27 #if defined(CONFIG_PCI) || defined(CONFIG_ISA)
29 * So we get clear link errors
31 extern u8 inb(unsigned long addr);
32 extern u16 inw(unsigned long addr);
33 extern u32 inl(unsigned long addr);
35 extern void outb(unsigned char b, unsigned long addr);
36 extern void outw(unsigned short b, unsigned long addr);
37 extern void outl(u32 b, unsigned long addr);
39 static inline void memcpy_toio(void *dest, void *src, int count)
41 while(count--)
42 writeb(*((char *)src)++, (char *)dest++);
45 #endif
47 /* IO Port space is : BBiiii where BB is HBA number. */
48 #define IO_SPACE_LIMIT 0x00ffffff
50 /* Right now we don't support Dino-on-a-card and V class which do PCI MMIO
51 * through address/data registers. */
53 #define ioremap(__offset, __size) ((void *)(__offset))
54 #define iounmap(__addr)
56 #define dma_cache_inv(_start,_size) do { flush_kernel_dcache_range(_start,_size); } while(0)
57 #define dma_cache_wback(_start,_size) do { flush_kernel_dcache_range(_start,_size); } while (0)
58 #define dma_cache_wback_inv(_start,_size) do { flush_kernel_dcache_range(_start,_size); } while (0)
60 #endif