From patchwork Wed Feb 13 13:46:57 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Magnus Damm X-Patchwork-Id: 2136191 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) by patchwork1.kernel.org (Postfix) with ESMTP id E2C5E3FCA4 for ; Wed, 13 Feb 2013 13:45:37 +0000 (UTC) Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1U5caY-0007NC-6P; Wed, 13 Feb 2013 13:41:30 +0000 Received: from mail-pa0-f52.google.com ([209.85.220.52]) by merlin.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1U5caU-0007Lh-7D for linux-arm-kernel@lists.infradead.org; Wed, 13 Feb 2013 13:41:28 +0000 Received: by mail-pa0-f52.google.com with SMTP id fb1so730316pad.39 for ; Wed, 13 Feb 2013 05:41:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:from:to:cc:date:message-id:in-reply-to:references :subject; bh=VKr5e8zPKlQ+cD3pjjRGYaMyIO8OYmH7VlrISRcS1yo=; b=FNp1rVm4sTpS65e7RsKgZY2PWxaKlQW8De+oX+ub8YwE4vtv/FN0ZGixo6UfewzKUK lUCu6vflNiC3NrUwrnGjxrnqpMDMrdobLJv5z3y0UaHniF3L6V6lI/Sj2UZgmiRKbJmZ LGbSENvZh3ZhGxi5WmZ7iEwqBr6BlBl2O2dT3Eaas+SRGUaC5zQazGwjLhukIBvrfokD wNEP38VRSnd6AagaeNKQLUUBPVAQ38eEKOBcjFLIoNn/RIHcSzVuBWLAtSwO69zS7JqZ FSel1Hu5Hv9SnebWq82+/ZgheeHSsjNVqFk6fAgZapXC0Z1SOhFM7SpTKjripTfgrsh2 kuLg== X-Received: by 10.66.83.232 with SMTP id t8mr63352144pay.73.1360762882149; Wed, 13 Feb 2013 05:41:22 -0800 (PST) Received: from [127.0.0.1] (FL1-122-133-79-190.tky.mesh.ad.jp. [122.133.79.190]) by mx.google.com with ESMTPS id c3sm39963142pax.9.2013.02.13.05.41.19 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 13 Feb 2013 05:41:21 -0800 (PST) From: Magnus Damm To: linux-sh@vger.kernel.org Date: Wed, 13 Feb 2013 22:46:57 +0900 Message-Id: <20130213134657.12153.27160.sendpatchset@w520> In-Reply-To: <20130213134628.12153.47120.sendpatchset@w520> References: <20130213134628.12153.47120.sendpatchset@w520> Subject: [PATCH 03/06] ARM: shmobile: Rework EMEV2 scu_base variable X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20130213_084126_398649_EA96DC86 X-CRM114-Status: GOOD ( 10.74 ) X-Spam-Score: -2.7 (--) X-Spam-Report: SpamAssassin version 3.3.2 on merlin.infradead.org summary: Content analysis details: (-2.7 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [209.85.220.52 listed in list.dnswl.org] 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (magnus.damm[at]gmail.com) -0.0 SPF_PASS SPF: sender matches SPF record -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature Cc: horms@verge.net.au, Magnus Damm , linux-arm-kernel@lists.infradead.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: linux-arm-kernel-bounces@lists.infradead.org Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org From: Magnus Damm Rename the static scu_base variable into shmobile_scu_base. Later in the series the shmobile_scu_base variable will be made into a global variable so this is preparation only. Signed-off-by: Magnus Damm --- arch/arm/mach-shmobile/smp-emev2.c | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) --- 0001/arch/arm/mach-shmobile/smp-emev2.c +++ work/arch/arm/mach-shmobile/smp-emev2.c 2013-02-13 21:01:25.000000000 +0900 @@ -32,8 +32,9 @@ #define EMEV2_SCU_BASE 0x1e000000 +static void __iomem *shmobile_scu_base; + static DEFINE_SPINLOCK(scu_lock); -static void __iomem *scu_base; static void modify_scu_cpu_psr(unsigned long set, unsigned long clr) { @@ -42,10 +43,10 @@ static void modify_scu_cpu_psr(unsigned /* we assume this code is running on a different cpu * than the one that is changing coherency setting */ spin_lock(&scu_lock); - tmp = readl(scu_base + 8); + tmp = readl(shmobile_scu_base + 8); tmp &= ~clr; tmp |= set; - writel(tmp, scu_base + 8); + writel(tmp, shmobile_scu_base + 8); spin_unlock(&scu_lock); } @@ -70,7 +71,7 @@ static void __init emev2_smp_prepare_cpu { int cpu = cpu_logical_map(0); - scu_enable(scu_base); + scu_enable(shmobile_scu_base); /* Tell ROM loader about our vector (in headsmp.S) */ emev2_set_boot_vector(__pa(shmobile_secondary_vector)); @@ -83,12 +84,12 @@ static void __init emev2_smp_init_cpus(v { unsigned int ncores; - if (!scu_base) { - scu_base = ioremap(EMEV2_SCU_BASE, PAGE_SIZE); + if (!shmobile_scu_base) { + shmobile_scu_base = ioremap(EMEV2_SCU_BASE, PAGE_SIZE); emev2_clock_init(); /* need ioremapped SMU */ } - ncores = scu_base ? scu_get_core_count(scu_base) : 1; + ncores = shmobile_scu_base ? scu_get_core_count(shmobile_scu_base) : 1; shmobile_smp_init_cpus(ncores); }