Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752303AbaFZWpE (ORCPT ); Thu, 26 Jun 2014 18:45:04 -0400 Received: from top.free-electrons.com ([176.31.233.9]:38386 "EHLO mail.free-electrons.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751405AbaFZWnq (ORCPT ); Thu, 26 Jun 2014 18:43:46 -0400 From: Gregory CLEMENT To: Jason Cooper , Andrew Lunn , Sebastian Hesselbarth , Gregory CLEMENT , Russell King , Shawn Guo , Sascha Hauer Cc: Thomas Petazzoni , Ezequiel Garcia , linux-arm-kernel@lists.infradead.org, Lior Amsalem , Tawfik Bayouk , Nadav Haklai , linux-kernel@vger.kernel.org Subject: [PATCH 1/5] ARM: smp_scu: Used defined value instead of literal constant Date: Fri, 27 Jun 2014 00:43:24 +0200 Message-Id: <1403822608-31158-2-git-send-email-gregory.clement@free-electrons.com> X-Mailer: git-send-email 1.8.1.2 In-Reply-To: <1403822608-31158-1-git-send-email-gregory.clement@free-electrons.com> References: <1403822608-31158-1-git-send-email-gregory.clement@free-electrons.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The first bit of the SCU control register is actually the enable it. So let's name it instead of using literal constant. Signed-off-by: Gregory CLEMENT --- arch/arm/kernel/smp_scu.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/arch/arm/kernel/smp_scu.c b/arch/arm/kernel/smp_scu.c index 1aafa0d785eb..cfea41b41ad0 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_CTRL_ENABLE BIT(1) #define SCU_CONFIG 0x04 #define SCU_CPU_STATUS 0x08 #define SCU_INVALIDATE 0x0c @@ -43,17 +44,18 @@ void scu_enable(void __iomem *scu_base) /* Cortex-A9 only */ if ((read_cpuid_id() & 0xff0ffff0) == 0x410fc090) { scu_ctrl = readl_relaxed(scu_base + 0x30); - if (!(scu_ctrl & 1)) - writel_relaxed(scu_ctrl | 0x1, scu_base + 0x30); + if (!(scu_ctrl & SCU_CTRL_ENABLE)) + writel_relaxed(scu_ctrl | SCU_CTRL_ENABLE, + scu_base + 0x30); } #endif scu_ctrl = readl_relaxed(scu_base + SCU_CTRL); /* already enabled? */ - if (scu_ctrl & 1) + if (scu_ctrl & SCU_CTRL_ENABLE) return; - scu_ctrl |= 1; + scu_ctrl |= SCU_CTRL_ENABLE; writel_relaxed(scu_ctrl, scu_base + SCU_CTRL); /* -- 1.8.1.2 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/