aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBoris BREZILLON <boris.brezillon@free-electrons.com>2014-09-23 07:13:52 -0400
committerNicolas Ferre <nicolas.ferre@atmel.com>2014-11-13 10:07:58 -0500
commit272f1dfa617ac2eb02a34f534d8d24a6b97eeb08 (patch)
tree67a0670153dc2903d27974705b01301b6ee02cbd
parent6575bd7cbcc40dcdffb62e710ab2cd05355396c6 (diff)
rtc: at91sam9: use standard readl/writel functions instead of raw versions
Raw versions of writel and writel should not be directly used and should be replaced by their relaxed versions (readl/writel_relaxed), which take endianness conversion into account. In this driver we prefer the standard readl/writel function which add the appropriate memory barrier around the access (the performance penalty is negligible for this kind of application). Signed-off-by: Boris BREZILLON <boris.brezillon@free-electrons.com> Acked-by: Alexandre Belloni <alexandre.belloni@free-electrons.com> Acked-by: Johan Hovold <johan@kernel.org> Acked-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
-rw-r--r--drivers/rtc/rtc-at91sam9.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/rtc/rtc-at91sam9.c b/drivers/rtc/rtc-at91sam9.c
index 51f0038949df..74a9ca0bbeb4 100644
--- a/drivers/rtc/rtc-at91sam9.c
+++ b/drivers/rtc/rtc-at91sam9.c
@@ -77,14 +77,14 @@ struct sam9_rtc {
77}; 77};
78 78
79#define rtt_readl(rtc, field) \ 79#define rtt_readl(rtc, field) \
80 __raw_readl((rtc)->rtt + AT91_RTT_ ## field) 80 readl((rtc)->rtt + AT91_RTT_ ## field)
81#define rtt_writel(rtc, field, val) \ 81#define rtt_writel(rtc, field, val) \
82 __raw_writel((val), (rtc)->rtt + AT91_RTT_ ## field) 82 writel((val), (rtc)->rtt + AT91_RTT_ ## field)
83 83
84#define gpbr_readl(rtc) \ 84#define gpbr_readl(rtc) \
85 __raw_readl((rtc)->gpbr) 85 readl((rtc)->gpbr)
86#define gpbr_writel(rtc, val) \ 86#define gpbr_writel(rtc, val) \
87 __raw_writel((val), (rtc)->gpbr) 87 writel((val), (rtc)->gpbr)
88 88
89/* 89/*
90 * Read current time and date in RTC 90 * Read current time and date in RTC