diff options
author | Chris Zankel <chris@zankel.net> | 2007-08-04 14:31:04 -0700 |
---|---|---|
committer | Chris Zankel <chris@zankel.net> | 2007-08-27 13:53:22 -0700 |
commit | 787a22d1d284b21ad810fd0bedbdefb329f31cd2 (patch) | |
tree | 3474f2b514ce0b7a9ca9c9ece412556bf6f0b191 /arch/xtensa/kernel/pci.c | |
parent | 73089cbfdf0c69e061a4fa90d614679e630c6727 (diff) | |
download | blackbird-op-linux-787a22d1d284b21ad810fd0bedbdefb329f31cd2.tar.gz blackbird-op-linux-787a22d1d284b21ad810fd0bedbdefb329f31cd2.zip |
[XTENSA] Move string-io functions to io.c from pci.c
The string-io functions (outs{bwl}, ins{bwl}) are independent from
the PCI option and should be in a separate file.
Signed-off-by: Chris Zankel <chris@zankel.net>
Diffstat (limited to 'arch/xtensa/kernel/pci.c')
-rw-r--r-- | arch/xtensa/kernel/pci.c | 69 |
1 files changed, 0 insertions, 69 deletions
diff --git a/arch/xtensa/kernel/pci.c b/arch/xtensa/kernel/pci.c index 77deae5290f0..b7c073484e01 100644 --- a/arch/xtensa/kernel/pci.c +++ b/arch/xtensa/kernel/pci.c @@ -394,72 +394,3 @@ int pci_mmap_page_range(struct pci_dev *dev, struct vm_area_struct *vma, return ret; } - -/* - * This probably belongs here rather than ioport.c because - * we do not want this crud linked into SBus kernels. - * Also, think for a moment about likes of floppy.c that - * include architecture specific parts. They may want to redefine ins/outs. - * - * We do not use horrible macros here because we want to - * advance pointer by sizeof(size). - */ -void outsb(unsigned long addr, const void *src, unsigned long count) { - while (count) { - count -= 1; - writeb(*(const char *)src, addr); - src += 1; - addr += 1; - } -} - -void outsw(unsigned long addr, const void *src, unsigned long count) { - while (count) { - count -= 2; - writew(*(const short *)src, addr); - src += 2; - addr += 2; - } -} - -void outsl(unsigned long addr, const void *src, unsigned long count) { - while (count) { - count -= 4; - writel(*(const long *)src, addr); - src += 4; - addr += 4; - } -} - -void insb(unsigned long addr, void *dst, unsigned long count) { - while (count) { - count -= 1; - *(unsigned char *)dst = readb(addr); - dst += 1; - addr += 1; - } -} - -void insw(unsigned long addr, void *dst, unsigned long count) { - while (count) { - count -= 2; - *(unsigned short *)dst = readw(addr); - dst += 2; - addr += 2; - } -} - -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); - dst += 4; - addr += 4; - } -} - - - |