asm-generic: io: implement relaxed accessor macros as conditional wrappers
authorWill Deacon <will.deacon@arm.com>
Tue, 3 Sep 2013 09:44:00 +0000 (10:44 +0100)
committerWill Deacon <will.deacon@arm.com>
Mon, 20 Oct 2014 17:49:17 +0000 (18:49 +0100)
commit9439eb3ab9d1ece6e4ad7baaa4a7f534f9b9dab0
treee0c055ab3595d0f6f865f6aa2bbb0c6d51442adb
parentf114040e3ea6e07372334ade75d1ee0775c355e1
asm-generic: io: implement relaxed accessor macros as conditional wrappers

{read,write}{b,w,l,q}_relaxed are implemented by some architectures in
order to permit memory-mapped I/O accesses with weaker barrier semantics
than the non-relaxed variants.

This patch adds wrappers to asm-generic so that drivers can rely on the
relaxed accessors being available, even if they don't always provide
weaker ordering guarantees. Since some architectures both include
asm-generic/io.h and define some relaxed accessors, the definitions here
are conditional for the time being.

Cc: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Will Deacon <will.deacon@arm.com>
include/asm-generic/io.h