From d38efc1f150f38b7f593ac7e26789c550d4bc183 Mon Sep 17 00:00:00 2001 From: Max Filippov Date: Mon, 17 Sep 2012 05:44:40 +0400 Subject: xtensa: adopt generic io routines Signed-off-by: Max Filippov Signed-off-by: Chris Zankel --- arch/xtensa/kernel/Makefile | 2 +- arch/xtensa/kernel/io.c | 75 --------------------------------------------- 2 files changed, 1 insertion(+), 76 deletions(-) delete mode 100644 arch/xtensa/kernel/io.c (limited to 'arch/xtensa/kernel') diff --git a/arch/xtensa/kernel/Makefile b/arch/xtensa/kernel/Makefile index 0f9f35f..f36cef5 100644 --- a/arch/xtensa/kernel/Makefile +++ b/arch/xtensa/kernel/Makefile @@ -6,7 +6,7 @@ extra-y := head.o vmlinux.lds obj-y := align.o entry.o irq.o coprocessor.o process.o ptrace.o \ setup.o signal.o syscall.o time.o traps.o vectors.o platform.o \ - pci-dma.o io.o + pci-dma.o obj-$(CONFIG_KGDB) += xtensa-stub.o obj-$(CONFIG_PCI) += pci.o diff --git a/arch/xtensa/kernel/io.c b/arch/xtensa/kernel/io.c deleted file mode 100644 index 5b65269..0000000 --- a/arch/xtensa/kernel/io.c +++ /dev/null @@ -1,75 +0,0 @@ -/* - * arch/xtensa/io.c - * - * IO primitives - * - * This program is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by the - * Free Software Foundation; either version 2 of the License, or (at your - * option) any later version. - * - * Copied from sparc. - * - * Chris Zankel - * - */ - -#include -#include - -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; - } -} -- cgit v1.1