aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/enic/vnic_dev.h
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/enic/vnic_dev.h')
-rw-r--r--drivers/net/enic/vnic_dev.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/drivers/net/enic/vnic_dev.h b/drivers/net/enic/vnic_dev.h
index 2dcffd3a24bd..b9dc1821c805 100644
--- a/drivers/net/enic/vnic_dev.h
+++ b/drivers/net/enic/vnic_dev.h
@@ -27,6 +27,20 @@
27#define VNIC_PADDR_TARGET 0x0000000000000000ULL 27#define VNIC_PADDR_TARGET 0x0000000000000000ULL
28#endif 28#endif
29 29
30#ifndef readq
31static inline u64 readq(void __iomem *reg)
32{
33 return (((u64)readl(reg + 0x4UL) << 32) |
34 (u64)readl(reg));
35}
36
37static inline void writeq(u64 val, void __iomem *reg)
38{
39 writel(val & 0xffffffff, reg);
40 writel(val >> 32, reg + 0x4UL);
41}
42#endif
43
30enum vnic_dev_intr_mode { 44enum vnic_dev_intr_mode {
31 VNIC_DEV_INTR_MODE_UNKNOWN, 45 VNIC_DEV_INTR_MODE_UNKNOWN,
32 VNIC_DEV_INTR_MODE_INTX, 46 VNIC_DEV_INTR_MODE_INTX,