From patchwork Mon Jul 21 07:45:53 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shawn Guo X-Patchwork-Id: 4593581 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 1BCBDC0515 for ; Mon, 21 Jul 2014 07:49:13 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 2134420114 for ; Mon, 21 Jul 2014 07:49:12 +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 3389D20107 for ; Mon, 21 Jul 2014 07:49:11 +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 1X98Jh-00046Y-U2; Mon, 21 Jul 2014 07:47:25 +0000 Received: from mail-bl2lp0204.outbound.protection.outlook.com ([207.46.163.204] helo=na01-bl2-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1X98JX-0003sg-93 for linux-arm-kernel@lists.infradead.org; Mon, 21 Jul 2014 07:47:16 +0000 Received: from BY2PR03MB348.namprd03.prod.outlook.com (10.141.139.22) by BY2PR03MB128.namprd03.prod.outlook.com (10.242.36.28) with Microsoft SMTP Server (TLS) id 15.0.990.7; Mon, 21 Jul 2014 07:46:46 +0000 Received: from DM2PR03CA001.namprd03.prod.outlook.com (10.141.52.149) by BY2PR03MB348.namprd03.prod.outlook.com (10.141.139.22) with Microsoft SMTP Server (TLS) id 15.0.990.7; Mon, 21 Jul 2014 07:46:28 +0000 Received: from BL2FFO11FD033.protection.gbl (2a01:111:f400:7c09::105) by DM2PR03CA001.outlook.office365.com (2a01:111:e400:2414::21) with Microsoft SMTP Server (TLS) id 15.0.990.7 via Frontend Transport; Mon, 21 Jul 2014 07:46:27 +0000 Received: from az84smr01.freescale.net (192.88.158.2) by BL2FFO11FD033.mail.protection.outlook.com (10.173.161.129) with Microsoft SMTP Server (TLS) id 15.0.980.11 via Frontend Transport; Mon, 21 Jul 2014 07:46:27 +0000 Received: from dragon.ap.freescale.net ([10.192.185.189]) by az84smr01.freescale.net (8.14.3/8.14.0) with ESMTP id s6L7kIun008632; Mon, 21 Jul 2014 00:46:24 -0700 From: Shawn Guo To: Subject: [PATCH 1/3] ARM: smp_scu: use macro for SCU enable bit Date: Mon, 21 Jul 2014 15:45:53 +0800 Message-ID: <1405928755-19413-2-git-send-email-shawn.guo@freescale.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1405928755-19413-1-git-send-email-shawn.guo@freescale.com> References: <1405928755-19413-1-git-send-email-shawn.guo@freescale.com> X-EOPAttributedMessage: 0 X-Forefront-Antispam-Report: CIP:192.88.158.2; CTRY:US; IPV:CAL; IPV:NLI; EFV:NLI; SFV:NSPM; SFS:(6009001)(189002)(199002)(62966002)(83322001)(87286001)(50226001)(86362001)(64706001)(87936001)(93916002)(575784001)(104166001)(95666004)(50986999)(99396002)(69596002)(31966008)(19580405001)(85306003)(68736004)(76176999)(19580395003)(88136002)(80022001)(79102001)(89996001)(110136001)(104016003)(92566001)(50466002)(47776003)(20776003)(85852003)(48376002)(44976005)(83072002)(81542001)(33646002)(77156001)(106466001)(26826002)(74502001)(4396001)(92726001)(229853001)(77982001)(6806004)(81342001)(107046002)(97736001)(74662001)(84676001)(102836001)(105606002)(81156004)(76482001)(2351001)(21056001)(46102001)(36756003); DIR:OUT; SFP:; SCL:1; SRVR:BY2PR03MB348; H:az84smr01.freescale.net; FPR:; MLV:ovrnspm; PTR:InfoDomainNonexistent; MX:1; LANG:; MIME-Version: 1.0 X-Microsoft-Antispam: BCL:0;PCL:0;RULEID: X-Forefront-PRVS: 0279B3DD0D Received-SPF: Fail (: domain of freescale.com does not designate 192.88.158.2 as permitted sender) receiver=; client-ip=192.88.158.2; helo=az84smr01.freescale.net; Authentication-Results: spf=fail (sender IP is 192.88.158.2) smtp.mailfrom=Shawn.Guo@freescale.com; X-Microsoft-Antispam: BCL:0;PCL:0;RULEID: X-OriginatorOrg: freescale.com X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20140721_004715_524833_823C60B0 X-CRM114-Status: UNSURE ( 9.59 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -0.7 (/) Cc: Nicolas Pitre , Rob Herring , Russell King , Will Deacon , Gregory Clement , Shawn Guo 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 --- 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); /*