]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
enic: Attempt to fix build in 32-bit such as i386.
authorDavid S. Miller <davem@davemloft.net>
Fri, 10 Oct 2008 05:13:53 +0000 (22:13 -0700)
committerDavid S. Miller <davem@davemloft.net>
Fri, 10 Oct 2008 05:13:53 +0000 (22:13 -0700)
Such platforms lack readq/writeq but this driver want to call them.

Noticed by Andrew Morton.

Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/enic/vnic_dev.h

index 2dcffd3a24bd8ee121106c9f6bdd3c44367a8dc9..b9dc1821c8050dbbe13157a02518c6fcab0face7 100644 (file)
 #define VNIC_PADDR_TARGET      0x0000000000000000ULL
 #endif
 
+#ifndef readq
+static inline u64 readq(void __iomem *reg)
+{
+       return (((u64)readl(reg + 0x4UL) << 32) |
+               (u64)readl(reg));
+}
+
+static inline void writeq(u64 val, void __iomem *reg)
+{
+       writel(val & 0xffffffff, reg);
+       writel(val >> 32, reg + 0x4UL);
+}
+#endif
+
 enum vnic_dev_intr_mode {
        VNIC_DEV_INTR_MODE_UNKNOWN,
        VNIC_DEV_INTR_MODE_INTX,