diff options
Diffstat (limited to 'drivers/platform')
| -rw-r--r-- | drivers/platform/x86/ibm_rtl.c | 13 | ||||
| -rw-r--r-- | drivers/platform/x86/intel_ips.c | 13 |
2 files changed, 26 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) |
diff --git a/drivers/platform/x86/intel_ips.c b/drivers/platform/x86/intel_ips.c index 85c8ad43c0c..5ffe7c39814 100644 --- a/drivers/platform/x86/intel_ips.c +++ b/drivers/platform/x86/intel_ips.c | |||
| @@ -344,6 +344,19 @@ struct ips_driver { | |||
| 344 | static bool | 344 | static bool |
| 345 | ips_gpu_turbo_enabled(struct ips_driver *ips); | 345 | ips_gpu_turbo_enabled(struct ips_driver *ips); |
| 346 | 346 | ||
| 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 | |||
| 347 | /** | 360 | /** |
| 348 | * ips_cpu_busy - is CPU busy? | 361 | * ips_cpu_busy - is CPU busy? |
| 349 | * @ips: IPS driver struct | 362 | * @ips: IPS driver struct |
