diff options
-rw-r--r-- | drivers/usb/host/xhci.h | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/drivers/usb/host/xhci.h b/drivers/usb/host/xhci.h index 1a3f7e7642..9ffbb103d5 100644 --- a/drivers/usb/host/xhci.h +++ b/drivers/usb/host/xhci.h @@ -18,6 +18,7 @@ #include <asm/types.h> #include <io.h> +#include <io-64-nonatomic-lo-hi.h> #include <linux/list.h> #define MAX_EP_CTX_NUM 31 @@ -1112,10 +1113,7 @@ static inline u64 xhci_readq(__le64 volatile *regs) #if BITS_PER_LONG == 64 return readq(regs); #else - __u32 *ptr = (__u32 *)regs; - u64 val_lo = readl(ptr); - u64 val_hi = readl(ptr + 1); - return val_lo + (val_hi << 32); + return lo_hi_readq(regs); #endif } @@ -1124,12 +1122,7 @@ static inline void xhci_writeq(__le64 volatile *regs, const u64 val) #if BITS_PER_LONG == 64 writeq(val, regs); #else - __u32 *ptr = (__u32 *)regs; - u32 val_lo = lower_32_bits(val); - /* FIXME */ - u32 val_hi = upper_32_bits(val); - writel(val_lo, ptr); - writel(val_hi, ptr + 1); + lo_hi_writeq(val, regs); #endif } |