From patchwork Thu Mar 15 02:16:03 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 146799 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from theia.denx.de (theia.denx.de [85.214.87.163]) by ozlabs.org (Postfix) with ESMTP id 75539B6F13 for ; Thu, 15 Mar 2012 13:18:27 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 9F23128138; Thu, 15 Mar 2012 03:18:25 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at theia.denx.de Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id ET7+KBs8TudL; Thu, 15 Mar 2012 03:18:25 +0100 (CET) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 01146280A8; Thu, 15 Mar 2012 03:17:21 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id C9D39280A4 for ; Thu, 15 Mar 2012 03:17:08 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at theia.denx.de Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Zi9n6Q-dyUcX for ; Thu, 15 Mar 2012 03:17:07 +0100 (CET) X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5 NOT_IN_BL_NJABL=-1.5 (only DNSBL check requested) Received: from mail-fa0-f74.google.com (mail-fa0-f74.google.com [209.85.161.74]) by theia.denx.de (Postfix) with ESMTPS id 63DB62809E for ; Thu, 15 Mar 2012 03:17:01 +0100 (CET) Received: by faaa19 with SMTP id a19so96117faa.3 for ; Wed, 14 Mar 2012 19:17:00 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references :x-gm-message-state; bh=UkaZbn13xu2kZ4GL6U7bgxxWxHFwC95qu6x/cbhn/Z8=; b=W9mg5csn/A3BNLXJcD5bExW/rQ10mqqecYAKaClDCKZCBDJwKI1ynQ2I56Y0nCNMf2 NsdwF0G/VctF16F2Af+J+dzOzDBjFGfB9H/JFU6tAov9O44OX4hV/yE1Pxo0cHemAqcQ KZm8i6LiGmkOHGRV6cIBigcx83STLCeayXBGL763gMsGFlmnWRBJ7EIya5Bm4Vt6Pa3d 89ysSvjvHCmgnB9TNqsYrpo1lqG/O3H/7DBRdCnkgdTqRk1KtxF1hlIUGfkHBGypLkS/ tcSBxjXkiVcI4Ma+5a8s+q8XR9DHyhVt3sgA5x2OxDUt9S/UxVhNtQ7C/dY15Xdu5A7q XxwQ== Received: by 10.213.4.203 with SMTP id 11mr405549ebs.23.1331777820796; Wed, 14 Mar 2012 19:17:00 -0700 (PDT) Received: by 10.213.4.203 with SMTP id 11mr405509ebs.23.1331777820576; Wed, 14 Mar 2012 19:17:00 -0700 (PDT) Received: from hpza10.eem.corp.google.com ([74.125.121.33]) by gmr-mx.google.com with ESMTPS id y56si364694eea.1.2012.03.14.19.17.00 (version=TLSv1/SSLv3 cipher=AES128-SHA); Wed, 14 Mar 2012 19:17:00 -0700 (PDT) Received: from sglass.mtv.corp.google.com (dhcp-172-22-162-38.mtv.corp.google.com [172.22.162.38]) by hpza10.eem.corp.google.com (Postfix) with ESMTP id 602F8200057; Wed, 14 Mar 2012 19:17:00 -0700 (PDT) Received: by sglass.mtv.corp.google.com (Postfix, from userid 121222) id BED4814127B; Wed, 14 Mar 2012 19:16:59 -0700 (PDT) From: Simon Glass To: U-Boot Mailing List Date: Wed, 14 Mar 2012 19:16:03 -0700 Message-Id: <1331777784-8528-7-git-send-email-sjg@chromium.org> X-Mailer: git-send-email 1.7.7.3 In-Reply-To: <1331777784-8528-1-git-send-email-sjg@chromium.org> References: <1331777784-8528-1-git-send-email-sjg@chromium.org> X-Gm-Message-State: ALoCoQkXPFoJP1QtbnpnLET82mNYRSzFh6SKQd/znHUzit7L/Xbq3VzuT6G42g9KTz3o0qZN+sqNyl3BjezjX3TtrH3K7EP3exJnb09xss1Fog2aXV6THVu1WqM7gSnVAK8h8csEICFYnZQDFX1a1+k0Gt7Dva/ZCJNQfZE1gs63U9cKlZxzmMg= Cc: Kim Phillips , Kumar Gala , Andy Fleming , Stefan Roese Subject: [U-Boot] [PATCH v4 06/27] ppc: Add initial memory barrier macros X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.11 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: u-boot-bounces@lists.denx.de Errors-To: u-boot-bounces@lists.denx.de These are available on other architectures, so add them on ppc. Signed-off-by: Simon Glass --- arch/powerpc/include/asm/io.h | 8 ++++++++ 1 files changed, 8 insertions(+), 0 deletions(-) diff --git a/arch/powerpc/include/asm/io.h b/arch/powerpc/include/asm/io.h index 56ac9fe..d246fd8 100644 --- a/arch/powerpc/include/asm/io.h +++ b/arch/powerpc/include/asm/io.h @@ -318,4 +318,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