Commit 272f1dfa authored by Boris BREZILLON's avatar Boris BREZILLON Committed by Nicolas Ferre

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: default avatarBoris BREZILLON <boris.brezillon@free-electrons.com>
Acked-by: default avatarAlexandre Belloni <alexandre.belloni@free-electrons.com>
Acked-by: default avatarJohan Hovold <johan@kernel.org>
Acked-by: default avatarArnd Bergmann <arnd@arndb.de>
Signed-off-by: default avatarNicolas Ferre <nicolas.ferre@atmel.com>
parent 6575bd7c
...@@ -77,14 +77,14 @@ struct sam9_rtc { ...@@ -77,14 +77,14 @@ struct sam9_rtc {
}; };
#define rtt_readl(rtc, field) \ #define rtt_readl(rtc, field) \
__raw_readl((rtc)->rtt + AT91_RTT_ ## field) readl((rtc)->rtt + AT91_RTT_ ## field)
#define rtt_writel(rtc, field, val) \ #define rtt_writel(rtc, field, val) \
__raw_writel((val), (rtc)->rtt + AT91_RTT_ ## field) writel((val), (rtc)->rtt + AT91_RTT_ ## field)
#define gpbr_readl(rtc) \ #define gpbr_readl(rtc) \
__raw_readl((rtc)->gpbr) readl((rtc)->gpbr)
#define gpbr_writel(rtc, val) \ #define gpbr_writel(rtc, val) \
__raw_writel((val), (rtc)->gpbr) writel((val), (rtc)->gpbr)
/* /*
* Read current time and date in RTC * Read current time and date in RTC
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment