From 03dd4cb26d967f9588437b0fc9cc0e8353322bb7 Mon Sep 17 00:00:00 2001 From: André Fabian Silva Delgado Date: Fri, 25 Mar 2016 03:53:42 -0300 Subject: Linux-libre 4.5-gnu --- arch/h8300/include/asm/io.h | 47 ++++++++++++++++++++++++++------------------- 1 file changed, 27 insertions(+), 20 deletions(-) (limited to 'arch/h8300/include/asm/io.h') diff --git a/arch/h8300/include/asm/io.h b/arch/h8300/include/asm/io.h index bb837cded..2e221c5f0 100644 --- a/arch/h8300/include/asm/io.h +++ b/arch/h8300/include/asm/io.h @@ -3,55 +3,62 @@ #ifdef __KERNEL__ -#include - /* H8/300 internal I/O functions */ -static inline unsigned char ctrl_inb(unsigned long addr) + +#define __raw_readb __raw_readb +static inline u8 __raw_readb(const volatile void __iomem *addr) { - return *(volatile unsigned char *)addr; + return *(volatile u8 *)addr; } -static inline unsigned short ctrl_inw(unsigned long addr) +#define __raw_readw __raw_readw +static inline u16 __raw_readw(const volatile void __iomem *addr) { - return *(volatile unsigned short *)addr; + return *(volatile u16 *)addr; } -static inline unsigned long ctrl_inl(unsigned long addr) +#define __raw_readl __raw_readl +static inline u32 __raw_readl(const volatile void __iomem *addr) { - return *(volatile unsigned long *)addr; + return *(volatile u32 *)addr; } -static inline void ctrl_outb(unsigned char b, unsigned long addr) +#define __raw_writeb __raw_writeb +static inline void __raw_writeb(u8 b, const volatile void __iomem *addr) { - *(volatile unsigned char *)addr = b; + *(volatile u8 *)addr = b; } -static inline void ctrl_outw(unsigned short b, unsigned long addr) +#define __raw_writew __raw_writew +static inline void __raw_writew(u16 b, const volatile void __iomem *addr) { - *(volatile unsigned short *)addr = b; + *(volatile u16 *)addr = b; } -static inline void ctrl_outl(unsigned long b, unsigned long addr) +#define __raw_writel __raw_writel +static inline void __raw_writel(u32 b, const volatile void __iomem *addr) { - *(volatile unsigned long *)addr = b; + *(volatile u32 *)addr = b; } -static inline void ctrl_bclr(int b, unsigned char *addr) +static inline void ctrl_bclr(int b, void __iomem *addr) { if (__builtin_constant_p(b)) - __asm__("bclr %1,%0" : "+WU"(*addr): "i"(b)); + __asm__("bclr %1,%0" : "+WU"(*(u8 *)addr): "i"(b)); else - __asm__("bclr %w1,%0" : "+WU"(*addr): "r"(b)); + __asm__("bclr %w1,%0" : "+WU"(*(u8 *)addr): "r"(b)); } -static inline void ctrl_bset(int b, unsigned char *addr) +static inline void ctrl_bset(int b, void __iomem *addr) { if (__builtin_constant_p(b)) - __asm__("bset %1,%0" : "+WU"(*addr): "i"(b)); + __asm__("bset %1,%0" : "+WU"(*(u8 *)addr): "i"(b)); else - __asm__("bset %w1,%0" : "+WU"(*addr): "r"(b)); + __asm__("bset %w1,%0" : "+WU"(*(u8 *)addr): "r"(b)); } +#include + #endif /* __KERNEL__ */ #endif /* _H8300_IO_H */ -- cgit v1.2.3-54-g00ecf