Re: [PATCH 3/3] ARM: at91/tclib: mask interruptions at shutdown and probe

Gaël PORTAY
2014-08-21T09:43:33Z

[-- Attachment #1: Type: text/plain, Size: 857 bytes --]

On 21 August 2014 05:32, Arnd Bergmann <arnd@arndb.de> wrote:

> On Wednesday 20 August 2014, Gaël PORTAY wrote:
> > +static void tc_shutdown (struct platform_device *pdev)
> > +{
> > + int i;
> > + struct atmel_tc *tc = platform_get_drvdata(pdev);
> > +
> > + for (i = 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 :)

--
Gaël PORTAY

[-- Attachment #2: Type: text/html, Size: 1440 bytes --]