aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/host/xhci.h
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/usb/host/xhci.h')
-rw-r--r--drivers/usb/host/xhci.h10
1 files changed, 8 insertions, 2 deletions
diff --git a/drivers/usb/host/xhci.h b/drivers/usb/host/xhci.h
index 60def15d129c..9154fd6cf24c 100644
--- a/drivers/usb/host/xhci.h
+++ b/drivers/usb/host/xhci.h
@@ -28,8 +28,6 @@
28#include <linux/kernel.h> 28#include <linux/kernel.h>
29#include <linux/usb/hcd.h> 29#include <linux/usb/hcd.h>
30 30
31#include <asm-generic/io-64-nonatomic-lo-hi.h>
32
33/* Code sharing between pci-quirks and xhci hcd */ 31/* Code sharing between pci-quirks and xhci hcd */
34#include "xhci-ext-caps.h" 32#include "xhci-ext-caps.h"
35#include "pci-quirks.h" 33#include "pci-quirks.h"
@@ -1614,6 +1612,14 @@ static inline struct usb_hcd *xhci_to_hcd(struct xhci_hcd *xhci)
1614 * xHCI implementations that do not support 64-bit address pointers will ignore 1612 * xHCI implementations that do not support 64-bit address pointers will ignore
1615 * the high dword, and write order is irrelevant. 1613 * the high dword, and write order is irrelevant.
1616 */ 1614 */
1615static inline u64 xhci_read_64(const struct xhci_hcd *xhci,
1616 __le64 __iomem *regs)
1617{
1618 __u32 __iomem *ptr = (__u32 __iomem *) regs;
1619 u64 val_lo = readl(ptr);
1620 u64 val_hi = readl(ptr + 1);
1621 return val_lo + (val_hi << 32);
1622}
1617static inline void xhci_write_64(struct xhci_hcd *xhci, 1623static inline void xhci_write_64(struct xhci_hcd *xhci,
1618 const u64 val, __le64 __iomem *regs) 1624 const u64 val, __le64 __iomem *regs)
1619{ 1625{