Skip to content

Commit 272f1df

Browse files
Boris BREZILLONNicolas Ferre
Boris BREZILLON
authored and
Nicolas Ferre
committed
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 <[email protected]> Acked-by: Alexandre Belloni <[email protected]> Acked-by: Johan Hovold <[email protected]> Acked-by: Arnd Bergmann <[email protected]> Signed-off-by: Nicolas Ferre <[email protected]>
1 parent 6575bd7 commit 272f1df

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

drivers/rtc/rtc-at91sam9.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -77,14 +77,14 @@ struct sam9_rtc {
7777
};
7878

7979
#define rtt_readl(rtc, field) \
80-
__raw_readl((rtc)->rtt + AT91_RTT_ ## field)
80+
readl((rtc)->rtt + AT91_RTT_ ## field)
8181
#define rtt_writel(rtc, field, val) \
82-
__raw_writel((val), (rtc)->rtt + AT91_RTT_ ## field)
82+
writel((val), (rtc)->rtt + AT91_RTT_ ## field)
8383

8484
#define gpbr_readl(rtc) \
85-
__raw_readl((rtc)->gpbr)
85+
readl((rtc)->gpbr)
8686
#define gpbr_writel(rtc, val) \
87-
__raw_writel((val), (rtc)->gpbr)
87+
writel((val), (rtc)->gpbr)
8888

8989
/*
9090
* Read current time and date in RTC

0 commit comments

Comments
 (0)