From: Michael Hennerich Date: Fri, 18 Jun 2010 08:30:08 +0000 (+0000) Subject: Blackfin: make sure mmiowb inserts a write barrier with SSYNC X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=eb9649095f4e81a6535c10377da3d5f48b9ad822;p=mv-sheeva.git Blackfin: make sure mmiowb inserts a write barrier with SSYNC Add SSYNC to our implementation of I/O write barrier to ensure ordering of I/O space writes. This will make sure that writes following the barrier will arrive after all previous writes. Signed-off-by: Michael Hennerich Signed-off-by: Mike Frysinger --- diff --git a/arch/blackfin/include/asm/io.h b/arch/blackfin/include/asm/io.h index 29e55b9d88b..234fbac17ec 100644 --- a/arch/blackfin/include/asm/io.h +++ b/arch/blackfin/include/asm/io.h @@ -124,7 +124,13 @@ static inline unsigned int readl(const volatile void __iomem *addr) #define iowrite16(val, x) writew(val, x) #define iowrite32(val, x) writel(val, x) -#define mmiowb() wmb() +/** + * I/O write barrier + * + * Ensure ordering of I/O space writes. This will make sure that writes + * following the barrier will arrive after all previous writes. + */ +#define mmiowb() do { SSYNC(); wmb(); } while (0) #define IO_SPACE_LIMIT 0xffffffff