diff options
| -rw-r--r-- | drivers/ntb/hw/intel/ntb_hw_intel.h | 30 |
1 files changed, 1 insertions, 29 deletions
diff --git a/drivers/ntb/hw/intel/ntb_hw_intel.h b/drivers/ntb/hw/intel/ntb_hw_intel.h index c49ff8970ce3..e071e28bca3f 100644 --- a/drivers/ntb/hw/intel/ntb_hw_intel.h +++ b/drivers/ntb/hw/intel/ntb_hw_intel.h | |||
| @@ -53,6 +53,7 @@ | |||
| 53 | 53 | ||
| 54 | #include <linux/ntb.h> | 54 | #include <linux/ntb.h> |
| 55 | #include <linux/pci.h> | 55 | #include <linux/pci.h> |
| 56 | #include <linux/io-64-nonatomic-lo-hi.h> | ||
| 56 | 57 | ||
| 57 | /* PCI device IDs */ | 58 | /* PCI device IDs */ |
| 58 | #define PCI_DEVICE_ID_INTEL_NTB_B2B_JSF 0x3725 | 59 | #define PCI_DEVICE_ID_INTEL_NTB_B2B_JSF 0x3725 |
| @@ -218,33 +219,4 @@ static inline int pdev_is_gen3(struct pci_dev *pdev) | |||
| 218 | return 0; | 219 | return 0; |
| 219 | } | 220 | } |
| 220 | 221 | ||
| 221 | #ifndef ioread64 | ||
| 222 | #ifdef readq | ||
| 223 | #define ioread64 readq | ||
| 224 | #else | ||
| 225 | #define ioread64 _ioread64 | ||
| 226 | static inline u64 _ioread64(void __iomem *mmio) | ||
| 227 | { | ||
| 228 | u64 low, high; | ||
| 229 | |||
| 230 | low = ioread32(mmio); | ||
| 231 | high = ioread32(mmio + sizeof(u32)); | ||
| 232 | return low | (high << 32); | ||
| 233 | } | ||
| 234 | #endif | ||
| 235 | #endif | ||
| 236 | |||
| 237 | #ifndef iowrite64 | ||
| 238 | #ifdef writeq | ||
| 239 | #define iowrite64 writeq | ||
| 240 | #else | ||
| 241 | #define iowrite64 _iowrite64 | ||
| 242 | static inline void _iowrite64(u64 val, void __iomem *mmio) | ||
| 243 | { | ||
| 244 | iowrite32(val, mmio); | ||
| 245 | iowrite32(val >> 32, mmio + sizeof(u32)); | ||
| 246 | } | ||
| 247 | #endif | ||
| 248 | #endif | ||
| 249 | |||
| 250 | #endif | 222 | #endif |
