summaryrefslogtreecommitdiff
path: root/arch/sh/kernel/machvec.c
diff options
context:
space:
mode:
authorPaul Mundt <lethal@linux-sh.org>2010-05-25 20:06:13 +0900
committerPaul Mundt <lethal@linux-sh.org>2010-06-02 16:31:42 +0900
commit86e4dd5add77ab809f5427391dfabb8f78cbcb58 (patch)
tree43d2c40951df78d5404a72da214f8c8a788d3de3 /arch/sh/kernel/machvec.c
parent1c98347e613bf17ea2f18c9766ce0ab77f65a96d (diff)
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/machvec.c')
-rw-r--r--arch/sh/kernel/machvec.c17
1 files changed, 11 insertions, 6 deletions
diff --git a/arch/sh/kernel/machvec.c b/arch/sh/kernel/machvec.c
index 85cfaf916fdc..9f9bb63616ad 100644
--- a/arch/sh/kernel/machvec.c
+++ b/arch/sh/kernel/machvec.c
@@ -118,6 +118,14 @@ void __init sh_mv_setup(void)
sh_mv.mv_##elem = generic_##elem; \
} while (0)
+#ifdef CONFIG_HAS_IOPORT
+
+#ifdef P2SEG
+ __set_io_port_base(P2SEG);
+#else
+ __set_io_port_base(0);
+#endif
+
mv_set(inb); mv_set(inw); mv_set(inl);
mv_set(outb); mv_set(outw); mv_set(outl);
@@ -129,16 +137,13 @@ void __init sh_mv_setup(void)
mv_set(ioport_map);
mv_set(ioport_unmap);
+
+#endif
+
mv_set(irq_demux);
mv_set(mode_pins);
mv_set(mem_init);
if (!sh_mv.mv_nr_irqs)
sh_mv.mv_nr_irqs = NR_IRQS;
-
-#ifdef P2SEG
- __set_io_port_base(P2SEG);
-#else
- __set_io_port_base(0);
-#endif
}