From patchwork Wed Aug 24 13:49:05 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chanwoo Choi X-Patchwork-Id: 9297901 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 DACDA607F0 for ; Wed, 24 Aug 2016 13:51:42 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id CBC3628FE3 for ; Wed, 24 Aug 2016 13:51:42 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id BFBF028FF3; Wed, 24 Aug 2016 13:51:42 +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=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1FCC728FE3 for ; Wed, 24 Aug 2016 13:51:42 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756472AbcHXNvk (ORCPT ); Wed, 24 Aug 2016 09:51:40 -0400 Received: from mailout2.samsung.com ([203.254.224.25]:38011 "EHLO mailout2.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752864AbcHXNtl (ORCPT ); Wed, 24 Aug 2016 09:49:41 -0400 Received: from epcpsbgr1.samsung.com (u141.gpu120.samsung.co.kr [203.254.230.141]) by mailout2.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTP id <0OCF01FRC2EC9D20@mailout2.samsung.com>; Wed, 24 Aug 2016 22:49:24 +0900 (KST) Received: from epcpsbgm2new.samsung.com ( [172.20.52.113]) by epcpsbgr1.samsung.com (EPCPMTA) with SMTP id A7.D4.31386.4E5ADB75; Wed, 24 Aug 2016 22:49:24 +0900 (KST) X-AuditID: cbfee68d-f79286d000007a9a-e7-57bda5e4668d Received: from epmmp1.local.host ( [203.254.227.16]) by epcpsbgm2new.samsung.com (EPCPMTA) with SMTP id 2B.9B.07740.4E5ADB75; Wed, 24 Aug 2016 06:49:24 -0700 (MST) Received: from chan.10.32.193.11 ([10.113.62.212]) by mmp1.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTPA id <0OCF00GWI2EBKL20@mmp1.samsung.com>; Wed, 24 Aug 2016 22:49:24 +0900 (KST) From: Chanwoo Choi To: k.kozlowski@samsung.com, kgene@kernel.org, robh+dt@kernel.org, mark.rutland@arm.com, catalin.marinas@arm.com, will.deacon@arm.com, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org, linux-kernel@vger.kernel.org Cc: krzk@kernel.org, cw00.choi@samsung.com, jh80.chung@samsung.com, sw0312.kim@samsung.com, jy0922.shim@samsung.com, inki.dae@samsung.com, jonghwa3.lee@samsung.com, beomho.seo@samsung.com, jaewon02.kim@samsung.com, human.hwang@samsung.com, ideal.song@samsung.com, ingi2.kim@samsung.com, m.szyprowski@samsung.com, a.hajda@samsung.com, s.nawrocki@samsung.com, chanwoo@kernel.org, Daniel Lezcano , Thomas Gleixner Subject: [PATCH v2 1/7] clocksource: exynos_mct: Add the support for ARM64 Date: Wed, 24 Aug 2016 22:49:05 +0900 Message-id: <1472046551-703-2-git-send-email-cw00.choi@samsung.com> X-Mailer: git-send-email 1.8.0 In-reply-to: <1472046551-703-1-git-send-email-cw00.choi@samsung.com> References: <1472046551-703-1-git-send-email-cw00.choi@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFjrNIsWRmVeSWpSXmKPExsWyRsSkUPfJ0r3hBicfqVjcWneO1eL0p23s Fu+X9TBaTLxxh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xevzC06H/8mtni/PkN7BabHl9jtbi8aw6bxYzz+5gs1h65y26x9PpF JovWvUfYLQ6/aWe1mDH5JZvF5k1TmS1efjzB4iDjsWbeGkaPTas62TzuXNvD5vHu3Dl2j81L 6j36tqxi9Pi8SS6APaqB0SYjNTEltUghNS85PyUzL91WyTs43jne1MzAUNfQ0sJcSSEvMTfV VsnFJ0DXLTMH6G8lhbLEnFKgUEBicbGSvh2mCaEhbroWMI0Rur4hQXA9RgZoIGENY0bP7gts BXP5K9Zd3MvUwPiZp4uRk0NCwETiXl83G4QtJnHh3nogm4tDSGApo8Sxnd+YQBJCAl8YJR5O LQSx2QS0JPa/uAFWJCLQxySx7NRZJhCHWeAas8SEU09YQaqEBbwk5j1oY+xi5OBgEVCVmNMf CBLmFXCW+PHhACvENjmJD3sesYPYnAIuEgt/9LGBlAsB1VyZLjiBkXcBI8MqRonUguSC4qT0 XKO81HK94sTc4tK8dL3k/NxNjOBU8Ux6B+PhXe6HGAU4GJV4eH8w7g0XYk0sK67MPcQowcGs JMIrAkw0QrwpiZVVqUX58UWlOanFhxhNgc6ayCwlmpwPTGN5JfGGxiZmRpZG5oYWRsbmSuK8 j/+vCxMSSE8sSc1OTS1ILYLpY+LglGpgnHLDYvqzubmfTyzm5vmlPs/6WFaKuterbvEGT9tr G44c5N5ZuHXJioX37FeH18fZv7BvOiAwy/Fi5d3/NzeIq1oxiRx0tjs952aHhJ5z03p1oxtT 196UZ3gkzRLEq8UmFPmTeT3L7hadfAn2DXt5grYsTLn8okJkYeDyy+mnHit/21fk3CPor8RS nJFoqMVcVJwIAJO6eTErAwAA DLP-Filter: Pass X-MTR: 20000000000000000@CPGS X-CFilter-Loop: Reflected Sender: linux-samsung-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP This patch adds the support for ARM 64bit. The delay_timer is only supported on ARM 32bit. Cc: Daniel Lezcano Cc: Thomas Gleixner Cc: Kukjin Kim Cc: Krzysztof Kozlowski Signed-off-by: Chanwoo Choi Acked-by: Krzysztof Kozlowski --- drivers/clocksource/Kconfig | 2 +- drivers/clocksource/exynos_mct.c | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/clocksource/Kconfig b/drivers/clocksource/Kconfig index 567788664723..ec443c318c77 100644 --- a/drivers/clocksource/Kconfig +++ b/drivers/clocksource/Kconfig @@ -351,7 +351,7 @@ config CLKSRC_METAG_GENERIC config CLKSRC_EXYNOS_MCT bool "Exynos multi core timer driver" if COMPILE_TEST - depends on ARM + depends on ARM || ARM64 help Support for Multi Core Timer controller on Exynos SoCs. diff --git a/drivers/clocksource/exynos_mct.c b/drivers/clocksource/exynos_mct.c index 41840d02c331..8f3488b80896 100644 --- a/drivers/clocksource/exynos_mct.c +++ b/drivers/clocksource/exynos_mct.c @@ -223,6 +223,7 @@ static u64 notrace exynos4_read_sched_clock(void) return exynos4_read_count_32(); } +#if defined(CONFIG_ARM) static struct delay_timer exynos4_delay_timer; static cycles_t exynos4_read_current_timer(void) @@ -231,14 +232,17 @@ static cycles_t exynos4_read_current_timer(void) "cycles_t needs to move to 32-bit for ARM64 usage"); return exynos4_read_count_32(); } +#endif static int __init exynos4_clocksource_init(void) { exynos4_mct_frc_start(); +#if defined(CONFIG_ARM) exynos4_delay_timer.read_current_timer = &exynos4_read_current_timer; exynos4_delay_timer.freq = clk_rate; register_current_timer_delay(&exynos4_delay_timer); +#endif if (clocksource_register_hz(&mct_frc, clk_rate)) panic("%s: can't register clocksource\n", mct_frc.name);