39 lines
1.0 KiB
Plaintext
39 lines
1.0 KiB
Plaintext
|
From: Jeff Mahoney <jeffm@suse.com>
|
||
|
Subject: qla4xxx: add workaround for missing readq/writeq
|
||
|
Patch-mainline: submitted Sep 21, 2010
|
||
|
|
||
|
Commit f4f5df23 added support for ISP82XX devices but unconditionally
|
||
|
used readq/writeq without defining it for architectures that don't
|
||
|
support it natively.
|
||
|
|
||
|
This patch copies the readq/writeq definitions from the qla2xxx driver
|
||
|
to allow the code to build on e.g. ppc32 hardware.
|
||
|
|
||
|
Signed-off-by: Jeff Mahoney <jeffm@suse.com>
|
||
|
---
|
||
|
drivers/scsi/qla4xxx/ql4_nx.h | 15 +++++++++++++++
|
||
|
1 file changed, 15 insertions(+)
|
||
|
|
||
|
--- a/drivers/scsi/qla4xxx/ql4_nx.h
|
||
|
+++ b/drivers/scsi/qla4xxx/ql4_nx.h
|
||
|
@@ -776,4 +776,19 @@ struct crb_addr_pair {
|
||
|
#define MIU_TEST_AGT_WRDATA_UPPER_LO (0x0b0)
|
||
|
#define MIU_TEST_AGT_WRDATA_UPPER_HI (0x0b4)
|
||
|
|
||
|
+#ifndef readq
|
||
|
+static inline u64 readq(void __iomem *addr)
|
||
|
+{
|
||
|
+ return readl(addr) | (((u64) readl(addr + 4)) << 32LL);
|
||
|
+}
|
||
|
+#endif
|
||
|
+
|
||
|
+#ifndef writeq
|
||
|
+static inline void writeq(u64 val, void __iomem *addr)
|
||
|
+{
|
||
|
+ writel(((u32) (val)), (addr));
|
||
|
+ writel(((u32) (val >> 32)), (addr + 4));
|
||
|
+}
|
||
|
+#endif
|
||
|
+
|
||
|
#endif
|