OSDN Git Service

[SCSI] ipr: add writeq definition if needed
authorWayne Boyer <wayneb@linux.vnet.ibm.com>
Wed, 9 Jun 2010 15:24:55 +0000 (08:24 -0700)
committerJames Bottomley <James.Bottomley@suse.de>
Tue, 27 Jul 2010 17:01:40 +0000 (12:01 -0500)
Compiling the driver will fail on 32 bit powerpc and other
architectures where writeq is not defined.  This patch adds a
definition for writeq.

Signed-off-by: Wayne Boyer <wayneb@linux.vnet.ibm.com>
Acked-by: Brian King <brking@linux.vnet.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
drivers/scsi/ipr.h

index ea391ff..0ef9a67 100644 (file)
@@ -1860,4 +1860,12 @@ static inline int ipr_sdt_is_fmt2(u32 sdt_word)
        return 0;
 }
 
+#ifndef writeq
+static inline void writeq(u64 val, void __iomem *addr)
+{
+        writel(((u32) (val >> 32)), addr);
+        writel(((u32) (val)), (addr + 4));
+}
 #endif
+
+#endif /* _IPR_H */