Home Home > GIT Browse
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander Viro <viro@parcelfarce.linux.theplanet.co.uk>2005-02-10 03:09:26 -0800
committerDavid S. Miller <davem@nuts.davemloft.net>2005-02-10 03:09:26 -0800
commita9425fb458a9c95aa76f6a3d6f29b59685482283 (patch)
tree450468fd8c10ee51c32c5b016d393ffa96f706cc
parent381f1041d4bd316266ca5263d08ea9c7be52df89 (diff)
[SPARC]: Fix I/O accessor routines.
* insb et.al. first argument is unsigned long, not void * (just look at their callers). There _is_ a variant that takes void __iomem *, but that's ioread8_rep() and its friends. * exported the rest of these suckers (insl/outsl already had been). Signed-off-by: Al Viro <viro@parcelfarce.linux.theplanet.co.uk> Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--arch/sparc/kernel/pcic.c42
-rw-r--r--arch/sparc/kernel/sparc_ksyms.c4
-rw-r--r--include/asm-sparc/io.h12
3 files changed, 34 insertions, 24 deletions
diff --git a/arch/sparc/kernel/pcic.c b/arch/sparc/kernel/pcic.c
index bff4e7d28ff4..597d3ff6ad68 100644
--- a/arch/sparc/kernel/pcic.c
+++ b/arch/sparc/kernel/pcic.c
@@ -975,60 +975,66 @@ int pcibios_assign_resource(struct pci_dev *pdev, int resource)
* We do not use horroble macroses here because we want to
* advance pointer by sizeof(size).
*/
-void outsb(void * __iomem addr, const void *src, unsigned long count) {
+void outsb(unsigned long addr, const void *src, unsigned long count)
+{
while (count) {
count -= 1;
- writeb(*(const char *)src, addr);
+ outb(*(const char *)src, addr);
src += 1;
- addr += 1;
+ /* addr += 1; */
}
}
-void outsw(void * __iomem addr, const void *src, unsigned long count) {
+void outsw(unsigned long addr, const void *src, unsigned long count)
+{
while (count) {
count -= 2;
- writew(*(const short *)src, addr);
+ outw(*(const short *)src, addr);
src += 2;
- addr += 2;
+ /* addr += 2; */
}
}
-void outsl(void * __iomem addr, const void *src, unsigned long count) {
+void outsl(unsigned long addr, const void *src, unsigned long count)
+{
while (count) {
count -= 4;
- writel(*(const long *)src, addr);
+ outl(*(const long *)src, addr);
src += 4;
- addr += 4;
+ /* addr += 4; */
}
}
-void insb(void * __iomem addr, void *dst, unsigned long count) {
+void insb(unsigned long addr, void *dst, unsigned long count)
+{
while (count) {
count -= 1;
- *(unsigned char *)dst = readb(addr);
+ *(unsigned char *)dst = inb(addr);
dst += 1;
- addr += 1;
+ /* addr += 1; */
}
}
-void insw(void * __iomem addr, void *dst, unsigned long count) {
+void insw(unsigned long addr, void *dst, unsigned long count)
+{
while (count) {
count -= 2;
- *(unsigned short *)dst = readw(addr);
+ *(unsigned short *)dst = inw(addr);
dst += 2;
- addr += 2;
+ /* addr += 2; */
}
}
-void insl(void * __iomem addr, void *dst, unsigned long count) {
+void insl(unsigned long addr, void *dst, unsigned long count)
+{
while (count) {
count -= 4;
/*
* XXX I am sure we are in for an unaligned trap here.
*/
- *(unsigned long *)dst = readl(addr);
+ *(unsigned long *)dst = inl(addr);
dst += 4;
- addr += 4;
+ /* addr += 4; */
}
}
diff --git a/arch/sparc/kernel/sparc_ksyms.c b/arch/sparc/kernel/sparc_ksyms.c
index 49d352b05d72..a7df400e9d48 100644
--- a/arch/sparc/kernel/sparc_ksyms.c
+++ b/arch/sparc/kernel/sparc_ksyms.c
@@ -202,6 +202,10 @@ EXPORT_SYMBOL(sbus_ioremap);
#endif
#ifdef CONFIG_PCI
EXPORT_SYMBOL(ebus_chain);
+EXPORT_SYMBOL(insb);
+EXPORT_SYMBOL(outsb);
+EXPORT_SYMBOL(insw);
+EXPORT_SYMBOL(outsw);
EXPORT_SYMBOL(insl);
EXPORT_SYMBOL(outsl);
EXPORT_SYMBOL(pci_alloc_consistent);
diff --git a/include/asm-sparc/io.h b/include/asm-sparc/io.h
index 3f8b9924a9b6..f98570f54b53 100644
--- a/include/asm-sparc/io.h
+++ b/include/asm-sparc/io.h
@@ -134,12 +134,12 @@ static inline void __writel(u32 l, volatile void __iomem *addr)
#define inl_p(__addr) inl(__addr)
#define outl_p(__l, __addr) outl(__l, __addr)
-void outsb(void * __iomem addr, const void *src, unsigned long cnt);
-void outsw(void * __iomem addr, const void *src, unsigned long cnt);
-void outsl(void * __iomem addr, const void *src, unsigned long cnt);
-void insb(void * __iomem addr, void *dst, unsigned long count);
-void insw(void * __iomem addr, void *dst, unsigned long count);
-void insl(void * __iomem addr, void *dst, unsigned long count);
+void outsb(unsigned long addr, const void *src, unsigned long cnt);
+void outsw(unsigned long addr, const void *src, unsigned long cnt);
+void outsl(unsigned long addr, const void *src, unsigned long cnt);
+void insb(unsigned long addr, void *dst, unsigned long count);
+void insw(unsigned long addr, void *dst, unsigned long count);
+void insl(unsigned long addr, void *dst, unsigned long count);
#define IO_SPACE_LIMIT 0xffffffff