summaryrefslogtreecommitdiff
path: root/lib/logic_pio.c
diff options
context:
space:
mode:
authorJohn Garry <john.garry@huawei.com>2020-03-27 19:06:14 +0300
committerWei Xu <xuwei5@hisilicon.com>2020-05-07 09:54:26 +0300
commit4acaa93ef64377417677d777a596e22da68c5e0d (patch)
treea336647610822f548ffd44346a73b26f5ba0ed96 /lib/logic_pio.c
parent26c4c6ce808cdc161f6330405326a0affcffcbd9 (diff)
downloadlinux-4acaa93ef64377417677d777a596e22da68c5e0d.tar.xz
logic_pio: Use _inX() and _outX()
Use _inX() and _outX(), which include memory barriers which may be overridden per arch. Reviewed-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: John Garry <john.garry@huawei.com> Signed-off-by: Wei Xu <xuwei5@hisilicon.com>
Diffstat (limited to 'lib/logic_pio.c')
-rw-r--r--lib/logic_pio.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/logic_pio.c b/lib/logic_pio.c
index 21dc731bec88..f32fe481b492 100644
--- a/lib/logic_pio.c
+++ b/lib/logic_pio.c
@@ -235,7 +235,7 @@ type logic_in##bwl(unsigned long addr) \
type ret = (type)~0; \
\
if (addr < MMIO_UPPER_LIMIT) { \
- ret = read##bwl(PCI_IOBASE + addr); \
+ ret = _in##bwl(addr); \
} else if (addr >= MMIO_UPPER_LIMIT && addr < IO_SPACE_LIMIT) { \
struct logic_pio_hwaddr *entry = find_io_range(addr); \
\
@@ -251,7 +251,7 @@ type logic_in##bwl(unsigned long addr) \
void logic_out##bwl(type value, unsigned long addr) \
{ \
if (addr < MMIO_UPPER_LIMIT) { \
- write##bwl(value, PCI_IOBASE + addr); \
+ _out##bwl(value, addr); \
} else if (addr >= MMIO_UPPER_LIMIT && addr < IO_SPACE_LIMIT) { \
struct logic_pio_hwaddr *entry = find_io_range(addr); \
\