Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S941038AbcKNFCM (ORCPT ); Mon, 14 Nov 2016 00:02:12 -0500 Received: from mailout3.samsung.com ([203.254.224.33]:47854 "EHLO mailout3.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934276AbcKNE7i (ORCPT ); Sun, 13 Nov 2016 23:59:38 -0500 X-AuditID: cbfee61b-f796f6d000004092-ec-582944b783c1 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 , Heiko Stuebner , linux-rockchip@lists.infradead.org Subject: [PATCH 11/16] ARM: rockchip: use generic API for enabling SCU Date: Mon, 14 Nov 2016 10:32:06 +0530 Message-id: <1479099731-28108-12-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+NgFlrGIsWRmVeSWpSXmKPExsVy+t9jQd3tLpoRBp8OmVn8nXSM3WLu7EmM Fv8fvWa1aN76ldHi/PkN7BabHl9jtbi8aw6bxacH/5ktHqx+y2axaOsXdotL/ROZLOZ/O8lq 0bGM0WLzg2NsDnwel69dZPb4/WsSo8fEs7oeO2fdZffYtKqTzWPzknqPvi2rGD22X5vH7DHn 5zcWj8+b5AK4otxsMlITU1KLFFLzkvNTMvPSbZVCQ9x0LZQU8hJzU22VInR9Q4KUFMoSc0qB PCMDNODgHOAerKRvl+CW8WnhXMaCLq6KK392sDcwLuXoYuTkkBAwkThx4DILhC0mceHeejYQ W0hgFqPEkimlXYxcQPZPRokfL3eBJdgEdCWevJ/LDGKLCLhJ3GjsYAIpYhY4zCTx6fQGsIQw UKK35QoriM0ioCrxZ8VDsDivgKfEx91rmSC2yUncPNcJFucEis/pPAO12UPi+Y3rjBMYeRcw MqxilEgtSC4oTkrPNcpLLdcrTswtLs1L10vOz93ECI6jZ9I7GA/vcj/EKMDBqMTD25GvESHE mlhWXJl7iFGCg1lJhNfVRjNCiDclsbIqtSg/vqg0J7X4EKMp0GETmaVEk/OBMZ5XEm9oYm5i bmxgYW5paWKkJM7bOPtZuJBAemJJanZqakFqEUwfEwenVAMjy92982Vjdj//uVlbgPX+qqBX zLEPthve3Xnv2RbTBRuXtmrvERN3/1NRxDVrv0ugwL2WCwr6yxe9tVtqZvtjede6eP+XZmYv 5XYterAz/BhrWuRqx077yr3H5p048LP9QEZewsnFX5crCz8vehHvknjTwG3Cxa/H1EpCPL4d ded9+eRrqtSVm0osxRmJhlrMRcWJANEJJ1y5AgAA X-MTR: 20000000000000000@CPGS Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1247 Lines: 41 Now as we have of_scu_enable which takes care of mapping scu base from DT, lets use it. CC: Heiko Stuebner CC: linux-rockchip@lists.infradead.org Signed-off-by: Pankaj Dubey --- arch/arm/mach-rockchip/platsmp.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/arch/arm/mach-rockchip/platsmp.c b/arch/arm/mach-rockchip/platsmp.c index 4d827a0..31169cf 100644 --- a/arch/arm/mach-rockchip/platsmp.c +++ b/arch/arm/mach-rockchip/platsmp.c @@ -282,21 +282,15 @@ static void __init rockchip_smp_prepare_cpus(unsigned int max_cpus) if (has_pmu && rockchip_smp_prepare_pmu()) return; - if (read_cpuid_part() == ARM_CPU_PART_CORTEX_A9) { + if (scu_a9_has_base()) { if (rockchip_smp_prepare_sram(node)) return; /* enable the SCU power domain */ pmu_set_power_domain(PMU_PWRDN_SCU, true); - node = of_find_compatible_node(NULL, NULL, "arm,cortex-a9-scu"); - if (!node) { - pr_err("%s: missing scu\n", __func__); - return; - } - - scu_base_addr = of_iomap(node, 0); - if (!scu_base_addr) { + scu_base_addr = of_scu_get_base(); + if (IS_ERR(scu_base_addr)) { pr_err("%s: could not map scu registers\n", __func__); return; } -- 2.7.4