Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S935947AbcKNE7s (ORCPT ); Sun, 13 Nov 2016 23:59:48 -0500 Received: from mailout2.samsung.com ([203.254.224.25]:51703 "EHLO mailout2.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S964831AbcKNE7k (ORCPT ); Sun, 13 Nov 2016 23:59:40 -0500 X-AuditID: cbfee61a-f79916d0000062de-88-582944ae5844 From: Pankaj Dubey To: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Cc: 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, Pankaj Dubey , Linus Walleij Subject: [PATCH 07/16] ARM: ux500: use generic API for enabling SCU Date: Mon, 14 Nov 2016 10:32:02 +0530 Message-id: <1479099731-28108-8-git-send-email-pankaj.dubey@samsung.com> X-Mailer: git-send-email 2.7.4 In-reply-to: <1479099731-28108-1-git-send-email-pankaj.dubey@samsung.com> References: <1479099731-28108-1-git-send-email-pankaj.dubey@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFlrIIsWRmVeSWpSXmKPExsVy+t9jQd11LpoRBjOXmlr8nXSM3WLu7EmM Fs1bvzJanD+/gd1iyp/lTBabHl9jtbi8aw6bxYPVb9ksFm39wm5xqX8ik8X8bydZLTqWMVps fnCMzYHX4/K1i8wev39NYvSYeFbXY+esu+wem1Z1snncubaHzWPzknqPvi2rGD3m/PzG4vF5 k1wAV5SbTUZqYkpqkUJqXnJ+SmZeuq1SaIibroWSQl5ibqqtUoSub0iQkkJZYk4pkGdkgAYc nAPcg5X07RLcMvp39zAXPOKseLh4NlsDYytHFyMnh4SAicT6y0vZIWwxiQv31rN1MXJxCAnM YpRYMGMRK4Tzk1Hi894bYFVsAroST97PZQaxRQTcJG40djCBFDELLGeSWHxnARNIQljAWeLV qhlA3RwcLAKqEkv22IKEeQU8JM7d/MEMsU1O4ua5TjCbU8BTYk7nGTYQWwio5vmN64wTGHkX MDKsYpRILUguKE5KzzXMSy3XK07MLS7NS9dLzs/dxAiOnmdSOxgP7nI/xCjAwajEw3vATDNC iDWxrLgy9xCjBAezkgivqw1QiDclsbIqtSg/vqg0J7X4EKMp0F0TmaVEk/OBkZ1XEm9oYm5i bmxgYW5paWKkJM7bOPtZuJBAemJJanZqakFqEUwfEwenVAPjqTrHZzfK7Bdf6plcsv9WjqFW VIxZ0oaz/azckfdvJoY5hMmecd+67UFKfYKJcIjAgevu96XYs/cYczhe/LFoopTCiZD75RO3 ibKY2q0+032+IFpLPuW+l9V2ewPDtQzTpvW/cJNceLhEZO9f//TOt28WHj5acOZzhavVJM3d cdn3eaSvC1opsRRnJBpqMRcVJwIAr+qY0LQCAAA= X-MTR: 20000000000000000@CPGS Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1203 Lines: 45 Now as we have of_scu_enable which takes care of mapping scu base from DT, lets use it. CC: Linus Walleij Signed-off-by: Pankaj Dubey --- arch/arm/mach-ux500/platsmp.c | 20 +------------------- 1 file changed, 1 insertion(+), 19 deletions(-) diff --git a/arch/arm/mach-ux500/platsmp.c b/arch/arm/mach-ux500/platsmp.c index 8f2f615..e1927ae 100644 --- a/arch/arm/mach-ux500/platsmp.c +++ b/arch/arm/mach-ux500/platsmp.c @@ -66,28 +66,10 @@ static void wakeup_secondary(void) static void __init ux500_smp_prepare_cpus(unsigned int max_cpus) { - struct device_node *np; - static void __iomem *scu_base; - unsigned int ncores; - int i; - - np = of_find_compatible_node(NULL, NULL, "arm,cortex-a9-scu"); - if (!np) { - pr_err("No SCU base address\n"); - return; - } - scu_base = of_iomap(np, 0); - of_node_put(np); - if (!scu_base) { + if (of_scu_enable()) { pr_err("No SCU remap\n"); return; } - - scu_enable(scu_base); - ncores = scu_get_core_count(scu_base); - for (i = 0; i < ncores; i++) - set_cpu_possible(i, true); - iounmap(scu_base); } static int ux500_boot_secondary(unsigned int cpu, struct task_struct *idle) -- 2.7.4