From patchwork Mon Nov 14 05:02:06 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pankaj Dubey X-Patchwork-Id: 9426475 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 7978660484 for ; Mon, 14 Nov 2016 05:03:44 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 69E12288B4 for ; Mon, 14 Nov 2016 05:03:44 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 5DE88288F7; Mon, 14 Nov 2016 05:03:44 +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 DDFF0288B4 for ; Mon, 14 Nov 2016 05:03:43 +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 1c69Qk-0001ea-Kh; Mon, 14 Nov 2016 05:03:42 +0000 Received: from mailout3.samsung.com ([203.254.224.33]) by bombadil.infradead.org with esmtps (Exim 4.85_2 #1 (Red Hat Linux)) id 1c69N6-0005zp-Kk; Mon, 14 Nov 2016 04:59:58 +0000 Received: from epcpsbgm2new.samsung.com (epcpsbgm2 [203.254.230.27]) by mailout3.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTP id <0OGM01IO98J4WVA0@mailout3.samsung.com>; Mon, 14 Nov 2016 13:59:35 +0900 (KST) X-AuditID: cbfee61b-f796f6d000004092-ec-582944b783c1 Received: from epmmp2 ( [203.254.227.17]) by epcpsbgm2new.samsung.com (EPCPMTA) with SMTP id F6.66.16530.7B449285; Mon, 14 Nov 2016 13:59:35 +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:35 +0900 (KST) From: Pankaj Dubey To: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20161113_205956_932605_BE8F8A02 X-CRM114-Status: GOOD ( 11.08 ) X-BeenThere: linux-rockchip@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Upstream kernel work for Rockchip platforms 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, linux-rockchip@lists.infradead.org, rmk+kernel@armlinux.org.uk, horms@verge.net.au, thomas.ab@samsung.com, Pankaj Dubey , shiraz.linux.kernel@gmail.com, Heiko Stuebner MIME-Version: 1.0 Sender: "Linux-rockchip" Errors-To: linux-rockchip-bounces+patchwork-linux-rockchip=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: 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; }