diff options
author | Andy Shevchenko <andriy.shevchenko@linux.intel.com> | 2015-09-14 04:32:48 -0400 |
---|---|---|
committer | Lee Jones <lee.jones@linaro.org> | 2015-10-26 10:49:03 -0400 |
commit | 689d4453ed8212ab4a5d53982ac01cbe6531d18a (patch) | |
tree | 987cf0494829c44a73366fdb69371ce8a0f7c4f3 /drivers/mfd/intel-lpss.c | |
parent | 327cc18e76295690f560feb999cd4ec0e5d661d5 (diff) |
mfd: intel-lpss: Use writeq() helper
There are already helper functions to do 64-bit I/O on 32-bit machines, thus we
don't need to reinvent the wheel. In our case we can't use readq() / writeq()
even on 64-bit kernel since there is a hardware limitation (OCP bus is a 32-bit
bus).
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Diffstat (limited to 'drivers/mfd/intel-lpss.c')
-rw-r--r-- | drivers/mfd/intel-lpss.c | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/drivers/mfd/intel-lpss.c b/drivers/mfd/intel-lpss.c index fdf4d5c1add2..001a7d7708ce 100644 --- a/drivers/mfd/intel-lpss.c +++ b/drivers/mfd/intel-lpss.c | |||
@@ -26,6 +26,8 @@ | |||
26 | #include <linux/pm_runtime.h> | 26 | #include <linux/pm_runtime.h> |
27 | #include <linux/seq_file.h> | 27 | #include <linux/seq_file.h> |
28 | 28 | ||
29 | #include <asm-generic/io-64-nonatomic-lo-hi.h> | ||
30 | |||
29 | #include "intel-lpss.h" | 31 | #include "intel-lpss.h" |
30 | 32 | ||
31 | #define LPSS_DEV_OFFSET 0x000 | 33 | #define LPSS_DEV_OFFSET 0x000 |
@@ -52,8 +54,7 @@ | |||
52 | #define LPSS_PRIV_SSP_REG 0x20 | 54 | #define LPSS_PRIV_SSP_REG 0x20 |
53 | #define LPSS_PRIV_SSP_REG_DIS_DMA_FIN BIT(0) | 55 | #define LPSS_PRIV_SSP_REG_DIS_DMA_FIN BIT(0) |
54 | 56 | ||
55 | #define LPSS_PRIV_REMAP_ADDR_LO 0x40 | 57 | #define LPSS_PRIV_REMAP_ADDR 0x40 |
56 | #define LPSS_PRIV_REMAP_ADDR_HI 0x44 | ||
57 | 58 | ||
58 | #define LPSS_PRIV_CAPS 0xfc | 59 | #define LPSS_PRIV_CAPS 0xfc |
59 | #define LPSS_PRIV_CAPS_NO_IDMA BIT(8) | 60 | #define LPSS_PRIV_CAPS_NO_IDMA BIT(8) |
@@ -250,12 +251,7 @@ static void intel_lpss_set_remap_addr(const struct intel_lpss *lpss) | |||
250 | { | 251 | { |
251 | resource_size_t addr = lpss->info->mem->start; | 252 | resource_size_t addr = lpss->info->mem->start; |
252 | 253 | ||
253 | writel(addr, lpss->priv + LPSS_PRIV_REMAP_ADDR_LO); | 254 | lo_hi_writeq(addr, lpss->priv + LPSS_PRIV_REMAP_ADDR); |
254 | #if BITS_PER_LONG > 32 | ||
255 | writel(addr >> 32, lpss->priv + LPSS_PRIV_REMAP_ADDR_HI); | ||
256 | #else | ||
257 | writel(0, lpss->priv + LPSS_PRIV_REMAP_ADDR_HI); | ||
258 | #endif | ||
259 | } | 255 | } |
260 | 256 | ||
261 | static void intel_lpss_deassert_reset(const struct intel_lpss *lpss) | 257 | static void intel_lpss_deassert_reset(const struct intel_lpss *lpss) |