summaryrefslogtreecommitdiff
path: root/arch/sh/kernel/io_trapped.c
diff options
context:
space:
mode:
authorPaul Mundt <lethal@linux-sh.org>2010-05-25 11:06:13 (GMT)
committerPaul Mundt <lethal@linux-sh.org>2010-06-02 07:31:42 (GMT)
commit86e4dd5add77ab809f5427391dfabb8f78cbcb58 (patch)
tree43d2c40951df78d5404a72da214f8c8a788d3de3 /arch/sh/kernel/io_trapped.c
parent1c98347e613bf17ea2f18c9766ce0ab77f65a96d (diff)
downloadlinux-86e4dd5add77ab809f5427391dfabb8f78cbcb58.tar.xz
sh: support for platforms without PIO.
This extends some of the existing special casing for HAS_IOPORT platforms and gets it to the point where platforms can begin to conditionally select it. The major changes here are that the PIO routines themselves go away completely, including all of the machvec port mapping wrappers. With this in place it's possible for any non-machvec abusing platform to disable PIO completely. At present this is left as an opt-in until the abusers are the odd ones out instead of the majority. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'arch/sh/kernel/io_trapped.c')
-rw-r--r--arch/sh/kernel/io_trapped.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/arch/sh/kernel/io_trapped.c b/arch/sh/kernel/io_trapped.c
index 4a8bb4e..2947d2b 100644
--- a/arch/sh/kernel/io_trapped.c
+++ b/arch/sh/kernel/io_trapped.c
@@ -91,10 +91,14 @@ int register_trapped_io(struct trapped_io *tiop)
tiop->magic = IO_TRAPPED_MAGIC;
INIT_LIST_HEAD(&tiop->list);
spin_lock_irq(&trapped_lock);
+#ifdef CONFIG_HAS_IOPORT
if (flags & IORESOURCE_IO)
list_add(&tiop->list, &trapped_io);
+#endif
+#ifdef CONFIG_HAS_IOMEM
if (flags & IORESOURCE_MEM)
list_add(&tiop->list, &trapped_mem);
+#endif
spin_unlock_irq(&trapped_lock);
return 0;