Patchwork [RESEND,v2,13/33] ARM: davinci: aintc: use readl/writel_relaxed()

login
register
mail settings
Submitter Bartosz Golaszewski
Date Feb. 11, 2019, 12:25 p.m.
Message ID <20190211122606.8662-14-brgl@bgdev.pl>
Download mbox | patch
Permalink /patch/722771/
State New
Headers show

Comments

Bartosz Golaszewski - Feb. 11, 2019, 12:25 p.m.
From: Bartosz Golaszewski <bgolaszewski@baylibre.com>

Raplace all calls to __raw_readl() & __raw_writel() with readl_relaxed()
and writel_relaxed() respectively. It's safe to do as there's no
endianness conversion being done in the code.

Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
---
 arch/arm/mach-davinci/irq.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
Marc Zyngier - Feb. 11, 2019, 12:54 p.m.
On 11/02/2019 12:25, Bartosz Golaszewski wrote:
> From: Bartosz Golaszewski <bgolaszewski@baylibre.com>
> 
> Raplace all calls to __raw_readl() & __raw_writel() with readl_relaxed()
> and writel_relaxed() respectively. It's safe to do as there's no
> endianness conversion being done in the code.
> 
> Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
> ---
>  arch/arm/mach-davinci/irq.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/arch/arm/mach-davinci/irq.c b/arch/arm/mach-davinci/irq.c
> index 148c23728bdb..6a7205a844e1 100644
> --- a/arch/arm/mach-davinci/irq.c
> +++ b/arch/arm/mach-davinci/irq.c
> @@ -36,12 +36,12 @@ static struct irq_domain *davinci_aintc_irq_domain;
>  
>  static inline void davinci_aintc_writel(unsigned long value, int offset)
>  {
> -	__raw_writel(value, davinci_aintc_base + offset);
> +	writel_relaxed(value, davinci_aintc_base + offset);
>  }
>  
>  static inline unsigned long davinci_aintc_readl(int offset)
>  {
> -	return __raw_readl(davinci_aintc_base + offset);
> +	return readl_relaxed(davinci_aintc_base + offset);
>  }
>  
>  static __init void
> 

Right. And that's exactly what I'd like to see in patch #3. There is no
point having a separate patch for this when you can do the right thing
from the beginning.

Thanks,

	M.

Patch

diff --git a/arch/arm/mach-davinci/irq.c b/arch/arm/mach-davinci/irq.c
index 148c23728bdb..6a7205a844e1 100644
--- a/arch/arm/mach-davinci/irq.c
+++ b/arch/arm/mach-davinci/irq.c
@@ -36,12 +36,12 @@  static struct irq_domain *davinci_aintc_irq_domain;
 
 static inline void davinci_aintc_writel(unsigned long value, int offset)
 {
-	__raw_writel(value, davinci_aintc_base + offset);
+	writel_relaxed(value, davinci_aintc_base + offset);
 }
 
 static inline unsigned long davinci_aintc_readl(int offset)
 {
-	return __raw_readl(davinci_aintc_base + offset);
+	return readl_relaxed(davinci_aintc_base + offset);
 }
 
 static __init void