Skip to content

Commit

Permalink
drivers/rtc/rtc-at91rm9200.c: make IO endian agnostic
Browse files Browse the repository at this point in the history
Change the __raw IO calls to readl/write_relaxed which makes the driver
endian agnostic to run properly on big endian systems.

Signed-off-by: Ben Dooks <ben.dooks@codethink.co.uk>
Cc: Alessandro Zummo <a.zummo@towertech.it>
Cc: Andrew Victor <linux@maxim.org.za>
Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Acked-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
  • Loading branch information
Ben Dooks authored and Linus Torvalds committed Apr 17, 2015
1 parent 07eec62 commit 6da7bb1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/rtc/rtc-at91rm9200.c
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,9 @@
#include "rtc-at91rm9200.h"

#define at91_rtc_read(field) \
__raw_readl(at91_rtc_regs + field)
readl_relaxed(at91_rtc_regs + field)
#define at91_rtc_write(field, val) \
__raw_writel((val), at91_rtc_regs + field)
writel_relaxed((val), at91_rtc_regs + field)

#define AT91_RTC_EPOCH 1900UL /* just like arch/arm/common/rtctime.c */

Expand Down

0 comments on commit 6da7bb1

Please sign in to comment.