diff options
Diffstat (limited to 'drivers/platform/x86')
| -rw-r--r-- | drivers/platform/x86/ibm_rtl.c | 15 | ||||
| -rw-r--r-- | drivers/platform/x86/intel_ips.c | 15 |
2 files changed, 4 insertions, 26 deletions
diff --git a/drivers/platform/x86/ibm_rtl.c b/drivers/platform/x86/ibm_rtl.c index 42a7d603c870..7481146a5b47 100644 --- a/drivers/platform/x86/ibm_rtl.c +++ b/drivers/platform/x86/ibm_rtl.c | |||
| @@ -33,6 +33,8 @@ | |||
| 33 | #include <linux/mutex.h> | 33 | #include <linux/mutex.h> |
| 34 | #include <asm/bios_ebda.h> | 34 | #include <asm/bios_ebda.h> |
| 35 | 35 | ||
| 36 | #include <asm-generic/io-64-nonatomic-lo-hi.h> | ||
| 37 | |||
| 36 | static bool force; | 38 | static bool force; |
| 37 | module_param(force, bool, 0); | 39 | module_param(force, bool, 0); |
| 38 | MODULE_PARM_DESC(force, "Force driver load, ignore DMI data"); | 40 | MODULE_PARM_DESC(force, "Force driver load, ignore DMI data"); |
| @@ -83,19 +85,6 @@ static void __iomem *rtl_cmd_addr; | |||
| 83 | static u8 rtl_cmd_type; | 85 | static u8 rtl_cmd_type; |
| 84 | static u8 rtl_cmd_width; | 86 | static u8 rtl_cmd_width; |
| 85 | 87 | ||
| 86 | #ifndef readq | ||
| 87 | static inline __u64 readq(const volatile void __iomem *addr) | ||
| 88 | { | ||
| 89 | const volatile u32 __iomem *p = addr; | ||
| 90 | u32 low, high; | ||
| 91 | |||
| 92 | low = readl(p); | ||
| 93 | high = readl(p + 1); | ||
| 94 | |||
| 95 | return low + ((u64)high << 32); | ||
| 96 | } | ||
| 97 | #endif | ||
| 98 | |||
| 99 | static void __iomem *rtl_port_map(phys_addr_t addr, unsigned long len) | 88 | static void __iomem *rtl_port_map(phys_addr_t addr, unsigned long len) |
| 100 | { | 89 | { |
| 101 | if (rtl_cmd_type == RTL_ADDR_TYPE_MMIO) | 90 | if (rtl_cmd_type == RTL_ADDR_TYPE_MMIO) |
diff --git a/drivers/platform/x86/intel_ips.c b/drivers/platform/x86/intel_ips.c index 809a3ae943c6..88a98cff5a44 100644 --- a/drivers/platform/x86/intel_ips.c +++ b/drivers/platform/x86/intel_ips.c | |||
| @@ -77,6 +77,8 @@ | |||
| 77 | #include <asm/processor.h> | 77 | #include <asm/processor.h> |
| 78 | #include "intel_ips.h" | 78 | #include "intel_ips.h" |
| 79 | 79 | ||
| 80 | #include <asm-generic/io-64-nonatomic-lo-hi.h> | ||
| 81 | |||
| 80 | #define PCI_DEVICE_ID_INTEL_THERMAL_SENSOR 0x3b32 | 82 | #define PCI_DEVICE_ID_INTEL_THERMAL_SENSOR 0x3b32 |
| 81 | 83 | ||
| 82 | /* | 84 | /* |
| @@ -344,19 +346,6 @@ struct ips_driver { | |||
| 344 | static bool | 346 | static bool |
| 345 | ips_gpu_turbo_enabled(struct ips_driver *ips); | 347 | ips_gpu_turbo_enabled(struct ips_driver *ips); |
| 346 | 348 | ||
| 347 | #ifndef readq | ||
| 348 | static inline __u64 readq(const volatile void __iomem *addr) | ||
| 349 | { | ||
| 350 | const volatile u32 __iomem *p = addr; | ||
| 351 | u32 low, high; | ||
| 352 | |||
| 353 | low = readl(p); | ||
| 354 | high = readl(p + 1); | ||
| 355 | |||
| 356 | return low + ((u64)high << 32); | ||
| 357 | } | ||
| 358 | #endif | ||
| 359 | |||
| 360 | /** | 349 | /** |
| 361 | * ips_cpu_busy - is CPU busy? | 350 | * ips_cpu_busy - is CPU busy? |
| 362 | * @ips: IPS driver struct | 351 | * @ips: IPS driver struct |
