From patchwork Thu May 14 16:12:38 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 48517 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wg0-f72.google.com (mail-wg0-f72.google.com [74.125.82.72]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 7FD1621411 for ; Thu, 14 May 2015 16:17:44 +0000 (UTC) Received: by wgtl5 with SMTP id l5sf21028902wgt.1 for ; Thu, 14 May 2015 09:17:43 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:from:to:subject:date:message-id:cc :precedence:list-id:list-unsubscribe:list-archive:list-post :list-help:list-subscribe:mime-version:content-type :content-transfer-encoding:sender:errors-to:x-original-sender :x-original-authentication-results:mailing-list; bh=6rFc+WUr+gOhvsmLfXNoAEjV7A2NJ4VAIQRdjTsrQWg=; b=NVLJr23xFP2nyEZ3I1E+JWYLtlmjo8gLwCH+p+HvmGWPhnTiMk4H+JpuN/yjfrpA9b 92e5Vpp6VXPa/lPDISPNifSd0QvI9couuUAHrER1VAqN2KPURq+NcI9hzOvJsuQRX2Xo H01e47Ey0t4ZvDKlMxVMt9KxY+VQw5qhWpJrC2gf5c7M2Fzr2CRBS8CxC+rPBOPjd1Mx zsN4a0p1DkVaFfaPlStln5GmLkNvyzbG5fTCDLb9I8rpiwtUsQl8pS0G6s4q4kbSHi1s WvyG4gQW5JX88ZRQueSjbZRz4P4r1X+RXuouAj42n25ZMbFAHwg7RazHKdDPJN4UKTuu fdHA== X-Gm-Message-State: ALoCoQmavHU58hkGoRcQ4iwIRuo6SPpScRKC1rY1s2XuDzwfpaDHrRJCNVcfM4lSpdxgOcCYrO/U X-Received: by 10.180.73.137 with SMTP id l9mr9658002wiv.5.1431620263609; Thu, 14 May 2015 09:17:43 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.203.133 with SMTP id kq5ls395296lac.102.gmail; Thu, 14 May 2015 09:17:43 -0700 (PDT) X-Received: by 10.112.214.202 with SMTP id oc10mr1161279lbc.80.1431620263441; Thu, 14 May 2015 09:17:43 -0700 (PDT) Received: from mail-la0-f41.google.com (mail-la0-f41.google.com. [209.85.215.41]) by mx.google.com with ESMTPS id ur10si14869206lbb.12.2015.05.14.09.17.43 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 14 May 2015 09:17:43 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.41 as permitted sender) client-ip=209.85.215.41; Received: by labbd9 with SMTP id bd9so75215940lab.2 for ; Thu, 14 May 2015 09:17:43 -0700 (PDT) X-Received: by 10.152.21.136 with SMTP id v8mr1433077lae.19.1431620263160; Thu, 14 May 2015 09:17:43 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.108.230 with SMTP id hn6csp1379560lbb; Thu, 14 May 2015 09:17:41 -0700 (PDT) X-Received: by 10.69.31.106 with SMTP id kl10mr9422491pbd.155.1431620261295; Thu, 14 May 2015 09:17:41 -0700 (PDT) Received: from bombadil.infradead.org (bombadil.infradead.org. [2001:1868:205::9]) by mx.google.com with ESMTPS id bv5si33161046pdb.125.2015.05.14.09.17.40 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 14 May 2015 09:17:41 -0700 (PDT) Received-SPF: none (google.com: linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org does not designate permitted sender hosts) client-ip=2001:1868:205::9; 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 1Ysvn2-000852-V7; Thu, 14 May 2015 16:15:16 +0000 Received: from mail-la0-f53.google.com ([209.85.215.53]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1Ysvkr-0005Sb-C4 for linux-arm-kernel@lists.infradead.org; Thu, 14 May 2015 16:13:02 +0000 Received: by labbd9 with SMTP id bd9so75013263lab.2 for ; Thu, 14 May 2015 09:12:44 -0700 (PDT) X-Received: by 10.152.183.200 with SMTP id eo8mr3813278lac.57.1431619964365; Thu, 14 May 2015 09:12:44 -0700 (PDT) Received: from localhost.localdomain ([85.235.11.236]) by mx.google.com with ESMTPSA id eq9sm6256215lac.7.2015.05.14.09.12.42 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 14 May 2015 09:12:43 -0700 (PDT) From: Linus Walleij To: linux-arm-kernel@lists.infradead.org Subject: [PATCH 02/10] ARM: ux500: remove static maps from platsmp Date: Thu, 14 May 2015 18:12:38 +0200 Message-Id: <1431619958-14890-1-git-send-email-linus.walleij@linaro.org> X-Mailer: git-send-email 1.9.3 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20150514_091301_629203_75C0A39D X-CRM114-Status: GOOD ( 13.72 ) X-Spam-Score: -0.7 (/) X-Spam-Report: SpamAssassin version 3.4.0 on bombadil.infradead.org summary: Content analysis details: (-0.7 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [209.85.215.53 listed in list.dnswl.org] -0.0 RCVD_IN_MSPIKE_H3 RBL: Good reputation (+3) [209.85.215.53 listed in wl.mailspike.net] -0.0 SPF_PASS SPF: sender matches SPF record -0.0 RCVD_IN_MSPIKE_WL Mailspike good senders Cc: Linus Walleij 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: , MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: linus.walleij@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.41 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 This removes the reliance on static maps for SCU and backupram for the SMP startup of the Ux500 SoC. Signed-off-by: Linus Walleij --- arch/arm/mach-ux500/platsmp.c | 28 +++++++--------------------- 1 file changed, 7 insertions(+), 21 deletions(-) diff --git a/arch/arm/mach-ux500/platsmp.c b/arch/arm/mach-ux500/platsmp.c index a44967f3168c..1e13d0a8ad77 100644 --- a/arch/arm/mach-ux500/platsmp.c +++ b/arch/arm/mach-ux500/platsmp.c @@ -26,6 +26,9 @@ #include "db8500-regs.h" #include "id.h" +static void __iomem *scu_base; +static void __iomem *backupram; + /* This is called from headsmp.S to wakeup the secondary core */ extern void u8500_secondary_startup(void); @@ -41,16 +44,6 @@ static void write_pen_release(int val) sync_cache_w(&pen_release); } -static void __iomem *scu_base_addr(void) -{ - if (cpu_is_u8500_family() || cpu_is_ux540_family()) - return __io_address(U8500_SCU_BASE); - else - ux500_unknown_soc(); - - return NULL; -} - static DEFINE_SPINLOCK(boot_lock); static void ux500_secondary_init(unsigned int cpu) @@ -104,13 +97,6 @@ static int ux500_boot_secondary(unsigned int cpu, struct task_struct *idle) static void __init wakeup_secondary(void) { - void __iomem *backupram; - - if (cpu_is_u8500_family() || cpu_is_ux540_family()) - backupram = __io_address(U8500_BACKUPRAM0_BASE); - else - ux500_unknown_soc(); - /* * write the address of secondary startup into the backup ram register * at offset 0x1FF4, then write the magic number 0xA1FEED01 to the @@ -135,10 +121,11 @@ static void __init wakeup_secondary(void) */ static void __init ux500_smp_init_cpus(void) { - void __iomem *scu_base = scu_base_addr(); unsigned int i, ncores; - ncores = scu_base ? scu_get_core_count(scu_base) : 1; + scu_base = ioremap(U8500_SCU_BASE, 0x100); + backupram = ioremap(U8500_BACKUPRAM0_BASE, SZ_8K); + ncores = scu_get_core_count(scu_base); /* sanity check */ if (ncores > nr_cpu_ids) { @@ -153,8 +140,7 @@ static void __init ux500_smp_init_cpus(void) static void __init ux500_smp_prepare_cpus(unsigned int max_cpus) { - - scu_enable(scu_base_addr()); + scu_enable(scu_base); wakeup_secondary(); }