[PATCH] Remove __raw_* accessors from PL031 RTC

Uwe Kleine-König u.kleine-koenig at pengutronix.de
Sun Nov 15 16:35:44 EST 2009


Hello,

On Thu, Nov 12, 2009 at 08:13:07AM +0100, Linus Walleij wrote:
> This switches __raw_[read|write]l() for plain [read|write]l in
> the PL031 RTC driver. The sister driver for PL030 use the simple
> accessors as most PrimeCell drivers.
> 
> Signed-off-by: Linus Walleij <linus.walleij at stericsson.com>
> ---
>  drivers/rtc/rtc-pl031.c |   23 ++++++++++++-----------
>  1 files changed, 12 insertions(+), 11 deletions(-)
> 
> diff --git a/drivers/rtc/rtc-pl031.c b/drivers/rtc/rtc-pl031.c
> index f41873f..0264b11 100644
> --- a/drivers/rtc/rtc-pl031.c
> +++ b/drivers/rtc/rtc-pl031.c
> @@ -51,10 +51,10 @@ static int pl031_ioctl(struct device *dev, unsigned int cmd, unsigned long arg)
>  
>  	switch (cmd) {
>  	case RTC_AIE_OFF:
> -		__raw_writel(1, ldata->base + RTC_MIS);
> +		writel(1, ldata->base + RTC_MIS);
arch/arm/include/asm/io.h defines writel like so:

	#define writel(v,c)		__raw_writel((__force __u32) \
						cpu_to_le32(v),__mem_pci(c))

So this change isn't a noop on big-endian systems that define __mem_pci.
I don't know how many of these exist though.

Best regards
Uwe

-- 
Pengutronix e.K.                              | Uwe Kleine-König            |
Industrial Linux Solutions                    | http://www.pengutronix.de/  |



More information about the linux-arm-kernel mailing list