From patchwork Fri Jun 24 09:41:26 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 102101 Delivered-To: patch@linaro.org Received: by 10.140.28.4 with SMTP id 4csp854739qgy; Fri, 24 Jun 2016 02:40:53 -0700 (PDT) X-Received: by 10.66.132.45 with SMTP id or13mr5717783pab.79.1466761253164; Fri, 24 Jun 2016 02:40:53 -0700 (PDT) Return-Path: Received: from bombadil.infradead.org (bombadil.infradead.org. [2001:1868:205::9]) by mx.google.com with ESMTPS id 204si5899420pfc.127.2016.06.24.02.40.53 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 24 Jun 2016 02:40:53 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org designates 2001:1868:205::9 as permitted sender) client-ip=2001:1868:205::9; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org designates 2001:1868:205::9 as permitted sender) smtp.mailfrom=linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.85_2 #1 (Red Hat Linux)) id 1bGNae-0004l6-Bt; Fri, 24 Jun 2016 09:39:56 +0000 Received: from mout.kundenserver.de ([212.227.17.24]) by bombadil.infradead.org with esmtps (Exim 4.85_2 #1 (Red Hat Linux)) id 1bGNaa-0004bj-Tr for linux-arm-kernel@lists.infradead.org; Fri, 24 Jun 2016 09:39:54 +0000 Received: from wuerfel.lan. ([78.42.132.4]) by mrelayeu.kundenserver.de (mreue102) with ESMTPA (Nemesis) id 0MF3Up-1bAXdK3p6J-00GJrv; Fri, 24 Jun 2016 11:39:30 +0200 From: Arnd Bergmann To: Linus Walleij Subject: [PATCH 1/7] ARM: ux500: move l2x0 init to .init_irq Date: Fri, 24 Jun 2016 11:41:26 +0200 Message-Id: <20160624094132.1852086-2-arnd@arndb.de> X-Mailer: git-send-email 2.9.0 In-Reply-To: <20160624094132.1852086-1-arnd@arndb.de> References: <20160624094132.1852086-1-arnd@arndb.de> X-Provags-ID: V03:K0:vjCYFJ81fl8mbpTjvhBZdKrQtofVbdpbhZREtCdOD/pevw2m4V8 5E448wJ276/ABza4tzuan3O9DFhJve+uQSC6z/pCT3rTxfxfl0co5ZBqZEQbhA5yEAobvsE z1KBlvJMnZeY0Mzdoup1RMMm767fJQynl7FmkRR/VjR7V9heJIvbZvj1gjo2BlREwmf2CS1 gbRFf5zsuLQb/dEa5oVsw== X-UI-Out-Filterresults: notjunk:1; V01:K0:SneqntN/CIQ=:vkRQneEVdH9iJSOov1VMdJ BSvMyJHe+3XERro8EPHey5yr/aEWLq/uF9Dyuzzlr1DvIf9etYR4P3SgH13haUWAtOde3uLtv YcH6oStQtYaorq3+eZRXujZytvNaD+5+olFZx4FMTXkg5JBiwEMi4TSWXMYe1V2VKf/gYNRgT rqRNYRy+33M2GB6DPuhyEh5e7zf0B0q2mJUv/VEb402mz9mw4YoVmGbeUoZE6yfPnsECFlBPn IDAvlNAA4BY+GuYZPqs41DJCNSXh8vIw4oc5FOWRxdh8XyQGTNZpYuNjhmjT9NfnmumMunrwR RiQiz5I4Mq9UEvRMPslTa1AlfqAxb8dUAM2yXqBv0WNUoowoHjHDogWP19sf3E+UOTh4Kx8UP +/ir4gOAXU8OAlNnozTxys1TQXLvR60YSovL1o+rsm9su2Dd0SFEaPRJZTtkPqjAx2wXtiT15 qdWJ9F72mqm6QeblYkz+I5Quq9HSGS/CBhNLj25rbSoT53n9pWrv25NlVXccVvtHTCZlNuYSI iMG8U523Wqy8umKBI9T6igwydaheuRbAZnnkuoE8THDZxbxsCMJ1eGSpTULooh6vm4kcBup+R 4e7G8vyLI372IMF9uuMSpiiARK9LisajDsUoW8oBz/TWoqCmGjMAQrtle/6kwbkpvKcl4decl GL8HBocN4TOmceq4uZfyy6UdQEPDeGM4yFVa4nkzp6H992bEjb++X2XJScv4wc5i6LIs= X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160624_023953_317037_5C881E0B X-CRM114-Status: GOOD ( 13.75 ) X-Spam-Score: -1.9 (-) X-Spam-Report: SpamAssassin version 3.4.0 on bombadil.infradead.org summary: Content analysis details: (-1.9 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/, no trust [212.227.17.24 listed in list.dnswl.org] -0.0 RCVD_IN_MSPIKE_H2 RBL: Average reputation (+2) [212.227.17.24 listed in wl.mailspike.net] -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Arnd Bergmann , Lee Jones , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org The generic IRQ init function also enables the l2 cache implicitly when the machine descriptor sets an .l2c_aux_mask. Let's use that on ux500 and remove the ux500_l2x0_init() along with the cpu_is_u8500_family checks. Signed-off-by: Arnd Bergmann --- arch/arm/mach-ux500/cache-l2x0.c | 8 +------- arch/arm/mach-ux500/cpu-db8500.c | 3 ++- arch/arm/mach-ux500/cpu.c | 1 + arch/arm/mach-ux500/setup.h | 3 +++ 4 files changed, 7 insertions(+), 8 deletions(-) -- 2.9.0 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel diff --git a/arch/arm/mach-ux500/cache-l2x0.c b/arch/arm/mach-ux500/cache-l2x0.c index 780bd13cd7e3..d7abc1187769 100644 --- a/arch/arm/mach-ux500/cache-l2x0.c +++ b/arch/arm/mach-ux500/cache-l2x0.c @@ -51,17 +51,11 @@ static void ux500_l2c310_write_sec(unsigned long val, unsigned reg) */ } -static int __init ux500_l2x0_init(void) +void __init ux500_l2x0_init(void) { - /* 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; - l2x0_of_init(0, ~0); return 0; } -early_initcall(ux500_l2x0_init); diff --git a/arch/arm/mach-ux500/cpu-db8500.c b/arch/arm/mach-ux500/cpu-db8500.c index bbd1b4b8d441..3874e9c236e9 100644 --- a/arch/arm/mach-ux500/cpu-db8500.c +++ b/arch/arm/mach-ux500/cpu-db8500.c @@ -141,10 +141,11 @@ static const char * stericsson_dt_platform_compat[] = { }; DT_MACHINE_START(U8500_DT, "ST-Ericsson Ux5x0 platform (Device Tree Support)") + .l2c_aux_val = 0, + .l2c_aux_mask = ~0, .map_io = u8500_map_io, .init_irq = ux500_init_irq, .init_machine = u8500_init_machine, - .init_late = NULL, .dt_compat = stericsson_dt_platform_compat, .restart = ux500_restart, MACHINE_END diff --git a/arch/arm/mach-ux500/cpu.c b/arch/arm/mach-ux500/cpu.c index 82156cbc22ce..f8c2d6f2fb7e 100644 --- a/arch/arm/mach-ux500/cpu.c +++ b/arch/arm/mach-ux500/cpu.c @@ -65,6 +65,7 @@ void __init ux500_init_irq(void) } prcmu_early_init(r.start, r.end-r.start); ux500_pm_init(r.start, r.end-r.start); + ux500_l2x0_init(); /* * Init clocks here so that they are available for system timer diff --git a/arch/arm/mach-ux500/setup.h b/arch/arm/mach-ux500/setup.h index e606847c8b58..8b44b646b191 100644 --- a/arch/arm/mach-ux500/setup.h +++ b/arch/arm/mach-ux500/setup.h @@ -14,6 +14,9 @@ #include #include + +void ux500_l2x0_init(void); + void ux500_restart(enum reboot_mode mode, const char *cmd); void __init ux500_setup_id(void);