From patchwork Thu Jul 10 08:50:23 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 33409 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ig0-f200.google.com (mail-ig0-f200.google.com [209.85.213.200]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id D39C8203C0 for ; Thu, 10 Jul 2014 08:52:35 +0000 (UTC) Received: by mail-ig0-f200.google.com with SMTP id hn18sf9251415igb.7 for ; Thu, 10 Jul 2014 01:52:35 -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:sender:errors-to :x-original-sender:x-original-authentication-results:mailing-list :content-type:content-transfer-encoding; bh=LXsV9Q/NO+tWoV7C46en97mvfOK2xUwkdg2EKPcOAgE=; b=Z/ttd/YFLhS+5E5h4vVykUqbrYopRzl+1bUZ8vYGZSUIdm8Gy0cdMYad5RI2FU0ibp IqhPHBGzKov2kBGC6BMZ9muqT6U784Q/36T9i471g3Jx88l5/442Gf8PAbiXdI9HWtlp 33Huh7V+37KY4sQYu9P54d3aUy0P0PaM+mvMKXdtjw9fedJfG/LVzNVOqc3c+UaECEge +FjvyQ4u92Ss4UjGIdmSxg1sq10k+GxaMNGmA4lkWZx/j2qirxCMsjsgqH2cRnvuhQWU Qvap2+nEFTeU50T0rCMwptSeSbsa0BDxeHYuYKjSWVfkgqGamyAdcpIy19zRJgC8RHHH xJxg== X-Gm-Message-State: ALoCoQl/swMMeLnoxsIhhMtG5GMYAChIbYqi0K68we2lqOVnCpronLLifsCSiZR5ZfGjOaW5FZGM X-Received: by 10.182.51.228 with SMTP id n4mr23115417obo.28.1404982355125; Thu, 10 Jul 2014 01:52:35 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.106.33 with SMTP id d30ls3242qgf.47.gmail; Thu, 10 Jul 2014 01:52:35 -0700 (PDT) X-Received: by 10.52.158.198 with SMTP id ww6mr27641464vdb.17.1404982355036; Thu, 10 Jul 2014 01:52:35 -0700 (PDT) Received: from mail-vc0-f181.google.com (mail-vc0-f181.google.com [209.85.220.181]) by mx.google.com with ESMTPS id q6si22701306vcm.67.2014.07.10.01.52.34 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 10 Jul 2014 01:52:35 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.220.181 as permitted sender) client-ip=209.85.220.181; Received: by mail-vc0-f181.google.com with SMTP id il7so9825012vcb.40 for ; Thu, 10 Jul 2014 01:52:34 -0700 (PDT) X-Received: by 10.52.23.71 with SMTP id k7mr37124952vdf.27.1404982354924; Thu, 10 Jul 2014 01:52:34 -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.221.37.5 with SMTP id tc5csp115785vcb; Thu, 10 Jul 2014 01:52:34 -0700 (PDT) X-Received: by 10.70.102.206 with SMTP id fq14mr16119677pdb.62.1404982354105; Thu, 10 Jul 2014 01:52:34 -0700 (PDT) Received: from bombadil.infradead.org (bombadil.infradead.org. [2001:1868:205::9]) by mx.google.com with ESMTPS id fu6si48050638pac.106.2014.07.10.01.52.33 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 10 Jul 2014 01:52:34 -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 1X5A4U-0000xO-LY; Thu, 10 Jul 2014 08:51:18 +0000 Received: from mail-wi0-f173.google.com ([209.85.212.173]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1X5A4R-0000mg-PG for linux-arm-kernel@lists.infradead.org; Thu, 10 Jul 2014 08:51:16 +0000 Received: by mail-wi0-f173.google.com with SMTP id cc10so4119498wib.6 for ; Thu, 10 Jul 2014 01:50:53 -0700 (PDT) X-Received: by 10.194.60.240 with SMTP id k16mr55780427wjr.0.1404982253446; Thu, 10 Jul 2014 01:50:53 -0700 (PDT) Received: from localhost.localdomain (LPuteaux-656-01-48-212.w82-127.abo.wanadoo.fr. [82.127.83.212]) by mx.google.com with ESMTPSA id cz4sm29228705wib.23.2014.07.10.01.50.51 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 10 Jul 2014 01:50:52 -0700 (PDT) From: Linus Walleij To: linux-arm-kernel@lists.infradead.org Subject: [PATCH] ARM: ux500: remove pointless cache setup complexity Date: Thu, 10 Jul 2014 10:50:23 +0200 Message-Id: <1404982223-8618-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-20140710_015115_964133_79D799BC X-CRM114-Status: GOOD ( 13.48 ) 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.212.173 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.212.173 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.220.181 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 cleans out non-DT cache setup (the ux500 is DT only), and sinks the l2cc base into the unlock function. Signed-off-by: Linus Walleij --- arch/arm/mach-ux500/cache-l2x0.c | 18 ++++-------------- 1 file changed, 4 insertions(+), 14 deletions(-) diff --git a/arch/arm/mach-ux500/cache-l2x0.c b/arch/arm/mach-ux500/cache-l2x0.c index 842ebedbdd1c..e97ee556f92f 100644 --- a/arch/arm/mach-ux500/cache-l2x0.c +++ b/arch/arm/mach-ux500/cache-l2x0.c @@ -7,17 +7,15 @@ #include #include -#include #include #include "db8500-regs.h" #include "id.h" -static void __iomem *l2x0_base; - static int __init ux500_l2x0_unlock(void) { int i; + void __iomem *l2x0_base = __io_address(U8500_L2CC_BASE); /* * Unlock Data and Instruction Lock if locked. Ux500 U-Boot versions @@ -45,23 +43,15 @@ static void ux500_l2c310_write_sec(unsigned long val, unsigned reg) static int __init ux500_l2x0_init(void) { - if (cpu_is_u8500_family() || cpu_is_ux540_family()) - l2x0_base = __io_address(U8500_L2CC_BASE); - else - /* Non-Ux500 platform */ + /* Multiplatform guard */ + if (!((cpu_is_u8500_family() || cpu_is_ux540_family()))) return -ENODEV; /* Unlock before init */ ux500_l2x0_unlock(); - outer_cache.write_sec = ux500_l2c310_write_sec; - - if (of_have_populated_dt()) - l2x0_of_init(0, ~0); - else - l2x0_init(l2x0_base, 0, ~0); + l2x0_of_init(0, ~0); return 0; } - early_initcall(ux500_l2x0_init);