From patchwork Fri Feb 8 15:11:57 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [U-Boot,v5,01/23] ppc: Add initial memory barrier macros From: Simon Glass X-Patchwork-Id: 219174 Message-Id: <1360336339-10703-2-git-send-email-sjg@chromium.org> To: U-Boot Mailing List Cc: Kim Phillips , Graeme Russ , Kumar Gala , Andy Fleming , Tom Rini , Vadim Bendebury , Stefan Roese Date: Fri, 8 Feb 2013 07:11:57 -0800 These are available on other architectures, so add them on ppc. Signed-off-by: Simon Glass --- Changes in v5: None Changes in v4: None Changes in v3: None Changes in v2: None arch/powerpc/include/asm/io.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/arch/powerpc/include/asm/io.h b/arch/powerpc/include/asm/io.h index 1f12c29..1bf12f5 100644 --- a/arch/powerpc/include/asm/io.h +++ b/arch/powerpc/include/asm/io.h @@ -317,4 +317,12 @@ static inline phys_addr_t virt_to_phys(void * vaddr) #endif } +/* + * TODO: The kernel offers some more advanced versions of barriers, it might + * have some advantages to use them instead of the simple one here. + */ +#define dmb() __asm__ __volatile__ ("" : : : "memory") +#define __iormb() dmb() +#define __iowmb() dmb() + #endif