diff options
Diffstat (limited to 'drivers/platform/x86/ibm_rtl.c')
-rw-r--r-- | drivers/platform/x86/ibm_rtl.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/drivers/platform/x86/ibm_rtl.c b/drivers/platform/x86/ibm_rtl.c index 94a114aa8e2..b1396e5b295 100644 --- a/drivers/platform/x86/ibm_rtl.c +++ b/drivers/platform/x86/ibm_rtl.c | |||
@@ -81,6 +81,19 @@ static void __iomem *rtl_cmd_addr; | |||
81 | static u8 rtl_cmd_type; | 81 | static u8 rtl_cmd_type; |
82 | static u8 rtl_cmd_width; | 82 | static u8 rtl_cmd_width; |
83 | 83 | ||
84 | #ifndef readq | ||
85 | static inline __u64 readq(const volatile void __iomem *addr) | ||
86 | { | ||
87 | const volatile u32 __iomem *p = addr; | ||
88 | u32 low, high; | ||
89 | |||
90 | low = readl(p); | ||
91 | high = readl(p + 1); | ||
92 | |||
93 | return low + ((u64)high << 32); | ||
94 | } | ||
95 | #endif | ||
96 | |||
84 | static void __iomem *rtl_port_map(phys_addr_t addr, unsigned long len) | 97 | static void __iomem *rtl_port_map(phys_addr_t addr, unsigned long len) |
85 | { | 98 | { |
86 | if (rtl_cmd_type == RTL_ADDR_TYPE_MMIO) | 99 | if (rtl_cmd_type == RTL_ADDR_TYPE_MMIO) |