summaryrefslogtreecommitdiffstats
path: root/arch/powerpc/kernel/io.c
diff options
context:
space:
mode:
authorStephen Rothwell <sfr@canb.auug.org.au>2006-09-21 18:00:00 +1000
committerPaul Mackerras <paulus@samba.org>2006-09-22 15:19:58 +1000
commitcaf81329c39b5c48f6cc0d78fa159b5a587e37f9 (patch)
tree7cf6afe7a14e2a9d1cc962895b61d8cb24e71793 /arch/powerpc/kernel/io.c
parent7da8a2e5c1fd2ee513fdeac8d13c4f3623838fd0 (diff)
[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>
Diffstat (limited to 'arch/powerpc/kernel/io.c')
-rw-r--r--arch/powerpc/kernel/io.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/arch/powerpc/kernel/io.c b/arch/powerpc/kernel/io.c
index 80a3209acef..e98180686b3 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 @@ void _outsb(volatile u8 __iomem *port, const void *buf, long count)
{
const u8 *tbuf = buf;
+ BUG_ON(firmware_has_feature(FW_FEATURE_ISERIES));
+
if (unlikely(count <= 0))
return;
asm volatile("sync");
@@ -59,6 +65,8 @@ void _insw_ns(volatile u16 __iomem *port, void *buf, long count)
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 @@ void _outsw_ns(volatile u16 __iomem *port, const void *buf, long count)
{
const u16 *tbuf = buf;
+ BUG_ON(firmware_has_feature(FW_FEATURE_ISERIES));
+
if (unlikely(count <= 0))
return;
asm volatile("sync");
@@ -90,6 +100,8 @@ void _insl_ns(volatile u32 __iomem *port, void *buf, long count)
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 @@ void _outsl_ns(volatile u32 __iomem *port, const void *buf, long count)
{
const u32 *tbuf = buf;
+ BUG_ON(firmware_has_feature(FW_FEATURE_ISERIES));
+
if (unlikely(count <= 0))
return;
asm volatile("sync");