From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: MIME-Version: 1.0 In-Reply-To: <201408210533.00196.arnd@arndb.de> References: <1408486072-19268-1-git-send-email-gael.portay@gmail.com> <1408486072-19268-4-git-send-email-gael.portay@gmail.com> <201408210533.00196.arnd@arndb.de> Date: Thu, 21 Aug 2014 11:43:33 +0200 Message-ID: Subject: Re: [PATCH 3/3] ARM: at91/tclib: mask interruptions at shutdown and probe From: =?ISO-8859-1?Q?Ga=EBl_PORTAY?= Content-Type: multipart/alternative; boundary=047d7b34313cd7a9020501208d9d List-ID: To: Arnd Bergmann Cc: Daniel Lezcano , Greg Kroah-Hartman , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-pwm@vger.kernel.org, Nicolas Ferre , Thierry Reding , Thomas Gleixner , Boris Brezillon , Alexandre Belloni , Jean-Christophe PLAGNIOL-VILLARD --047d7b34313cd7a9020501208d9d Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable On 21 August 2014 05:32, Arnd Bergmann wrote: > On Wednesday 20 August 2014, Ga=EBl PORTAY wrote: > > +static void tc_shutdown (struct platform_device *pdev) > > +{ > > + int i; > > + struct atmel_tc *tc =3D platform_get_drvdata(pdev); > > + > > + for (i =3D 0; i < 3; i++) > > + __raw_writel(0xff, tc->regs + ATMEL_TC_REG(i, IDR)); > > +} > > In general, __raw_readl/__raw_writel are not meant to be called by device > drivers. > > Just use readl/writel by default, or readl_relaxed/writel_relaxed if the > code is > performance critical and you are sure it is safe to use them. > > Arnd > Ok, I will thix this. I used __raw_readl/__raw_writel, because those functions are used in the tcb_clksrc driver. By the way... thanks every one for your review :) --=20 Ga=EBl PORTAY --047d7b34313cd7a9020501208d9d Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
On 2= 1 August 2014 05:32, Arnd Bergmann <arnd@arndb.de> wrote:
On Wednesday 20 August 2014, Ga=EBl PORTAY wrote:
> +static void tc_shutdown (struct platform_device *pdev)
> +{
> +=A0 =A0 =A0 =A0int i;
> +=A0 =A0 =A0 =A0struct atmel_tc *tc =3D platform_get_drvdata(pdev); > +
> +=A0 =A0 =A0 =A0for (i =3D 0; i < 3; i++)
> +=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0__raw_writel(0xff, tc->regs + ATMEL= _TC_REG(i, IDR));
> +}

In general, __raw_readl/__raw_writel are not meant to be called by de= vice drivers.

Just use readl/writel by default, or readl_relaxed/writel_relaxed if the co= de is
performance critical and you are sure it is safe to use them.

=A0 =A0 =A0 =A0 Arnd

Ok, I= will thix this.

I used __raw_readl= /__raw_writel, because those functions are used in the tcb_clksrc driver.

By th= e way... thanks every one for your review :)

--
Ga= =EBl PORTAY
--047d7b34313cd7a9020501208d9d--