diff options
author | Rasmus Villemoes <rasmus.villemoes@prevas.dk> | 2019-09-10 08:51:53 +0000 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2019-10-11 15:33:27 -0400 |
commit | 909d0399a519e1491b3e11e6afae2287e0c08a3f (patch) | |
tree | ae8d87d9da8fcdf069eb6c7da1bc3249aa686a08 /arch/arm/include | |
parent | 17241ea0543a4c998f79bde27b8a6047c8d84d0a (diff) |
ARM: asm/io.h: kill off confusing #ifdef __mem_pci block
No ARM board seems to define __mem_pci - and if it did, one would get tons of
./arch/arm/include/asm/io.h:307:0: warning: "readl" redefined
warnings, because readl and friends are unconditionally defined
earlier in io.h. Moreover, the redefinitions lack the memory barriers
that the first definitions have. So I'm guessing this is practically
dead code.
Signed-off-by: Rasmus Villemoes <rasmus.villemoes@prevas.dk>
Diffstat (limited to 'arch/arm/include')
-rw-r--r-- | arch/arm/include/asm/io.h | 41 |
1 files changed, 0 insertions, 41 deletions
diff --git a/arch/arm/include/asm/io.h b/arch/arm/include/asm/io.h index e6d27b69f9..78b183d42f 100644 --- a/arch/arm/include/asm/io.h +++ b/arch/arm/include/asm/io.h @@ -315,46 +315,6 @@ extern void _memset_io(unsigned long, int, size_t); extern void __readwrite_bug(const char *fn); -/* - * If this architecture has PCI memory IO, then define the read/write - * macros. These should only be used with the cookie passed from - * ioremap. - */ -#ifdef __mem_pci - -#define readb(c) ({ unsigned int __v = __raw_readb(__mem_pci(c)); __v; }) -#define readw(c) ({ unsigned int __v = le16_to_cpu(__raw_readw(__mem_pci(c))); __v; }) -#define readl(c) ({ unsigned int __v = le32_to_cpu(__raw_readl(__mem_pci(c))); __v; }) - -#define writeb(v,c) __raw_writeb(v,__mem_pci(c)) -#define writew(v,c) __raw_writew(cpu_to_le16(v),__mem_pci(c)) -#define writel(v,c) __raw_writel(cpu_to_le32(v),__mem_pci(c)) - -#define memset_io(c,v,l) _memset_io(__mem_pci(c),(v),(l)) -#define memcpy_fromio(a,c,l) _memcpy_fromio((a),__mem_pci(c),(l)) -#define memcpy_toio(c,a,l) _memcpy_toio(__mem_pci(c),(a),(l)) - -#define eth_io_copy_and_sum(s,c,l,b) \ - eth_copy_and_sum((s),__mem_pci(c),(l),(b)) - -static inline int -check_signature(unsigned long io_addr, const unsigned char *signature, - int length) -{ - int retval = 0; - do { - if (readb(io_addr) != *signature) - goto out; - io_addr++; - signature++; - length--; - } while (length); - retval = 1; -out: - return retval; -} - -#else #define memset_io(a, b, c) memset((void *)(a), (b), (c)) #define memcpy_fromio(a, b, c) memcpy((a), (void *)(b), (c)) #define memcpy_toio(a, b, c) memcpy((void *)(a), (b), (c)) @@ -373,7 +333,6 @@ out: #define check_signature(io,sig,len) (0) #endif -#endif /* __mem_pci */ /* * If this architecture has ISA IO, then define the isa_read/isa_write |