1 #include <linux/module.h>
2 #include <linux/types.h>
7 * Copy data from IO memory space to "real" memory space.
8 * This needs to be optimized.
10 void memcpy_fromio(void *to
, const volatile void __iomem
*from
, long count
)
16 *dst
++ = readb(from
++);
19 EXPORT_SYMBOL(memcpy_fromio
);
22 * Copy data from "real" memory space to IO memory space.
23 * This needs to be optimized.
25 void memcpy_toio(volatile void __iomem
*to
, const void *from
, long count
)
27 const char *src
= from
;
34 EXPORT_SYMBOL(memcpy_toio
);
37 * "memset" on IO memory space.
38 * This needs to be optimized.
40 void memset_io(volatile void __iomem
*dst
, int c
, long count
)
42 unsigned char ch
= (char)(c
& 0xff);
50 EXPORT_SYMBOL(memset_io
);
52 #ifdef CONFIG_IA64_GENERIC
64 #undef __ia64_readb_relaxed
65 #undef __ia64_readw_relaxed
66 #undef __ia64_readl_relaxed
67 #undef __ia64_readq_relaxed
75 __ia64_inb (unsigned long port
)
77 return ___ia64_inb(port
);
81 __ia64_inw (unsigned long port
)
83 return ___ia64_inw(port
);
87 __ia64_inl (unsigned long port
)
89 return ___ia64_inl(port
);
93 __ia64_outb (unsigned char val
, unsigned long port
)
95 ___ia64_outb(val
, port
);
99 __ia64_outw (unsigned short val
, unsigned long port
)
101 ___ia64_outw(val
, port
);
105 __ia64_outl (unsigned int val
, unsigned long port
)
107 ___ia64_outl(val
, port
);
111 __ia64_readb (void __iomem
*addr
)
113 return ___ia64_readb (addr
);
117 __ia64_readw (void __iomem
*addr
)
119 return ___ia64_readw (addr
);
123 __ia64_readl (void __iomem
*addr
)
125 return ___ia64_readl (addr
);
129 __ia64_readq (void __iomem
*addr
)
131 return ___ia64_readq (addr
);
135 __ia64_readb_relaxed (void __iomem
*addr
)
137 return ___ia64_readb (addr
);
141 __ia64_readw_relaxed (void __iomem
*addr
)
143 return ___ia64_readw (addr
);
147 __ia64_readl_relaxed (void __iomem
*addr
)
149 return ___ia64_readl (addr
);
153 __ia64_readq_relaxed (void __iomem
*addr
)
155 return ___ia64_readq (addr
);
164 #endif /* CONFIG_IA64_GENERIC */