From patchwork Wed Feb 13 13:46:48 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Magnus Damm X-Patchwork-Id: 2136171 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) by patchwork2.kernel.org (Postfix) with ESMTP id 60C90DFE75 for ; Wed, 13 Feb 2013 13:45:27 +0000 (UTC) Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1U5caM-0007Kn-HS; Wed, 13 Feb 2013 13:41:18 +0000 Received: from mail-pa0-f47.google.com ([209.85.220.47]) by merlin.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1U5caJ-0007Jp-1C for linux-arm-kernel@lists.infradead.org; Wed, 13 Feb 2013 13:41:16 +0000 Received: by mail-pa0-f47.google.com with SMTP id bj3so714611pad.6 for ; Wed, 13 Feb 2013 05:41:12 -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=pz9P84nOjOmYh8GCzx7gLFWaNZktPuJWIsyeS4zkgl0=; b=f2KbP+ffvnWY0/KVTNQkjojASC4OXWuglr/9rDGKOOn3kheZAKK9aeqtGF0uVJyuR7 83yK1gcSVi3AYjTY3iDqPWEVJw+XBwZhySmk+elNTfumMdWb9HYJUhT1IFAXAqt9Fh0y BoUwS3IReOSQJ9x5mJbOC1aYmryxeh5A3VZRLCsD2Uo1gjjuB4iSNCDMD4p7ka1X9E4i TSAQJJDkjRsgGaBmvkVpWSBwbHsSXtRwIhJPw1/kjtrrp/9SDcaCRe4+A9I4qFfVDfuR HosnB9EHARGxECm5w2kYkFRSApz8JfevNyJvbx4Swou+hAmV+1vbetvRB4JOmSBLXB5f mBLQ== X-Received: by 10.66.85.103 with SMTP id g7mr63911954paz.45.1360762872707; Wed, 13 Feb 2013 05:41:12 -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 d8sm83716720pax.23.2013.02.13.05.41.10 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 13 Feb 2013 05:41:11 -0800 (PST) From: Magnus Damm To: linux-sh@vger.kernel.org Date: Wed, 13 Feb 2013 22:46:48 +0900 Message-Id: <20130213134648.12153.96101.sendpatchset@w520> In-Reply-To: <20130213134628.12153.47120.sendpatchset@w520> References: <20130213134628.12153.47120.sendpatchset@w520> Subject: [PATCH 02/06] ARM: shmobile: Kill off r8a7779 scu_base_addr() function X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20130213_084115_366312_6D4380DA X-CRM114-Status: GOOD ( 13.29 ) 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.47 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 Replace scu_base_addr() with a static shmobile_scu_base variable and introduce R8A7779_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-r8a7779.c | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) --- 0001/arch/arm/mach-shmobile/smp-r8a7779.c +++ work/arch/arm/mach-shmobile/smp-r8a7779.c 2013-02-13 20:52:34.000000000 +0900 @@ -31,6 +31,9 @@ #include #define AVECR IOMEM(0xfe700040) +#define R8A7779_SCU_BASE IOMEM(0xf0000000) + +static void __iomem *shmobile_scu_base; static struct r8a7779_pm_ch r8a7779_ch_cpu1 = { .chan_offs = 0x40, /* PWRSR0 .. PWRER0 */ @@ -56,11 +59,6 @@ static struct r8a7779_pm_ch *r8a7779_ch_ [3] = &r8a7779_ch_cpu3, }; -static void __iomem *scu_base_addr(void) -{ - return (void __iomem *)0xf0000000; -} - static DEFINE_SPINLOCK(scu_lock); static unsigned long tmp; @@ -75,7 +73,7 @@ void __init r8a7779_register_twd(void) static void modify_scu_cpu_psr(unsigned long set, unsigned long clr) { - void __iomem *scu_base = scu_base_addr(); + void __iomem *scu_base = shmobile_scu_base; spin_lock(&scu_lock); tmp = __raw_readl(scu_base + 8); @@ -153,7 +151,7 @@ static void __init r8a7779_smp_prepare_c { int cpu = cpu_logical_map(0); - scu_enable(scu_base_addr()); + scu_enable(shmobile_scu_base); /* Map the reset vector (in headsmp.S) */ __raw_writel(__pa(shmobile_secondary_vector), AVECR); @@ -171,9 +169,10 @@ static void __init r8a7779_smp_prepare_c static void __init r8a7779_smp_init_cpus(void) { - unsigned int ncores = scu_get_core_count(scu_base_addr()); + /* setup r8a7779 specific SCU base */ + shmobile_scu_base = R8A7779_SCU_BASE; - shmobile_smp_init_cpus(ncores); + shmobile_smp_init_cpus(scu_get_core_count(shmobile_scu_base)); } struct smp_operations r8a7779_smp_ops __initdata = {