From: Steven Miao Date: Tue, 20 Jan 2015 08:53:38 +0000 (+0800) Subject: blackfin: io: define __raw_readx/writex with bfin_readx/writex X-Git-Tag: v5.15~15876^2~4 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=1a3372bc522ef8ba749c019c52d63168267fac0a;p=platform%2Fkernel%2Flinux-starfive.git blackfin: io: define __raw_readx/writex with bfin_readx/writex Signed-off-by: Steven Miao --- diff --git a/arch/blackfin/include/asm/io.h b/arch/blackfin/include/asm/io.h index dccae26..b03ac90 100644 --- a/arch/blackfin/include/asm/io.h +++ b/arch/blackfin/include/asm/io.h @@ -11,27 +11,12 @@ #include #include -#define DECLARE_BFIN_RAW_READX(size, type, asm, asm_sign) \ -static inline type __raw_read##size(const volatile void __iomem *addr) \ -{ \ - unsigned int val; \ - int tmp; \ - __asm__ __volatile__ ( \ - "cli %1;" \ - "NOP; NOP; SSYNC;" \ - "%0 = "#asm" [%2] "#asm_sign";" \ - "sti %1;" \ - : "=d"(val), "=d"(tmp) \ - : "a"(addr) \ - ); \ - return (type) val; \ -} -DECLARE_BFIN_RAW_READX(b, u8, b, (z)) -#define __raw_readb __raw_readb -DECLARE_BFIN_RAW_READX(w, u16, w, (z)) -#define __raw_readw __raw_readw -DECLARE_BFIN_RAW_READX(l, u32, , ) -#define __raw_readl __raw_readl +#define __raw_readb bfin_read8 +#define __raw_readw bfin_read16 +#define __raw_readl bfin_read32 +#define __raw_writeb(val, addr) bfin_write8(addr, val) +#define __raw_writew(val, addr) bfin_write16(addr, val) +#define __raw_writel(val, addr) bfin_write32(addr, val) extern void outsb(unsigned long port, const void *addr, unsigned long count); extern void outsw(unsigned long port, const void *addr, unsigned long count);