Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1228814

Re: [PATCH v1 2/2] mfd: intel-lpss: use writeq() helper

From Lee Jones <lee.jones@linaro.org>
Newsgroups linux.kernel
Subject Re: [PATCH v1 2/2] mfd: intel-lpss: use writeq() helper
Date 2015-09-20 06:20 +0200
Message-ID <qaEgx-5MM-5@gated-at.bofh.it> (permalink)
References <q8xsT-Tg-25@gated-at.bofh.it> <q8xsU-Tg-53@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Mon, 14 Sep 2015, Andy Shevchenko wrote:

> 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>
> ---
>  drivers/mfd/intel-lpss.c | 12 ++++--------
>  1 file changed, 4 insertions(+), 8 deletions(-)

Applied, thanks.

> diff --git a/drivers/mfd/intel-lpss.c b/drivers/mfd/intel-lpss.c
> index fdf4d5c..001a7d7 100644
> --- a/drivers/mfd/intel-lpss.c
> +++ b/drivers/mfd/intel-lpss.c
> @@ -26,6 +26,8 @@
>  #include <linux/pm_runtime.h>
>  #include <linux/seq_file.h>
>  
> +#include <asm-generic/io-64-nonatomic-lo-hi.h>
> +
>  #include "intel-lpss.h"
>  
>  #define LPSS_DEV_OFFSET		0x000
> @@ -52,8 +54,7 @@
>  #define LPSS_PRIV_SSP_REG		0x20
>  #define LPSS_PRIV_SSP_REG_DIS_DMA_FIN	BIT(0)
>  
> -#define LPSS_PRIV_REMAP_ADDR_LO		0x40
> -#define LPSS_PRIV_REMAP_ADDR_HI		0x44
> +#define LPSS_PRIV_REMAP_ADDR		0x40
>  
>  #define LPSS_PRIV_CAPS			0xfc
>  #define LPSS_PRIV_CAPS_NO_IDMA		BIT(8)
> @@ -250,12 +251,7 @@ static void intel_lpss_set_remap_addr(const struct intel_lpss *lpss)
>  {
>  	resource_size_t addr = lpss->info->mem->start;
>  
> -	writel(addr, lpss->priv + LPSS_PRIV_REMAP_ADDR_LO);
> -#if BITS_PER_LONG > 32
> -	writel(addr >> 32, lpss->priv + LPSS_PRIV_REMAP_ADDR_HI);
> -#else
> -	writel(0, lpss->priv + LPSS_PRIV_REMAP_ADDR_HI);
> -#endif
> +	lo_hi_writeq(addr, lpss->priv + LPSS_PRIV_REMAP_ADDR);
>  }
>  
>  static void intel_lpss_deassert_reset(const struct intel_lpss *lpss)

-- 
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH v1 0/2] mfd: intel-lpss: fix a bug and clean up Andy Shevchenko <andriy.shevchenko@linux.intel.com> - 2015-09-14 10:40 +0200
  [PATCH v1 2/2] mfd: intel-lpss: use writeq() helper Andy Shevchenko <andriy.shevchenko@linux.intel.com> - 2015-09-14 10:40 +0200
    Re: [PATCH v1 2/2] mfd: intel-lpss: use writeq() helper Lee Jones <lee.jones@linaro.org> - 2015-09-20 06:20 +0200
  Re: [PATCH v1 0/2] mfd: intel-lpss: fix a bug and clean up Mika Westerberg <mika.westerberg@linux.intel.com> - 2015-09-14 16:50 +0200
  Re: [PATCH v1 0/2] mfd: intel-lpss: fix a bug and clean up Andy Shevchenko <andriy.shevchenko@linux.intel.com> - 2015-09-17 10:30 +0200
    Re: [PATCH v1 0/2] mfd: intel-lpss: fix a bug and clean up Lee Jones <lee.jones@linaro.org> - 2015-09-17 15:20 +0200

csiph-web