Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934238AbcKNMFq (ORCPT ); Mon, 14 Nov 2016 07:05:46 -0500 Received: from mailout2.samsung.com ([203.254.224.25]:38818 "EHLO mailout2.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752270AbcKNMFi (ORCPT ); Mon, 14 Nov 2016 07:05:38 -0500 X-AuditID: b6c32a45-f79ca6d000001a54-38-5829a8536c2b Subject: Re: [PATCH 04/16] ARM: realview: use generic API for enabling SCU To: Arnd Bergmann 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 From: "pankaj.dubey" Message-id: <95b10b29-2d51-9e96-c628-232f081e09f4@samsung.com> Date: Mon, 14 Nov 2016 17:36:43 +0530 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.4.0 MIME-version: 1.0 In-reply-to: <3587281.4kOCcW9Ryd@wuerfel> Content-type: text/plain; charset=windows-1252 Content-transfer-encoding: 7bit X-Brightmail-Tracker: H4sIAAAAAAAAA02Se0hTYRjG+3bOzo7V4jTTvgbVOhVksblzmNspspKsDhUlBTEWaQc9bZK7 tLNFCtFISBPK1CJbC63sgl2dl9R1nWYN8pKa/3TRsqIso6tUJrV5DPzv9348D9/zvLw4ojiH KfFMm4t32rgsEpuI1jXF6dWbL8YZtX/eU8xIcYuMOXWyGDC5tT8A095+Xcb4+3ukTFejD2OC x24Bpu/SIMZ0FhZJmLKhkJTJPw+Y6r4WbMVktqvnMcIO/y4GbFGrmm3wPpex/sqDGFtdsY89 XFMJWN+vIZT95p+VEmXil1p4LoN3qnhbuj0j02ZOJNdtTluZlqDXUmpqMWMgVTbOyieSyetT 1Kszs8KBSdVuLssdfkrhBIGMX7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g4JAROJhb8Tuxg5gUwxiQv31rN1MXJxCAlsZpR4fugJC0hC WMBL4sjCZlYQW0RAUWLqi2fMEEW/GCV6p25lB3GYBdYySXQ8nQDWwSagLzH98TY2EJtXwE6i fd1usDiLgKpE77f7zCC2qECExKavc1ggagQlTs6E2MYpoClxdP4hdhCbWUBPYsf1X6wQtrzE 9rdzmCcw8s9C0jILSdksJGULGJlXMYqlFhTnpucWFxgY6RUn5haX5qXrJefnbmIERue2w0ri OxhnrfA6xCjAwajEw1vwQSNCiDWxrLgy9xCjBAezkgjv22WaEUK8KYmVValF+fFFpTmpxYcY TYHemMgsJZqcD0wceSXxhiamFhYWJpbGxsYWJkrivLHTn4ULCaQnlqRmp6YWpBbB9DFxcEo1 MErGKp9Y6LBdnyFBQHPd54QC5bk3zF2n1U319xN2tp9+trEnU/LsxXjNzvnHTru7Xpq+4VGx 1CaBSX1dcVMWP2jmXL2Y/+idc0dXx1Q9XrX817qLCfyJdnPnLbuRLv8h3oAj113+FsM9rrXf 7W5lslwv2rZp5+E351MVNNYLF3JKnNzY5FAySUmJpTgj0VCLuag4EQC9oyFM5AIAAA== X-MTR: 20000000000000000@CPGS X-CMS-MailID: 20161114120435epcas2p233af3a7a46405f3b9342e2bdeeddf4a5 X-Msg-Generator: CA X-Sender-IP: 182.195.34.23 X-Local-Sender: =?UTF-8?B?7YyQ7Lm07KaIG1NTSVItVHVybiBLZXkgU29sdXRpb25zGw==?= =?UTF-8?B?7IK87ISx7KCE7J6QGy4vQ2hpZWYgRW5naW5lZXI=?= X-Global-Sender: =?UTF-8?B?UEFOS0FKIEtVTUFSIERVQkVZG1NTSVItVHVybiBLZXkgU29s?= =?UTF-8?B?dXRpb25zG1NhbXN1bmcgRWxlY3Ryb25pY3MbLi9DaGllZiBFbmdpbmVlcg==?= X-Sender-Code: =?UTF-8?B?QzEwG1NXQUhRG0MxMElEMDdJRDAxMDk5Nw==?= CMS-TYPE: 102P DLP-Filter: Pass X-CFilter-Loop: Reflected X-HopCount: 7 X-CMS-RootMailID: 20161114115637epcas2p33d703e738e457794b1362bd9d837a62d X-RootMTR: 20161114115637epcas2p33d703e738e457794b1362bd9d837a62d References: <1479099731-28108-1-git-send-email-pankaj.dubey@samsung.com> <1479099731-28108-5-git-send-email-pankaj.dubey@samsung.com> <3587281.4kOCcW9Ryd@wuerfel> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1639 Lines: 53 On Monday 14 November 2016 05:26 PM, Arnd Bergmann wrote: > 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? > Do you mean "arm,arm11mp-scu" this is generic SCU specific to ARM? If it's generic then it can be moved on the same line I moved a5-scu and a9-scu. I left it here in same file, as I understood it might be related with very specific to realview platform. Thanks, Pankaj Dubey > Arnd > > >