From patchwork Fri Jul 25 08:09:49 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shawn Guo X-Patchwork-Id: 4621661 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 04C9F9F36A for ; Fri, 25 Jul 2014 08:13:09 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 0F09A20173 for ; Fri, 25 Jul 2014 08:13:08 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 3D6B5200E7 for ; Fri, 25 Jul 2014 08:13:07 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1XAaaT-0007ml-H3; Fri, 25 Jul 2014 08:10:45 +0000 Received: from dns-bn1lp0143.outbound.protection.outlook.com ([207.46.163.143] helo=na01-bn1-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1XAaaQ-0007bc-0O for linux-arm-kernel@lists.infradead.org; Fri, 25 Jul 2014 08:10:42 +0000 Received: from CH1PR03CA004.namprd03.prod.outlook.com (10.255.156.149) by BY2PR03MB346.namprd03.prod.outlook.com (10.141.139.15) with Microsoft SMTP Server (TLS) id 15.0.990.7; Fri, 25 Jul 2014 08:10:18 +0000 Received: from BN1AFFO11FD015.protection.gbl (10.255.156.132) by CH1PR03CA004.outlook.office365.com (10.255.156.149) with Microsoft SMTP Server (TLS) id 15.0.995.14 via Frontend Transport; Fri, 25 Jul 2014 08:10:17 +0000 Received: from tx30smr01.am.freescale.net (192.88.168.50) by BN1AFFO11FD015.mail.protection.outlook.com (10.58.52.75) with Microsoft SMTP Server (TLS) id 15.0.980.11 via Frontend Transport; Fri, 25 Jul 2014 08:10:17 +0000 Received: from dragon.ap.freescale.net ([10.192.185.114]) by tx30smr01.am.freescale.net (8.14.3/8.14.0) with ESMTP id s6P8A40l029762; Fri, 25 Jul 2014 01:10:14 -0700 From: Shawn Guo To: Russell King Subject: [PATCH v2 1/2] ARM: smp_scu: use macro for SCU enable bit Date: Fri, 25 Jul 2014 16:09:49 +0800 Message-ID: <1406275790-18617-2-git-send-email-shawn.guo@freescale.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1406275790-18617-1-git-send-email-shawn.guo@freescale.com> References: <1406275790-18617-1-git-send-email-shawn.guo@freescale.com> X-EOPAttributedMessage: 0 X-Forefront-Antispam-Report: CIP:192.88.168.50; CTRY:US; IPV:CAL; IPV:NLI; EFV:NLI; SFV:NSPM; SFS:(6009001)(189002)(199002)(26826002)(76482001)(106466001)(87936001)(19580395003)(104166001)(48376002)(107046002)(31966008)(229853001)(36756003)(44976005)(46102001)(50466002)(89996001)(92566001)(68736004)(74662001)(105606002)(19580405001)(84676001)(6806004)(85306003)(62966002)(21056001)(81542001)(87286001)(33646002)(102836001)(4396001)(76176999)(97736001)(93916002)(47776003)(81342001)(77982001)(20776003)(80022001)(99396002)(85852003)(575784001)(88136002)(110136001)(92726001)(83322001)(104016003)(74502001)(64706001)(50226001)(95666004)(79102001)(77156001)(86362001)(83072002)(50986999); DIR:OUT; SFP:; SCL:1; SRVR:BY2PR03MB346; H:tx30smr01.am.freescale.net; FPR:; MLV:ovrnspm; PTR:InfoDomainNonexistent; MX:1; LANG:en; MIME-Version: 1.0 X-Microsoft-Antispam: BCL:0;PCL:0;RULEID: X-Forefront-PRVS: 02830F0362 Received-SPF: Fail (: domain of freescale.com does not designate 192.88.168.50 as permitted sender) receiver=; client-ip=192.88.168.50; helo=tx30smr01.am.freescale.net; Authentication-Results: spf=fail (sender IP is 192.88.168.50) smtp.mailfrom=Shawn.Guo@freescale.com; X-OriginatorOrg: freescale.com X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20140725_011042_257117_ECA9354A X-CRM114-Status: UNSURE ( 9.25 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -0.0 (/) Cc: Nicolas Pitre , Rob Herring , Catalin Marinas , Will Deacon , Shawn Guo , Gregory Clement , linux-arm-kernel@lists.infradead.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Use macro instead of magic number for SCU enable bit. Signed-off-by: Shawn Guo Acked-by: Soren Brinkmann --- arch/arm/kernel/smp_scu.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/arch/arm/kernel/smp_scu.c b/arch/arm/kernel/smp_scu.c index 1aafa0d785eb..c947508f84e6 100644 --- a/arch/arm/kernel/smp_scu.c +++ b/arch/arm/kernel/smp_scu.c @@ -17,6 +17,7 @@ #include #define SCU_CTRL 0x00 +#define SCU_ENABLE (1 << 0) #define SCU_CONFIG 0x04 #define SCU_CPU_STATUS 0x08 #define SCU_INVALIDATE 0x0c @@ -50,10 +51,10 @@ void scu_enable(void __iomem *scu_base) scu_ctrl = readl_relaxed(scu_base + SCU_CTRL); /* already enabled? */ - if (scu_ctrl & 1) + if (scu_ctrl & SCU_ENABLE) return; - scu_ctrl |= 1; + scu_ctrl |= SCU_ENABLE; writel_relaxed(scu_ctrl, scu_base + SCU_CTRL); /*