From patchwork Thu May 14 16:13:28 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 48522 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wi0-f200.google.com (mail-wi0-f200.google.com [209.85.212.200]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 8435421411 for ; Thu, 14 May 2015 16:21:41 +0000 (UTC) Received: by wixv7 with SMTP id v7sf24490476wix.0 for ; Thu, 14 May 2015 09:21:40 -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=pmYQOuB0+PqD4Mnjw6tFRfo6EaBcREtFC7ZxYFrS+kw=; b=AtRvLTxXNLqO7e+KZfqTTaqLuges6T/6CyPuWIuPnuB9qbb9WlvbmTJehboRo+y/qJ Uidc/Fqo3jRudacERk9XLzeD3ASHmgEYJLuUwHQMNEH4aHl6q7TtdEclHqjyrodbO13s vYXuiaspptEngtSj1ktF0uy4jSfCV0rFDmLd1XeGSsJQALnWU+ubSNA9PrLkKpS+zqiR 5y1Y3WESQUnPAPhTIa8gi1wibh/m4Njx35/dWyBBEbSfwkxEv2YNOOlPa4OfgKoFqSnM G3ByS4UfS7zBcK/2EAUY+/ySgeJkMDaJNiH+gOc8Fuw+vPrxQ6B6KwppaN4uPUOEKlcw ARpA== X-Gm-Message-State: ALoCoQkGOjmC5D5GudkIA7mUhuXpCzjTWSaWithg7yJFfpYVOFHdumUxwXu8DeE8WEggtYetImFU X-Received: by 10.112.200.166 with SMTP id jt6mr3536530lbc.17.1431620500816; Thu, 14 May 2015 09:21:40 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.1.134 with SMTP id 6ls395693lam.36.gmail; Thu, 14 May 2015 09:21:40 -0700 (PDT) X-Received: by 10.112.190.10 with SMTP id gm10mr3720849lbc.2.1431620500607; Thu, 14 May 2015 09:21:40 -0700 (PDT) Received: from mail-la0-f51.google.com (mail-la0-f51.google.com. [209.85.215.51]) by mx.google.com with ESMTPS id j8si14871060lah.14.2015.05.14.09.21.40 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 14 May 2015 09:21:40 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.51 as permitted sender) client-ip=209.85.215.51; Received: by laat2 with SMTP id t2so75118982laa.1 for ; Thu, 14 May 2015 09:21:40 -0700 (PDT) X-Received: by 10.112.150.100 with SMTP id uh4mr3745341lbb.112.1431620500321; Thu, 14 May 2015 09:21:40 -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 hn6csp1381821lbb; Thu, 14 May 2015 09:21:39 -0700 (PDT) X-Received: by 10.68.110.3 with SMTP id hw3mr9517229pbb.128.1431620498621; Thu, 14 May 2015 09:21:38 -0700 (PDT) Received: from bombadil.infradead.org (bombadil.infradead.org. [2001:1868:205::9]) by mx.google.com with ESMTPS id nx16si33155533pdb.158.2015.05.14.09.21.37 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 14 May 2015 09:21:38 -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 1Ysvql-00029r-JT; Thu, 14 May 2015 16:19:07 +0000 Received: from mail-la0-f48.google.com ([209.85.215.48]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1Ysvlk-0005vX-G6 for linux-arm-kernel@lists.infradead.org; Thu, 14 May 2015 16:13:57 +0000 Received: by labbd9 with SMTP id bd9so75047911lab.2 for ; Thu, 14 May 2015 09:13:33 -0700 (PDT) X-Received: by 10.112.29.180 with SMTP id l20mr3629693lbh.95.1431620013487; Thu, 14 May 2015 09:13:33 -0700 (PDT) Received: from localhost.localdomain ([85.235.11.236]) by mx.google.com with ESMTPSA id ln6sm6250739lac.45.2015.05.14.09.13.31 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 14 May 2015 09:13:32 -0700 (PDT) From: Linus Walleij To: linux-arm-kernel@lists.infradead.org Subject: [PATCH 07/10] ARM: ux500: kill off L2CC static map Date: Thu, 14 May 2015 18:13:28 +0200 Message-Id: <1431620008-15094-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_091356_726827_C0ABA108 X-CRM114-Status: GOOD ( 15.16 ) 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.48 listed in list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record -0.0 RCVD_IN_MSPIKE_H3 RBL: Good reputation (+3) [209.85.215.48 listed in wl.mailspike.net] -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.51 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 The l2x0 level 2 cache initialization used a static map to get at the l2x0 registers. Get rid of this by getting the register range from the device tree and just remap it for the short time we need it. Signed-off-by: Linus Walleij --- arch/arm/mach-ux500/cache-l2x0.c | 11 ++++++++++- arch/arm/mach-ux500/cpu-db8500.c | 7 ------- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/arch/arm/mach-ux500/cache-l2x0.c b/arch/arm/mach-ux500/cache-l2x0.c index e97ee556f92f..7557bede7ae6 100644 --- a/arch/arm/mach-ux500/cache-l2x0.c +++ b/arch/arm/mach-ux500/cache-l2x0.c @@ -6,6 +6,7 @@ #include #include +#include #include @@ -15,7 +16,14 @@ static int __init ux500_l2x0_unlock(void) { int i; - void __iomem *l2x0_base = __io_address(U8500_L2CC_BASE); + struct device_node *np; + void __iomem *l2x0_base; + + np = of_find_compatible_node(NULL, NULL, "arm,pl310-cache"); + l2x0_base = of_iomap(np, 0); + of_node_put(np); + if (!l2x0_base) + return -ENODEV; /* * Unlock Data and Instruction Lock if locked. Ux500 U-Boot versions @@ -30,6 +38,7 @@ static int __init ux500_l2x0_unlock(void) writel_relaxed(0x0, l2x0_base + L2X0_LOCKDOWN_WAY_I_BASE + i * L2X0_LOCKDOWN_STRIDE); } + iounmap(l2x0_base); return 0; } diff --git a/arch/arm/mach-ux500/cpu-db8500.c b/arch/arm/mach-ux500/cpu-db8500.c index 3562b9aea767..fd0bc1978dbb 100644 --- a/arch/arm/mach-ux500/cpu-db8500.c +++ b/arch/arm/mach-ux500/cpu-db8500.c @@ -43,11 +43,6 @@ static struct prcmu_pdata db8500_prcmu_pdata = { .legacy_offset = DB8500_PRCMU_LEGACY_OFFSET, }; -/* U8500 and U9540 common io_desc */ -static struct map_desc u8500_common_io_desc[] __initdata = { - __IO_DEV_DESC(U8500_L2CC_BASE, SZ_4K), -}; - /* U8500 IO map specific description */ static struct map_desc u8500_io_desc[] __initdata = { __IO_DEV_DESC(U8500_PRCMU_BASE, SZ_4K), @@ -66,8 +61,6 @@ static void __init u8500_map_io(void) debug_ll_io_init(); ux500_map_io(); - iotable_init(u8500_common_io_desc, ARRAY_SIZE(u8500_common_io_desc)); - if (cpu_is_ux540_family()) iotable_init(u9540_io_desc, ARRAY_SIZE(u9540_io_desc)); else