[POWERPC] Merge iSeries i/o operations with the rest

This patch changes the io operations so that they are out of line if
CONFIG_PPC_ISERIES is set and includes a firmware feature check in
that case.

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Paul Mackerras <paulus@samba.org>
diff --git a/arch/powerpc/kernel/io.c b/arch/powerpc/kernel/io.c
index 80a3209..e981806 100644
--- a/arch/powerpc/kernel/io.c
+++ b/arch/powerpc/kernel/io.c
@@ -22,12 +22,16 @@
 #include <linux/module.h>
 
 #include <asm/io.h>
+#include <asm/firmware.h>
+#include <asm/bug.h>
 
 void _insb(volatile u8 __iomem *port, void *buf, long count)
 {
 	u8 *tbuf = buf;
 	u8 tmp;
 
+	BUG_ON(firmware_has_feature(FW_FEATURE_ISERIES));
+
 	if (unlikely(count <= 0))
 		return;
 	asm volatile("sync");
@@ -44,6 +48,8 @@
 {
 	const u8 *tbuf = buf;
 
+	BUG_ON(firmware_has_feature(FW_FEATURE_ISERIES));
+
 	if (unlikely(count <= 0))
 		return;
 	asm volatile("sync");
@@ -59,6 +65,8 @@
 	u16 *tbuf = buf;
 	u16 tmp;
 
+	BUG_ON(firmware_has_feature(FW_FEATURE_ISERIES));
+
 	if (unlikely(count <= 0))
 		return;
 	asm volatile("sync");
@@ -75,6 +83,8 @@
 {
 	const u16 *tbuf = buf;
 
+	BUG_ON(firmware_has_feature(FW_FEATURE_ISERIES));
+
 	if (unlikely(count <= 0))
 		return;
 	asm volatile("sync");
@@ -90,6 +100,8 @@
 	u32 *tbuf = buf;
 	u32 tmp;
 
+	BUG_ON(firmware_has_feature(FW_FEATURE_ISERIES));
+
 	if (unlikely(count <= 0))
 		return;
 	asm volatile("sync");
@@ -106,6 +118,8 @@
 {
 	const u32 *tbuf = buf;
 
+	BUG_ON(firmware_has_feature(FW_FEATURE_ISERIES));
+
 	if (unlikely(count <= 0))
 		return;
 	asm volatile("sync");