From patchwork Mon Dec 3 03:06:21 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rob Herring X-Patchwork-Id: 203279 X-Patchwork-Delegate: albert.aribaud@free.fr 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 9F1992C00B5 for ; Mon, 3 Dec 2012 14:06:54 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 2DFFE4A032; Mon, 3 Dec 2012 04:06:53 +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 ShOcWaXru7XJ; Mon, 3 Dec 2012 04:06:52 +0100 (CET) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 7AD3D4A037; Mon, 3 Dec 2012 04:06:48 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 54ECB4A039 for ; Mon, 3 Dec 2012 04:06:41 +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 cGzVJjR39FWv for ; Mon, 3 Dec 2012 04:06:40 +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-oa0-f44.google.com (mail-oa0-f44.google.com [209.85.219.44]) by theia.denx.de (Postfix) with ESMTPS id 2D6724A032 for ; Mon, 3 Dec 2012 04:06:38 +0100 (CET) Received: by mail-oa0-f44.google.com with SMTP id n5so2181263oag.3 for ; Sun, 02 Dec 2012 19:06:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:x-mailer; bh=OlyXwrHJFH5fe+FhkuMZ6i/vCxMY2bGQH3iolfAlkDo=; b=dPTgah/jdYFf4FE7sJtQF3Y8OrlFySs6Vfq5m/MgWH/QhAiDxNtLdc0IY3SZu6IRyI 3+8SJGrvjTd3kkFTdP9BCqHEpwM7qvmlVrkwCxebp6dU3AMhi/6Ipy6gmUwN4irBlvwM UMAOSihw4ZELU0cBkI0RXOfuYcm89y/pJdZTe7iw7HED9qIZPrbsKVB+EfN8l1NVeDSo SENptKK/xQOHpK1YVSuxscjGf7LO/2zra/DzGd6BuwMaa6o4fCo0yftQZ0mpAjaOqfPg xwq0Y0P1zYy2c8DNg4yeQeQksPtSmmoydItgoFgN/s9bIqIdDYNFrLQ4Q7uJx9OVvE2T EtiQ== Received: by 10.60.171.175 with SMTP id av15mr6970023oec.75.1354503997340; Sun, 02 Dec 2012 19:06:37 -0800 (PST) Received: from rob-laptop.grandenetworks.net (65-36-73-129.dyn.grandenetworks.net. [65.36.73.129]) by mx.google.com with ESMTPS id w14sm12172092obd.5.2012.12.02.19.06.36 (version=SSLv3 cipher=OTHER); Sun, 02 Dec 2012 19:06:36 -0800 (PST) From: Rob Herring To: u-boot@lists.denx.de Date: Sun, 2 Dec 2012 21:06:21 -0600 Message-Id: <1354503982-1124-1-git-send-email-robherring2@gmail.com> X-Mailer: git-send-email 1.7.10.4 Cc: Rob Herring Subject: [U-Boot] [PATCH 1/2] ARM: add wfi assembly macro 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 From: Rob Herring Since wfi instruction is only available on ARMv7, add a conditional macro for it. Signed-off-by: Rob Herring --- arch/arm/include/asm/system.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/arch/arm/include/asm/system.h b/arch/arm/include/asm/system.h index 2b28a26..2f6aecd 100644 --- a/arch/arm/include/asm/system.h +++ b/arch/arm/include/asm/system.h @@ -61,6 +61,12 @@ #define nop() __asm__ __volatile__("mov\tr0,r0\t@ nop\n\t"); +#ifdef __ARM_ARCH_7A__ +#define wfi() __asm__ __volatile__ ("wfi" : : : "memory") +#else +#define wfi() +#endif + static inline unsigned int get_cr(void) { unsigned int val;