From patchwork Wed Oct 17 13:41:57 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marek Szyprowski X-Patchwork-Id: 10645645 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 94AFF15E2 for ; Wed, 17 Oct 2018 13:45:05 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7CD9C2B076 for ; Wed, 17 Oct 2018 13:45:05 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 6E54D2B09D; Wed, 17 Oct 2018 13:45:05 +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=-2.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 6491E2B076 for ; Wed, 17 Oct 2018 13:45:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-reply-to:Message-id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=mVoixFJTSUySbWtJUWumwPIqLtH7q1vCgbC+P9HRzQU=; b=OqIaVJjpta99dbOHhSjy22aqTD +WkoopL2vCf5YQNr+cVyglpD7DnRlP5iTe1SEeJmHjKbU7kDtFvioICwYHCePlrNG+4WHINo1bwG5 Wpf2Jwipvl9ZEZAL4Rmo/5ai2JZXwjqLPJBxZRyEYhZfd8H1RGSfwQMcsXWwPKx3a4xgLZ9b9cxx+ C5JwGPmAWHJKQSDU18o7/lK4wUG8YPtPql43LU1Lo2E2PmNyQfvakwfsCnf7/QBYi1satHvZVlbr1 LBzSs01SZmXyXJ/Z/Cr6STxCtVpMQxqibrvUHRNQ/p0VUwe+HpJz2KMV4e9yLxbIO7TDME4jXASvW 16H9SnOw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1gCm8A-0006Up-3A; Wed, 17 Oct 2018 13:44:58 +0000 Received: from mailout1.w1.samsung.com ([210.118.77.11]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gCm5b-0005II-57 for linux-arm-kernel@lists.infradead.org; Wed, 17 Oct 2018 13:42:24 +0000 Received: from eucas1p2.samsung.com (unknown [182.198.249.207]) by mailout1.w1.samsung.com (KnoxPortal) with ESMTP id 20181017134208euoutp01ceba8569d860510361e51091384e9e6b~eaSSgAW3Q1251312513euoutp01D; Wed, 17 Oct 2018 13:42:08 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout1.w1.samsung.com 20181017134208euoutp01ceba8569d860510361e51091384e9e6b~eaSSgAW3Q1251312513euoutp01D DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1539783728; bh=5+5MtfY6OsS9nIIyl7W+JZvvkhN7JVG2GisE3EjsluE=; h=From:To:Cc:Subject:Date:In-reply-to:References:From; b=ifijoEISTcKrYxWpDkG7RbifMCK91rCLHBbTLbTNR6ZILwgrhMuCvuWmlvgnhJVAK GzlEW/qa2Sw8XOz6Uhj0cj/+piNGTDLwaYiAbAS4emPFU47omnxySO9skL6RAlIbWm orSnwH0UZxoGoeDb76Z7IzNtiAt9BgDebyNoadpg= Received: from eusmges1new.samsung.com (unknown [203.254.199.242]) by eucas1p2.samsung.com (KnoxPortal) with ESMTP id 20181017134207eucas1p2ddd72a7f9c9f8a6cfa44305722f2ad76~eaSR3wbLZ1291812918eucas1p24; Wed, 17 Oct 2018 13:42:07 +0000 (GMT) Received: from eucas1p2.samsung.com ( [182.198.249.207]) by eusmges1new.samsung.com (EUCPMTA) with SMTP id 4F.4E.04441.F2C37CB5; Wed, 17 Oct 2018 14:42:07 +0100 (BST) Received: from eusmgms1.samsung.com (unknown [182.198.249.179]) by eucas1p1.samsung.com (KnoxPortal) with ESMTP id 20181017134207eucas1p1b938eefe31fc47baaf538c9ebafc1a7e~eaSRGtc5e1609116091eucas1p1p; Wed, 17 Oct 2018 13:42:07 +0000 (GMT) X-AuditID: cbfec7f2-5c9ff70000001159-97-5bc73c2f66a6 Received: from eusync4.samsung.com ( [203.254.199.214]) by eusmgms1.samsung.com (EUCPMTA) with SMTP id 69.22.04284.F2C37CB5; Wed, 17 Oct 2018 14:42:07 +0100 (BST) Received: from AMDC2765.digital.local ([106.116.147.25]) by eusync4.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTPA id <0PGQ001A0WQ1IZ80@eusync4.samsung.com>; Wed, 17 Oct 2018 14:42:07 +0100 (BST) From: Marek Szyprowski To: linux-samsung-soc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH v3 4/6] clocksource: exynos_mct: Add arch_timer cooperation mode for ARM64 Date: Wed, 17 Oct 2018 15:41:57 +0200 Message-id: <20181017134159.9656-5-m.szyprowski@samsung.com> X-Mailer: git-send-email 2.17.1 In-reply-to: <20181017134159.9656-1-m.szyprowski@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFjrPIsWRmVeSWpSXmKPExsWy7djP87r6NsejDWbO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Pm+QC2KO4bFJSczLLUov0 7RK4Mubf0S5YxVWxYOJipgbGgxxdjJwcEgImEtMWPGPpYuTiEBJYwiix6cQWZginiUniwcYJ bCBVbAKGEl1vu8BsEYFsifl7u9lBbGaBJcwSN+87gNjCAjES555/ZAGxWQRUJTa+/cwEYvMK 2EjM2baGFWKbvMTqDQeAFnBwcArYSqztrwIJCwGVvPw8l2kCI88CRoZVjCKppcW56bnFhnrF ibnFpXnpesn5uZsYgUG47djPzTsYL20MPsQowMGoxMO7Q+xYtBBrYllxZe4hRgkOZiUR3irF 49FCvCmJlVWpRfnxRaU5qcWHGKU5WJTEec8bVEYJCaQnlqRmp6YWpBbBZJk4OKUaGLt9a83L t2Qs6vrD/Nw8+GnnZlfZ/q267hftF5ic+FJ8sdlO66q1XKfw1xeapXXiMswyHQdMX2rMOhc6 y5g94GOu+8WDCxNYNL//2iHO8sxiltnWiM8LyifV1R2s2ffhwh+Z2mlps46dO2z1Q1mYZ7Xb JDM3id/GGbypvb27TCfwyxv1XxX7rsRSnJFoqMVcVJwIAFVxb4w+AgAA X-CMS-MailID: 20181017134207eucas1p1b938eefe31fc47baaf538c9ebafc1a7e X-Msg-Generator: CA CMS-TYPE: 201P X-CMS-RootMailID: 20181017134207eucas1p1b938eefe31fc47baaf538c9ebafc1a7e References: <20181017134159.9656-1-m.szyprowski@samsung.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20181017_064219_397541_74C908A5 X-CRM114-Status: GOOD ( 14.58 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Bartlomiej Zolnierkiewicz , Marc Zyngier , Catalin Marinas , Daniel Lezcano , Will Deacon , Krzysztof Kozlowski , Inki Dae , Chanwoo Choi , Thomas Gleixner , Marek Szyprowski 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 To get ARM Architected Timers working on Samsung Exynos SoCs, one has to first configure and enable Exynos Multi-Core Timer, because they both share some common hardware blocks (global system counter). This patch adds a mode of cooperation with arch_timer driver, so kernel can use CP15 based timer interface via arch_timer driver, which is mandatory on ARM64. In such mode MCT driver only enables its clocks and starts global timer. Everything else will be handled by arch_timer driver. Signed-off-by: Marek Szyprowski Reviewed-by: Chanwoo Choi Tested-by: Chanwoo Choi --- drivers/clocksource/exynos_mct.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/drivers/clocksource/exynos_mct.c b/drivers/clocksource/exynos_mct.c index 02ad55db390b..1b19a4f03929 100644 --- a/drivers/clocksource/exynos_mct.c +++ b/drivers/clocksource/exynos_mct.c @@ -606,6 +606,15 @@ static int __init mct_init_dt(struct device_node *np, unsigned int int_type) if (ret) return ret; + if (IS_ENABLED(CONFIG_ARM64) && IS_ENABLED(CONFIG_ARM_ARCH_TIMER)) { + struct device_node *np = of_find_compatible_node(NULL, NULL, + "arm,armv8-timer"); + if (np) { + of_node_put(np); + exynos4_mct_frc_start(); + return 0; + } + } ret = exynos4_timer_interrupts(np, int_type); if (ret)