Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933594AbcKQE0h (ORCPT ); Wed, 16 Nov 2016 23:26:37 -0500 Received: from mailout1.samsung.com ([203.254.224.24]:34155 "EHLO mailout1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753211AbcKQE0g (ORCPT ); Wed, 16 Nov 2016 23:26:36 -0500 X-AuditID: b6c32a36-f79616d000001a37-33-582d31783a91 Subject: Re: [PATCH 12/16] ARM: imx: use generic API for enabling SCU To: Shawn Guo Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, rmk+kernel@armlinux.org.uk, arnd@arndb.de, 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, Sascha Hauer , "cpgs ." From: "pankaj.dubey" Message-id: <65abb76e-2aff-4057-c1ac-7ed71563d426@samsung.com> Date: Thu, 17 Nov 2016 09:59:40 +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: <20161114142631.GP3310@dragon> Content-type: text/plain; charset=windows-1252 Content-transfer-encoding: 7bit X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFtrIJsWRmVeSWpSXmKPExsWy7bCmvm6FoW6EQc9nS4u/k46xW7w8pGkx d/YkRovmrV8ZLVZN3clicf78BnaLTY+vsVpc3jWHzeLB6rdsFpf6JzJZvNgibjH/20lWi45l jBabHxxjc+DzuHztIrPH71+TGD0mntX12DnrLrvHplWdbB6bl9R79P818OjbsorRY87Pbywe nzfJBXBFpdpkpCampBYppOYl56dk5qXbKnkHxzvHm5oZGOoaWlqYKynkJeam2iq5+AToumXm AB2vpFCWmFMKFApILC5W0rezKcovLUlVyMgvLrFVijY0NNIzNDDXMzIy0jMxirUyMgUqSUjN mPPgH2PBCr6K/yu+sTcw7uDuYuTkkBA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Ac4B6spG+X4JYx58E/xoIVfBX/V3xjb2Dcwd3FyMkhIWAiMe36WyYIW0ziwr31bF2MXBxC ApsZJa4vaGXsYuTgEBZwlTjZYAVSIyKgLHFqYx87RM1fRondLQfAGpgFbjNJdP3vZgOpYhPQ l5j+eBuYzStgJ9G+eTkziM0ioCrR3zSJFcQWFYiQ2PR1DgtEjaDEyZlPwGxOAW2JjxPegfUy C+hJ7Lj+ixXClpfY/nYO8wRG/llIWmYhKZuFpGwBI/MqRrHUguLc9NziAgNDveLE3OLSvHS9 5PzcTYzAqN12WElsB2PbCq9DjAIcjEo8vBXHdCKEWBPLiitzDzFKcDArifBm6uhGCPGmJFZW pRblxxeV5qQWH2I0BXpjIrOUaHI+MKHklcQbmphaWFiYWBobG1uYKInzxk5/Fi4kkJ5Ykpqd mlqQWgTTx8TBKdXAGBkxq9Zh26OS/tzm9IbgDwl8ARM5+vWVjtZG9NXat1aJ8/Dd4NTYn1z0 Slr17LSCTWcXJN/298pqj4uwPn7OWyeEpV7rct8j3pSjSzJ+hTgejf3MaK4TULn37KPbly8s 5DgouoiFbVlqxnSBj+05Z36H353c9bp4nuWe5ckH3dbmXLKQNfuuxFKckWioxVxUnAgA/f6y efACAAA= X-MTR: 20000000000000000@CPGS X-CMS-MailID: 20161117042632epcas1p289269b8885fe10994860876d8ddb1785 X-Msg-Generator: CA X-Sender-IP: 182.195.34.22 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: 101P DLP-Filter: Pass X-CFilter-Loop: Reflected X-HopCount: 7 X-CMS-RootMailID: 20161114142651epcas5p2ffdb722d348257c900d233fdb95885f3 X-RootMTR: 20161114142651epcas5p2ffdb722d348257c900d233fdb95885f3 References: <1479099731-28108-1-git-send-email-pankaj.dubey@samsung.com> <1479099731-28108-13-git-send-email-pankaj.dubey@samsung.com> <20161114142631.GP3310@dragon> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1787 Lines: 45 Hi Shawn, On Monday 14 November 2016 07:56 PM, Shawn Guo wrote: > On Mon, Nov 14, 2016 at 10:32:07AM +0530, Pankaj Dubey wrote: >> Now as we have of_scu_enable which takes care of mapping >> scu base from DT, lets use it. >> >> At the same time this patch cleans up mach-imx platform files by >> removing static mapping of SCU and dropping imx_scu_map_io function. > > I remember that the static mapping of SCU is necessary because SCU is > being accessed at very early boot stage where dynamic mapping hasn't > been set up. > >> CC: Shawn Guo >> CC: Sascha Hauer >> Signed-off-by: Pankaj Dubey >> --- >> arch/arm/mach-imx/common.h | 5 ----- >> arch/arm/mach-imx/mach-imx6q.c | 8 +------- >> arch/arm/mach-imx/platsmp.c | 32 +++++--------------------------- >> arch/arm/mach-imx/pm-imx6.c | 3 ++- >> 4 files changed, 8 insertions(+), 40 deletions(-) > > I tested it and saw that the booting of imx6q is broken like below. Thanks for testing and letting me know about this. Currently only two platforms (IMX and ZYNQ) are using SCU address at very early stage of boot, for configuring possible cpus via set_cpu_possible().. rest platforms are either using DT method or they handle this in smp_prepare_cpus. Since I am not sure if all boards based on IMX has been moved to DT based boot, if it has moved to completely DT based then we do not need this set_cpu_possible in smp_init_cpus, it will be taken care via "arm_dt_init_cpu_maps" and this will avoid need of early mapping of SCU base as well. If not then, currently I can't see any other way to handle this and in that case I will drop-out IMX platform's patch of using generic SCU APIs in v2 version of series. Thanks, Pankaj Dubey