From patchwork Mon Nov 14 05:02:00 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pankaj Dubey X-Patchwork-Id: 9426461 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id D758660484 for ; Mon, 14 Nov 2016 05:02:52 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C8430288F7 for ; Mon, 14 Nov 2016 05:02:52 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id BBEB4288FA; Mon, 14 Nov 2016 05:02:52 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 6DCE5288F7 for ; Mon, 14 Nov 2016 05:02:52 +0000 (UTC) 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 1c69Ny-0007mR-AN; Mon, 14 Nov 2016 05:00:50 +0000 Received: from mailout2.samsung.com ([203.254.224.25]) by bombadil.infradead.org with esmtps (Exim 4.85_2 #1 (Red Hat Linux)) id 1c69Ms-0005x4-PB for linux-arm-kernel@lists.infradead.org; Mon, 14 Nov 2016 04:59:44 +0000 Received: from epcpsbgm2new.samsung.com (epcpsbgm2 [203.254.230.27]) by mailout2.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTP id <0OGM00F5D8INJL70@mailout2.samsung.com> for linux-arm-kernel@lists.infradead.org; Mon, 14 Nov 2016 13:59:22 +0900 (KST) X-AuditID: cbfee61b-f796f6d000004092-d4-582944aac608 Received: from epmmp2 ( [203.254.227.17]) by epcpsbgm2new.samsung.com (EPCPMTA) with SMTP id 70.66.16530.AA449285; Mon, 14 Nov 2016 13:59:22 +0900 (KST) Received: from pankaj.sisodomain.com ([107.108.83.125]) by mmp2.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTPA id <0OGM009SR8IFBJ70@mmp2.samsung.com>; Mon, 14 Nov 2016 13:59:22 +0900 (KST) From: Pankaj Dubey To: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH 05/16] ARM: socfpga: use generic API for enabling SCU Date: Mon, 14 Nov 2016 10:32:00 +0530 Message-id: <1479099731-28108-6-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+t9jQd1VLpoRBod/WFj8nXSM3WLVpzXM FnNnT2K0aN76ldHi/PkN7BabHl9jtbi8aw6bxYPVb9ksFm39wm5xqX8ik8X8bydZLTqWMVps fnCMzYHX4/K1i8wev39NYvSYeFbXY+esu+wem1Z1snlsXlLv0X9tErtH35ZVjB5zfn5j8fi8 SS6AK8rNJiM1MSW1SCE1Lzk/JTMv3VYpNMRN10JJIS8xN9VWKULXNyRISaEsMacUyDMyQAMO zgHuwUr6dgluGVvbuAv2cVRMaWtkbmCcwN7FyMkhIWAi8fLfNihbTOLCvfVsXYxcHEICsxgl epvXs0A4Pxklbu9+zgpSxSagK/Hk/VxmEFtEwE3iRmMHE0gRs8BqJomfz86wgCSEBVwlLn15 BtbAIqAq0bnwEpjNK+AhsW/xI0aIdXISN891gg3iFPCUmNN5hg3EFgKqeX7jOuMERt4FjAyr GCVSC5ILipPSc43yUsv1ihNzi0vz0vWS83M3MYKj55n0DsbDu9wPMQpwMCrx8Hbka0QIsSaW FVfmHmKU4GBWEuF1tdGMEOJNSaysSi3Kjy8qzUktPsRoCnTYRGYp0eR8YGTnlcQbmpibmBsb WJhbWpoYKYnzNs5+Fi4kkJ5YkpqdmlqQWgTTx8TBKdXAmPzJ0crwaV3qVnvjLf4Znxa6XLjm MeH9insfL/5c/fCrWk1gde57y0kRQfOfCJ6+fshb4mN3I/9hpc1X9iyq+sh6ZE+F1olP8u6T 0q2u6v99+s/0cEzn1ZlhwhcDpqbMU7Vkn5vY7blT7NahQLGps3IYbjcF3qw6+Vhy6fbc7g8R cv5/VFu6bJVYijMSDbWYi4oTAdj+fkW0AgAA X-MTR: 20000000000000000@CPGS X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20161113_205943_219113_BF99DB47 X-CRM114-Status: GOOD ( 10.80 ) 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@arndb.de, geert+renesas@glider.be, vireshk@kernel.org, magnus.damm@gmail.com, krzk@kernel.org, rmk+kernel@armlinux.org.uk, horms@verge.net.au, thomas.ab@samsung.com, Pankaj Dubey , Dinh Nguyen , shiraz.linux.kernel@gmail.com MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP Now as we have of_scu_enable which takes care of mapping scu base from DT, lets use it. CC: Dinh Nguyen Signed-off-by: Pankaj Dubey --- arch/arm/mach-socfpga/platsmp.c | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/arch/arm/mach-socfpga/platsmp.c b/arch/arm/mach-socfpga/platsmp.c index 0794574..d3f0a07 100644 --- a/arch/arm/mach-socfpga/platsmp.c +++ b/arch/arm/mach-socfpga/platsmp.c @@ -79,19 +79,10 @@ static int socfpga_a10_boot_secondary(unsigned int cpu, struct task_struct *idle static void __init socfpga_smp_prepare_cpus(unsigned int max_cpus) { - struct device_node *np; - void __iomem *socfpga_scu_base_addr; - - np = of_find_compatible_node(NULL, NULL, "arm,cortex-a9-scu"); - if (!np) { + if (of_scu_enable()) { pr_err("%s: missing scu\n", __func__); return; } - - socfpga_scu_base_addr = of_iomap(np, 0); - if (!socfpga_scu_base_addr) - return; - scu_enable(socfpga_scu_base_addr); } #ifdef CONFIG_HOTPLUG_CPU