diff options
author | Sinan Kaya <okaya@codeaurora.org> | 2018-04-05 09:09:12 -0400 |
---|---|---|
committer | Arnd Bergmann <arnd@arndb.de> | 2018-04-06 06:02:04 -0400 |
commit | a7851aa54c0cdd2f62457b72aee0da5d5586e514 (patch) | |
tree | 0fccafba788a172ee6b65f9e5fc49eb5551538a9 | |
parent | 755bd04aaf4bf7c49ce8aad2677ea4d14271fc46 (diff) |
io: change outX() to have their own IO barrier overrides
Open code writeX() inside outX() so that outX() variants have their own
overrideable Port IO barrier combinations as __io_pbw() and __io_paw() for
actions to be taken before port IO and after port IO write.
Signed-off-by: Sinan Kaya <okaya@codeaurora.org>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
-rw-r--r-- | include/asm-generic/io.h | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/include/asm-generic/io.h b/include/asm-generic/io.h index 964725e4f459..53226d907c45 100644 --- a/include/asm-generic/io.h +++ b/include/asm-generic/io.h | |||
@@ -457,7 +457,9 @@ static inline u32 inl(unsigned long addr) | |||
457 | #define outb outb | 457 | #define outb outb |
458 | static inline void outb(u8 value, unsigned long addr) | 458 | static inline void outb(u8 value, unsigned long addr) |
459 | { | 459 | { |
460 | writeb(value, PCI_IOBASE + addr); | 460 | __io_pbw(); |
461 | __raw_writeb(value, PCI_IOBASE + addr); | ||
462 | __io_paw(); | ||
461 | } | 463 | } |
462 | #endif | 464 | #endif |
463 | 465 | ||
@@ -465,7 +467,9 @@ static inline void outb(u8 value, unsigned long addr) | |||
465 | #define outw outw | 467 | #define outw outw |
466 | static inline void outw(u16 value, unsigned long addr) | 468 | static inline void outw(u16 value, unsigned long addr) |
467 | { | 469 | { |
468 | writew(value, PCI_IOBASE + addr); | 470 | __io_pbw(); |
471 | __raw_writew(cpu_to_le16(value), PCI_IOBASE + addr); | ||
472 | __io_paw(); | ||
469 | } | 473 | } |
470 | #endif | 474 | #endif |
471 | 475 | ||
@@ -473,7 +477,9 @@ static inline void outw(u16 value, unsigned long addr) | |||
473 | #define outl outl | 477 | #define outl outl |
474 | static inline void outl(u32 value, unsigned long addr) | 478 | static inline void outl(u32 value, unsigned long addr) |
475 | { | 479 | { |
476 | writel(value, PCI_IOBASE + addr); | 480 | __io_pbw(); |
481 | __raw_writel(cpu_to_le32(value), PCI_IOBASE + addr); | ||
482 | __io_paw(); | ||
477 | } | 483 | } |
478 | #endif | 484 | #endif |
479 | 485 | ||