Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754165AbcKNL5R (ORCPT ); Mon, 14 Nov 2016 06:57:17 -0500 Received: from mout.kundenserver.de ([212.227.126.130]:56413 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752269AbcKNL5P (ORCPT ); Mon, 14 Nov 2016 06:57:15 -0500 From: Arnd Bergmann To: Pankaj Dubey Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, rmk+kernel@armlinux.org.uk, horms@verge.net.au, magnus.damm@gmail.com, geert+renesas@glider.be, vireshk@kernel.org, shiraz.linux.kernel@gmail.com, krzk@kernel.org, thomas.ab@samsung.com, Russell King Subject: Re: [PATCH 04/16] ARM: realview: use generic API for enabling SCU Date: Mon, 14 Nov 2016 12:56:24 +0100 Message-ID: <3587281.4kOCcW9Ryd@wuerfel> User-Agent: KMail/5.1.3 (Linux/4.4.0-34-generic; KDE/5.18.0; x86_64; ; ) In-Reply-To: <1479099731-28108-5-git-send-email-pankaj.dubey@samsung.com> References: <1479099731-28108-1-git-send-email-pankaj.dubey@samsung.com> <1479099731-28108-5-git-send-email-pankaj.dubey@samsung.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Provags-ID: V03:K0:qqjt7zMTd2E9BEWqGpEDaYL8WlLCy6jBsq1u2d0telyjKHKZfoQ +tsZcaFtriCXU7M9FbLxHaRmRGRCB6GPqIjW21Mn+Pr7fea6CxwT1KimT/T/pkxydieOJbO N/9fcEmiC7hJ8K/CBDBNpG1NuS+X+oz8pZ3oPXpc8XA7f7YT57MhVHzC5bgWXqPdiojKE2D h4ybNWoB8BEoO5gPvZa7Q== X-UI-Out-Filterresults: notjunk:1;V01:K0:xjEEtrrJ3Cc=:QwnRB9l5XPgNvWXXYTmS62 5RujBHQ0dmWouXQMSiaSMmjA/r6l6mmpEKHRfn2reIIrUHHfRS12djsz9giSTQpAxJ6bwT5At QR9478mVv2OBNR1YHQOQ9Dc8dBp+YI1b6Pqz21y+WIRz37vLMgVWKu+bIdItKN3QnmH3Tgmqj 4/TezVEIS8Lcb0apjvVmGzizDsPnh3AsIwEA+o6CmrthHBQ9Ev8ISBypAsFn13EgAwnULd83S nqHpsO347dTLpBueDJTHgpb17ZNMKatAWV/9iQU2P3fEKdd7Dr+7MjSjxoNbs9jftij+0UQu7 V/iGmc1WDoAmRgcAZkUlmBxJhvJJgetRw+NXfMINTM08Bzq6whYbsqE0K0vR7dwjM9JtRPvN2 GSRCr62XdcHvbA91KhmGDkCf3h8VttukdBlDqo5fJ2jiyb4WrKBz6SSl9m+8aijvDF8qmL6Sw iJthKEY7yCfe67HM3A9niqZMmtbxvZRF+CddHryFBsdMCTu1hFWvJGTywTSNIDuB0UKDbvFkk D9JOpIT0zhn6WYqpyZfxSPwVzwWQlzpJC/uduD2jUN8iI8NwTj0xhKlZbwKJvPRuzLyTekPKo IgPQoOfyc4LB/E/vDACn1KcbiyubIWyzwW2ipUFA9JBnMZCAVTuO2+201XNNWGmYIwlVP12F1 /6efoJ59NLMpazZaGN3f+iI2i3IK7xYyTO5LPOJ+/0/Rc6Vs2NJnNv0PRw+gQOp0dmbPUKOXi Njx5gpSvg35JYKeI Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1250 Lines: 35 On Monday, November 14, 2016 10:31:59 AM CET Pankaj Dubey wrote: > static const struct of_device_id realview_scu_match[] = { > { .compatible = "arm,arm11mp-scu", }, > - { .compatible = "arm,cortex-a9-scu", }, > - { .compatible = "arm,cortex-a5-scu", }, > { } > }; > > @@ -41,27 +39,18 @@ static void __init realview_smp_prepare_cpus(unsigned int max_cpus) > struct device_node *np; > void __iomem *scu_base; > struct regmap *map; > - unsigned int ncores; > int i; > > - np = of_find_matching_node(NULL, realview_scu_match); > - if (!np) { > - pr_err("PLATSMP: No SCU base address\n"); > - return; > + if (of_scu_enable()) { > + np = of_find_matching_node(NULL, realview_scu_match); > + scu_base = of_iomap(np, 0); > + of_node_put(np); > + if (!scu_base) { > + pr_err("PLATSMP: No SCU remap\n"); > + return; > + } > + scu_enable(scu_base); > } > The only difference here seems to be that realview also needs to handle "arm,arm11mp-scu". Why not move that into the generic implementation? Arnd