From patchwork Fri Feb 15 12:52:25 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marek Szyprowski X-Patchwork-Id: 10814919 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 C79A813A4 for ; Fri, 15 Feb 2019 12:53:27 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B46212F1CA for ; Fri, 15 Feb 2019 12:53:27 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A8BE32F1DE; Fri, 15 Feb 2019 12:53:27 +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=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED 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 40C2D2F1CA for ; Fri, 15 Feb 2019 12:53:27 +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=97BxDP5X8T7a4xao4GiakLYgdJi9MS8cw1YbmBg6iEs=; b=Kf34lw10DHoZJB6Eue+atGH2rF rSrwRUQwd0qvO6xHm/KcfpHnhZivbU4/v65BkVfHzivwFIJXqMypXfre3nZYKdJXTa4GDNQz+TnT6 BmS+If7gBSVD1A1LG1tjLsaf1Zev/E3uYS4Frq+5uYjtsvEjktVc+8CqxAsqOA5iGJ6hfMeNUJLYj WtKUEVTldpRioTESqaXjpMuAkEIhXkn4YMfvAxT8OtRsA6RSYBcPwrmgKApgR1t9loNSSn7YzKLMG SHd2QDYbfzNv00t7n/lz/jVT3iPhACgnIVdrb25iJVHgq65TSiXkqnYZ2ENtgfyM0Z9c83kC5L6zV pk9xjCEg==; 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 1guczc-0006mE-TU; Fri, 15 Feb 2019 12:53:25 +0000 Received: from mailout2.w1.samsung.com ([210.118.77.12]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gucyy-00062c-Kx for linux-arm-kernel@lists.infradead.org; Fri, 15 Feb 2019 12:52:48 +0000 Received: from eucas1p2.samsung.com (unknown [182.198.249.207]) by mailout2.w1.samsung.com (KnoxPortal) with ESMTP id 20190215125240euoutp02701be4b2fce5411ccec11c06c50e9465~DiqotMKkL0872408724euoutp02c; Fri, 15 Feb 2019 12:52:40 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout2.w1.samsung.com 20190215125240euoutp02701be4b2fce5411ccec11c06c50e9465~DiqotMKkL0872408724euoutp02c DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1550235160; bh=zJetpoNhW01GT4Xt0gk6SKTpHAA/tdY/kH9zyQ9f4Ok=; h=From:To:Cc:Subject:Date:In-reply-to:References:From; b=joe1NdsNzFePlq2+c75p3x1d365Id9YcxVSljweKfbeAUF+idVgjiCj70lIGnuxfN PKO9B8Ge9grY9EW5B2FOw0CuZH9Ds8Aod0bssXHXbo9YltTjpOoVgstnNBQv3tsRPr ihjjk0ZBnHI0IP2pNntB1+5mDeFfSayXFBHWSMwk= Received: from eusmges1new.samsung.com (unknown [203.254.199.242]) by eucas1p2.samsung.com (KnoxPortal) with ESMTP id 20190215125239eucas1p2acb240ec49a4f2e1116d642ec0efa336~DiqoV1EST0666006660eucas1p2q; Fri, 15 Feb 2019 12:52:39 +0000 (GMT) Received: from eucas1p2.samsung.com ( [182.198.249.207]) by eusmges1new.samsung.com (EUCPMTA) with SMTP id A5.35.04441.716B66C5; Fri, 15 Feb 2019 12:52:39 +0000 (GMT) Received: from eusmgms1.samsung.com (unknown [182.198.249.179]) by eucas1p2.samsung.com (KnoxPortal) with ESMTP id 20190215125238eucas1p28bd5cebc6d61da7b25e4cca396b6e35e~DiqngZpNi2424824248eucas1p2d; Fri, 15 Feb 2019 12:52:38 +0000 (GMT) X-AuditID: cbfec7f2-5c9ff70000001159-5b-5c66b617fc66 Received: from eusync4.samsung.com ( [203.254.199.214]) by eusmgms1.samsung.com (EUCPMTA) with SMTP id CE.10.04284.616B66C5; Fri, 15 Feb 2019 12:52:38 +0000 (GMT) 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 <0PMY00LS8X3MCB70@eusync4.samsung.com>; Fri, 15 Feb 2019 12:52:38 +0000 (GMT) From: Marek Szyprowski To: linux-samsung-soc@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH 1/5] clocksource: exynos_mct: Remove dead code Date: Fri, 15 Feb 2019 13:52:25 +0100 Message-id: <20190215125229.30180-2-m.szyprowski@samsung.com> X-Mailer: git-send-email 2.17.1 In-reply-to: <20190215125229.30180-1-m.szyprowski@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFlrGIsWRmVeSWpSXmKPExsWy7djP87ri29JiDBbfVrTYOGM9q8X1L89Z LeZ9lrU4f34Du8Wmx9dYLWac38dksfbIXXaLzZumM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O4lP69ewgNgsAqoS3Qd/MIHYvAK2Eofnv2eCWCcvsXrDAWYQmxOofs2aHjBbCKjm8qoH jBMYeRYwMqxiFEktLc5Nzy021CtOzC0uzUvXS87P3cQIDKZtx35u3sF4aWPwIUYBDkYlHt4V GakxQqyJZcWVuYcYJTiYlUR4OdekxQjxpiRWVqUW5ccXleakFh9ilOZgURLnPW9QGSUkkJ5Y kpqdmlqQWgSTZeLglGpg5N0v2fP1+JTbrBcvXuOrDHlmsnbazs9/aldpyu0/Oe2d62aGFpOD 4q3Hgtp+s7yNb3wTYt7Su4+na/F9+9N3jFZ5fFmxQMZHN2o528Z9OerKe79nZKip+kgLHLC/ bz6hSelTgmNeo6/Wmur0K++nrZL033NC9HefilbEX0mjz4b/z+V6hc76rMRSnJFoqMVcVJwI ACgRew8iAgAA X-CMS-MailID: 20190215125238eucas1p28bd5cebc6d61da7b25e4cca396b6e35e CMS-TYPE: 201P X-CMS-RootMailID: 20190215125238eucas1p28bd5cebc6d61da7b25e4cca396b6e35e References: <20190215125229.30180-1-m.szyprowski@samsung.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190215_045245_003833_D5B8722B X-CRM114-Status: GOOD ( 14.36 ) 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 , Daniel Lezcano , Krzysztof Kozlowski , 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 Exynos Multi-Core Timer driver is used only on device-tree based systems, so remove non-dt related code. In case of !CONFIG_OF the code is anyway equal because of_irq_count() has a stub returning 0. Device node pointer is always provided when driver has been probed from device tree. Signed-off-by: Marek Szyprowski Reviewed-by: Krzysztof Kozlowski Reviewed-by: Chanwoo Choi --- drivers/clocksource/exynos_mct.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/drivers/clocksource/exynos_mct.c b/drivers/clocksource/exynos_mct.c index 7a244b681876..ef18bbf8d20c 100644 --- a/drivers/clocksource/exynos_mct.c +++ b/drivers/clocksource/exynos_mct.c @@ -507,13 +507,12 @@ static int __init exynos4_timer_resources(struct device_node *np, void __iomem * int err, cpu; struct clk *mct_clk, *tick_clk; - tick_clk = np ? of_clk_get_by_name(np, "fin_pll") : - clk_get(NULL, "fin_pll"); + tick_clk = of_clk_get_by_name(np, "fin_pll"); if (IS_ERR(tick_clk)) panic("%s: unable to determine tick clock rate\n", __func__); clk_rate = clk_get_rate(tick_clk); - mct_clk = np ? of_clk_get_by_name(np, "mct") : clk_get(NULL, "mct"); + mct_clk = of_clk_get_by_name(np, "mct"); if (IS_ERR(mct_clk)) panic("%s: unable to retrieve mct clock instance\n", __func__); clk_prepare_enable(mct_clk); @@ -581,11 +580,7 @@ static int __init mct_init_dt(struct device_node *np, unsigned int int_type) * timer irqs are specified after the four global timer * irqs are specified. */ -#ifdef CONFIG_OF nr_irqs = of_irq_count(np); -#else - nr_irqs = 0; -#endif for (i = MCT_L0_IRQ; i < nr_irqs; i++) mct_irqs[i] = irq_of_parse_and_map(np, i); From patchwork Fri Feb 15 12:52:26 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marek Szyprowski X-Patchwork-Id: 10814915 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 5A38A13A4 for ; Fri, 15 Feb 2019 12:52:57 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 420672F1CA for ; Fri, 15 Feb 2019 12:52:57 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 31D432F1D0; Fri, 15 Feb 2019 12:52:57 +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=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED 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 7F1C82F1CA for ; Fri, 15 Feb 2019 12:52:56 +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=bYLYo3yh9xO+jsNYtbZ8S9X8KoaVpq6dFO3Xh4jwa/k=; b=O6+Qef+WrG9zxiM+cWDH1Q4EEE oQKuTxb/uof6DW16A9grJagnhY3D8eSVuRfyBLt8o8/euziKFZsWpDmg2BOWTEEt3as5yXX/jLsng 5Hbpfa0xq52ptGAkPXHqHvu95qwT4ghdCJBSIR97AsDhW2s3+WKZOhgqKQuQalwptghOU9BbRq4d+ dwfIHZPeL+l9/7SCi7rkErKDK27Ankxc7WuBQsGEA58GU87qTE9GTCvazThP2eEsRpvfpuXV6ARXo VOrQES7e3B0dF5xO/itPASy6A7uzxBuDpKN4FdYPCkCIp8Y2nA+t+VS3WUjbnxe43oG07w5tQnAT4 CrKQ/9Lg==; 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 1gucz8-0006BO-O1; Fri, 15 Feb 2019 12:52:54 +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 1gucyy-00062d-Kq for linux-arm-kernel@lists.infradead.org; Fri, 15 Feb 2019 12:52:46 +0000 Received: from eucas1p2.samsung.com (unknown [182.198.249.207]) by mailout1.w1.samsung.com (KnoxPortal) with ESMTP id 20190215125240euoutp013720a04c3f5daff0ec03d179b273c794~Diqo8eFJk0851708517euoutp01k; Fri, 15 Feb 2019 12:52:40 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout1.w1.samsung.com 20190215125240euoutp013720a04c3f5daff0ec03d179b273c794~Diqo8eFJk0851708517euoutp01k DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1550235160; bh=23R/J6B8yoCfPOWlxldxP5D7mXL7n7ZMaMuWjzEhIWQ=; h=From:To:Cc:Subject:Date:In-reply-to:References:From; b=qmLidFah37H9pXRirJ0UWqtHiSd5huLE2wLYV7GdkqG+Du0EtbGzjsIf/bYwokk0A LS6JpkM1LXyPbAwuZnjAdi3NDZWBDaRIDxDZTnKQ8yKjS56rqTl6lj/hZC0Y4iN4+4 tcDHTPuTj9PUi+p4z3vW8cBeWGK9uQnecp52vAEo= Received: from eusmges3new.samsung.com (unknown [203.254.199.245]) by eucas1p1.samsung.com (KnoxPortal) with ESMTP id 20190215125240eucas1p1ffa039b44585df0854f41d5c3a734292~DiqokI5zz2482424824eucas1p1J; Fri, 15 Feb 2019 12:52:40 +0000 (GMT) Received: from eucas1p1.samsung.com ( [182.198.249.206]) by eusmges3new.samsung.com (EUCPMTA) with SMTP id 7F.22.04806.716B66C5; Fri, 15 Feb 2019 12:52:39 +0000 (GMT) Received: from eusmgms2.samsung.com (unknown [182.198.249.180]) by eucas1p2.samsung.com (KnoxPortal) with ESMTP id 20190215125239eucas1p2da364c36dca63e0653362e1b4549027d~Diqn59tuF3016630166eucas1p2Y; Fri, 15 Feb 2019 12:52:39 +0000 (GMT) X-AuditID: cbfec7f5-367ff700000012c6-07-5c66b6174808 Received: from eusync4.samsung.com ( [203.254.199.214]) by eusmgms2.samsung.com (EUCPMTA) with SMTP id 43.C7.04128.716B66C5; Fri, 15 Feb 2019 12:52:39 +0000 (GMT) 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 <0PMY00LS8X3MCB70@eusync4.samsung.com>; Fri, 15 Feb 2019 12:52:39 +0000 (GMT) From: Marek Szyprowski To: linux-samsung-soc@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH v4 2/6] clocksource: exynos_mct: Fix error path in timer resources initialization Date: Fri, 15 Feb 2019 13:52:26 +0100 Message-id: <20190215125229.30180-3-m.szyprowski@samsung.com> X-Mailer: git-send-email 2.17.1 In-reply-to: <20190215125229.30180-1-m.szyprowski@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFlrKIsWRmVeSWpSXmKPExsWy7djPc7ri29JiDJ5O07fYOGM9q8X1L89Z LeZ9lrU4f34Du8Wmx9dYLWac38dksfbIXXaLzZumMjtweGxa1cnmcefaHjaPd+fOsXtsXlLv 0bdlFaPH501yAWxRXDYpqTmZZalF+nYJXBk/N1xkL/jKVXH3xC6mBsa5nF2MHBwSAiYSX/d5 dTFycQgJrGCUuPP2NhuE85lR4uWh0yxdjJxgRT1f7jFCJJYxSsxaPJEZwmlgklix6x07SBWb gKFE19suNhBbRMBbYvKZv+wgRcwCXUwStxceACsSFkiWuHXvLiuIzSKgKnHi6VYwm1fAVqKj /wMTxDp5idUbDjCD2JwCdhJr1vQwQ8SnsEn8W5cNcbeLxKtOTYiwjMTlyd0sILskBJo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v8q/b6LrwgG/6lSOdVbWiwWE3+tZlxtZ+klac s2OBUXKCXsJdeyUet9prG/X6Oh+zTeMp9LzSvOTX342fmQKef7LhOJwWdsZOiaU4I9FQi7mo OBEAElZZyyMCAAA= X-CMS-MailID: 20190215125239eucas1p2da364c36dca63e0653362e1b4549027d CMS-TYPE: 201P X-CMS-RootMailID: 20190215125239eucas1p2da364c36dca63e0653362e1b4549027d References: <20190215125229.30180-1-m.szyprowski@samsung.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190215_045244_998231_805CACEB X-CRM114-Status: GOOD ( 14.73 ) 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 , Daniel Lezcano , Krzysztof Kozlowski , 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 While freeing interrupt handlers in error path, don't assume that all requested interrupts are per-processor interrupts and properly release standard interrupts too. Reported-by: Krzysztof Kozlowski Fixes: 56a94f13919c ("clocksource: exynos_mct: Avoid blocking calls in the cpu hotplug notifier") Signed-off-by: Marek Szyprowski Reviewed-by: Krzysztof Kozlowski Reviewed-by: Chanwoo Choi --- drivers/clocksource/exynos_mct.c | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/drivers/clocksource/exynos_mct.c b/drivers/clocksource/exynos_mct.c index ef18bbf8d20c..49413900b24c 100644 --- a/drivers/clocksource/exynos_mct.c +++ b/drivers/clocksource/exynos_mct.c @@ -561,7 +561,19 @@ static int __init exynos4_timer_resources(struct device_node *np, void __iomem * return 0; out_irq: - free_percpu_irq(mct_irqs[MCT_L0_IRQ], &percpu_mct_tick); + if (mct_int_type == MCT_INT_PPI) { + free_percpu_irq(mct_irqs[MCT_L0_IRQ], &percpu_mct_tick); + } else { + for_each_possible_cpu(cpu) { + struct mct_clock_event_device *pcpu_mevt = + per_cpu_ptr(&percpu_mct_tick, cpu); + + if (pcpu_mevt->evt.irq != -1) { + free_irq(pcpu_mevt->evt.irq, pcpu_mevt); + pcpu_mevt->evt.irq = -1; + } + } + } return err; } From patchwork Fri Feb 15 12:52:27 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marek Szyprowski X-Patchwork-Id: 10814921 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 E060913B4 for ; Fri, 15 Feb 2019 12:53:37 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id CBDBB2F1CA for ; Fri, 15 Feb 2019 12:53:37 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id BEC6D2F1DE; Fri, 15 Feb 2019 12:53:37 +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=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED 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 663AD2F1CA for ; Fri, 15 Feb 2019 12:53:37 +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=34i3p5SKUbOUPoI26ALpMJTwSsojEYztHh9gGTy4zIY=; b=OagGjGnjYE3FqoZmfWtqXk923F pAYf98OZSr9vw/WS5fn/df/6PJ4B1SiluAWd6VlD6rYRUaBGCXznVL/Cbxni2atJcYShVeJwSetc5 QHDq026lchkUn0y4WMe135EJAvjwjB1tseGuyVwhhnH//qkP53tGKpbcNJvBsg9+3Oxd/Ru845+T7 TRk700Tw/+EajeO5gNCyckIk98rbMAjsnkeY0WitLG7gWi90DBtX0Qp2u2Q8YAe5RSOCryWF0wB6d v8u+1eHDtUF0VfwuF+Fii/BXQdnVjGeHKs2RQCO7hgKYoAEsf1X0YKCm+/KEfXXh2i+ota4x9TXZS noW/mgJg==; 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 1guczn-00071I-N2; Fri, 15 Feb 2019 12:53:35 +0000 Received: from mailout2.w1.samsung.com ([210.118.77.12]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gucyy-00062f-Kx for linux-arm-kernel@lists.infradead.org; Fri, 15 Feb 2019 12:52:48 +0000 Received: from eucas1p1.samsung.com (unknown [182.198.249.206]) by mailout2.w1.samsung.com (KnoxPortal) with ESMTP id 20190215125240euoutp02d1a5efa36947d21e2ce06a387213e33d~DiqpWbX8W0825108251euoutp022; Fri, 15 Feb 2019 12:52:40 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout2.w1.samsung.com 20190215125240euoutp02d1a5efa36947d21e2ce06a387213e33d~DiqpWbX8W0825108251euoutp022 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1550235160; bh=S3nzVWc9y2XxWLwNUeI00lq0MvjHBGxxHnEHRZdYmK4=; h=From:To:Cc:Subject:Date:In-reply-to:References:From; b=hqgVt0yGgPw+g4Q4+rFIjWKkkdgG+uDPwZSntVkn54fzU8/53FZ8Ah7h1WW8SG6iL MW2g1IZ2Vy8Kj2AdTd8y3qf7rdxVF+9DUHwLx9GtqqRwpbyGRnKQZOcWL1eaUuc6Vo p29gMOYd3h/l7j4FJmUcmq5i9Fi4b5n2JjnuShlc= Received: from eusmges2new.samsung.com (unknown [203.254.199.244]) by eucas1p1.samsung.com (KnoxPortal) with ESMTP id 20190215125240eucas1p1753129627de7da88667853b51eed2acd~Diqo-40Zo1088510885eucas1p11; Fri, 15 Feb 2019 12:52:40 +0000 (GMT) Received: from eucas1p2.samsung.com ( [182.198.249.207]) by eusmges2new.samsung.com (EUCPMTA) with SMTP id 53.AB.04294.816B66C5; Fri, 15 Feb 2019 12:52:40 +0000 (GMT) Received: from eusmgms2.samsung.com (unknown [182.198.249.180]) by eucas1p2.samsung.com (KnoxPortal) with ESMTP id 20190215125239eucas1p2d9167af42f2d04e462c56a070c3371c2~DiqoSl1Fg2398823988eucas1p2s; Fri, 15 Feb 2019 12:52:39 +0000 (GMT) X-AuditID: cbfec7f4-84fff700000010c6-de-5c66b61851c7 Received: from eusync4.samsung.com ( [203.254.199.214]) by eusmgms2.samsung.com (EUCPMTA) with SMTP id B4.C7.04128.716B66C5; Fri, 15 Feb 2019 12:52:39 +0000 (GMT) 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 <0PMY00LS8X3MCB70@eusync4.samsung.com>; Fri, 15 Feb 2019 12:52:39 +0000 (GMT) From: Marek Szyprowski To: linux-samsung-soc@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH 3/5] clocksource: exynos_mct: Increase priority over ARM arch timer Date: Fri, 15 Feb 2019 13:52:27 +0100 Message-id: <20190215125229.30180-4-m.szyprowski@samsung.com> X-Mailer: git-send-email 2.17.1 In-reply-to: <20190215125229.30180-1-m.szyprowski@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFlrGIsWRmVeSWpSXmKPExsWy7djP87oS29JiDM6u4rfYOGM9q8X1L89Z LeZ9lrU4f34Du8Wmx9dYLWac38dksfbIXXaLzZumMjtweGxa1cnmcefaHjaPd+fOsXtsXlLv 0bdlFaPH501yAWxRXDYpqTmZZalF+nYJXBnP9/WzFXzjr3jVcI6pgfEcbxcjJ4eEgInEkc4m FhBbSGAFo8SU72ZdjFxA9mdGie6ZXWwwRTen3WGGSCxjlDi95RSU08AksWLXO3aQKjYBQ4mu txAdIgLeEpPP/GUHKWIW6GKSuL3wAFiRsECoxJ2bm5lBbBYBVYknWxtYQWxeAVuJY3O2MEOs k5dYveEAmM0pYCexZk0PVHwCm8Tep5UQtotE17MVTBC2jMTlyd0sIMskBJoZJdpnzGKHcHoY JbbO2QH1hLXE4eMXwbYxC/BJTNo2HWgqB1CcV6KjTQiixEPi5ePzjBCvTWSUODttDcsERokF jAyrGMVTS4tz01OLjfJSy/WKE3OLS/PS9ZLzczcxAmPv9L/jX3Yw7vqTdIhRgINRiYd3RUZq jBBrYllxZe4hRgkOZiURXs41aTFCvCmJlVWpRfnxRaU5qcWHGKU5WJTEeasZHkQLCaQnlqRm p6YWpBbBZJk4OKUaGAsZJSWErtZNWfJmbaiEy29v/fPJ4hZvVzvt8gtelpcSnqTbbbqrO9kq KdPebBfnscMus6zyqgzC95ha+rF84HE4XFQ8ZeJG3rCLS87vOTona+/6hmULlwdZqH+7cGrR T13B722XmhTaJP5GHHb2kDhw7vaBuxnpn+Us1wfOu7DAOvPL+19iWUosxRmJhlrMRcWJAH+D w0u5AgAA X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFprALMWRmVeSWpSXmKPExsVy+t/xa7ri29JiDLZ90rfYOGM9q8X1L89Z LeZ9lrU4f34Du8Wmx9dYLWac38dksfbIXXaLzZumMjtweGxa1cnmcefaHjaPd+fOsXtsXlLv 0bdlFaPH501yAWxRXDYpqTmZZalF+nYJXBnP9/WzFXzjr3jVcI6pgfEcbxcjJ4eEgInEzWl3 mLsYuTiEBJYwSlw5No8Fwmlikpj1uYEJpIpNwFCi620XG4gtIuAtMfnMX3aQImaBHiaJ9qu/ 2UESwgKhEhvezwRrYBFQlXiytYEVxOYVsJU4NmcLM8Q6eYnVGw6A2ZwCdhJr1vSA2UJANZdX PWCcwMizgJFhFaNIamlxbnpusZFecWJucWleul5yfu4mRmA4bTv2c8sOxq53wYcYBTgYlXh4 V2SkxgixJpYVV+YeYpTgYFYS4eVckxYjxJuSWFmVWpQfX1Sak1p8iFGag0VJnPe8QWWUkEB6 YklqdmpqQWoRTJaJg1OqgZGV6TE3bzGD39k9KxNWzMkPXxaj6logn73MWXbphBlt16a9Zzmm 3nM6r22C+qmu+oNF0l+tKp69vKOfG+8U+fa0p88jQ63yD3OufVjyO070P8/eCVbJ6intfZm+ f+q03LWOppUvkDMU06gMPdprt8VCXy3uRnKE17yyy74KD99ue7C+e++nk0osxRmJhlrMRcWJ ACekzJMjAgAA X-CMS-MailID: 20190215125239eucas1p2d9167af42f2d04e462c56a070c3371c2 CMS-TYPE: 201P X-CMS-RootMailID: 20190215125239eucas1p2d9167af42f2d04e462c56a070c3371c2 References: <20190215125229.30180-1-m.szyprowski@samsung.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190215_045245_060277_AC3D48BB X-CRM114-Status: GOOD ( 15.06 ) 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 , Daniel Lezcano , Krzysztof Kozlowski , 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 Exynos Multi-Core Timer driver (exynos_mct) must be started before ARM Architected Timers (arch_timer), because they both share some common hardware blocks (global system counter) and turning on MCT is needed to get ARM Architected Timer working properly. Increase MCT timer rating and hotplug priority over ARM Archictected timer driver to achieve that. Signed-off-by: Marek Szyprowski Reviewed-by: Krzysztof Kozlowski --- drivers/clocksource/exynos_mct.c | 4 ++-- include/linux/cpuhotplug.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/clocksource/exynos_mct.c b/drivers/clocksource/exynos_mct.c index 49413900b24c..58090f57ada3 100644 --- a/drivers/clocksource/exynos_mct.c +++ b/drivers/clocksource/exynos_mct.c @@ -211,7 +211,7 @@ static void exynos4_frc_resume(struct clocksource *cs) static struct clocksource mct_frc = { .name = "mct-frc", - .rating = 400, + .rating = 450, .read = exynos4_frc_read, .mask = CLOCKSOURCE_MASK(32), .flags = CLOCK_SOURCE_IS_CONTINUOUS, @@ -465,7 +465,7 @@ static int exynos4_mct_starting_cpu(unsigned int cpu) evt->set_state_oneshot_stopped = set_state_shutdown; evt->tick_resume = set_state_shutdown; evt->features = CLOCK_EVT_FEAT_PERIODIC | CLOCK_EVT_FEAT_ONESHOT; - evt->rating = 450; + evt->rating = 500; exynos4_mct_write(TICK_BASE_CNT, mevt->base + MCT_L_TCNTB_OFFSET); diff --git a/include/linux/cpuhotplug.h b/include/linux/cpuhotplug.h index fd586d0301e7..bdd544f21102 100644 --- a/include/linux/cpuhotplug.h +++ b/include/linux/cpuhotplug.h @@ -115,10 +115,10 @@ enum cpuhp_state { CPUHP_AP_PERF_ARM_ACPI_STARTING, CPUHP_AP_PERF_ARM_STARTING, CPUHP_AP_ARM_L2X0_STARTING, + CPUHP_AP_EXYNOS4_MCT_TIMER_STARTING, CPUHP_AP_ARM_ARCH_TIMER_STARTING, CPUHP_AP_ARM_GLOBAL_TIMER_STARTING, CPUHP_AP_JCORE_TIMER_STARTING, - CPUHP_AP_EXYNOS4_MCT_TIMER_STARTING, CPUHP_AP_ARM_TWD_STARTING, CPUHP_AP_QCOM_TIMER_STARTING, CPUHP_AP_ARMADA_TIMER_STARTING, From patchwork Fri Feb 15 12:52:28 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marek Szyprowski X-Patchwork-Id: 10814923 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 832FF13A4 for ; Fri, 15 Feb 2019 12:53:53 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 704B82C740 for ; Fri, 15 Feb 2019 12:53:53 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 64A752DEE0; Fri, 15 Feb 2019 12:53:53 +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=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=unavailable 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 108172D657 for ; Fri, 15 Feb 2019 12:53:48 +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=HvmfM4A+PeSgHUY5YR6oJPVHwsUZFOwwwm8h7XdNxkY=; b=UJ30dLF1Wpxw2/S5i80XwN8gk8 UNbs5STQPl2u5p6/3O+p9s8YFkccEk9NeMzDBwJg9AAH8oY8EOgvOffF5u9/LFaD3jyDnmsYU/RLc j64V4GMKV0ucGWtwg427RKmlM/nm0fydCahQKro3OWHmUivvX4rFa/egSi/1SVCFRyx6tEspyabDH gvMUaqOrKw2cEKW1oKT6VbRnmqJ/wRxo5q8qxxN8bwh2SzmrAFw2d1Cnm/o2B5WkASy/6jOteh+N7 o/9/dT3BvMsfjsmTwIG5tc2p86LLszOoT4UXXXoMR3HtpGqZxdINL/1LfpkrxEM6m2Nqgkr6I/KmK JJS3eF6A==; 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 1guczy-0007Ev-0A; Fri, 15 Feb 2019 12:53:46 +0000 Received: from mailout2.w1.samsung.com ([210.118.77.12]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gucyy-00062g-Kw for linux-arm-kernel@lists.infradead.org; Fri, 15 Feb 2019 12:52:48 +0000 Received: from eucas1p2.samsung.com (unknown [182.198.249.207]) by mailout2.w1.samsung.com (KnoxPortal) with ESMTP id 20190215125241euoutp02189f6159585d643c1dcf8a77ef7a6ab6~Diqp2sCHz0820708207euoutp02-; Fri, 15 Feb 2019 12:52:41 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout2.w1.samsung.com 20190215125241euoutp02189f6159585d643c1dcf8a77ef7a6ab6~Diqp2sCHz0820708207euoutp02- DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1550235161; bh=fHx1/gTigQk7lKnUMAYd/WWCAnY+8EztucUv4WRMRU4=; h=From:To:Cc:Subject:Date:In-reply-to:References:From; b=NfrtUq8PgJWvinkvYmVZPYHgWENtZaAgF548PKCWv0XwiY+jI2mn0PSLFubeocZYc 1MXJxC/oK1ypOO7Ou7YNo/4PHmpFOQn/LBmCzRDyy6z82WbVzx8zMqwXCbDXGMlnhJ zwbep7a8Rr4PEB3u/7EH8lA5cD1KnCZMGmuktWlE= Received: from eusmges3new.samsung.com (unknown [203.254.199.245]) by eucas1p2.samsung.com (KnoxPortal) with ESMTP id 20190215125241eucas1p2170dc6909241b064d12511ab147908fd~DiqpbWarB2826728267eucas1p2a; Fri, 15 Feb 2019 12:52:41 +0000 (GMT) Received: from eucas1p2.samsung.com ( [182.198.249.207]) by eusmges3new.samsung.com (EUCPMTA) with SMTP id B1.32.04806.816B66C5; Fri, 15 Feb 2019 12:52:40 +0000 (GMT) Received: from eusmgms1.samsung.com (unknown [182.198.249.179]) by eucas1p2.samsung.com (KnoxPortal) with ESMTP id 20190215125240eucas1p277671ab6d0eb4d1102d3cddd6c61c255~Diqor4ZpB2649426494eucas1p2t; Fri, 15 Feb 2019 12:52:40 +0000 (GMT) X-AuditID: cbfec7f5-367ff700000012c6-0d-5c66b618b971 Received: from eusync4.samsung.com ( [203.254.199.214]) by eusmgms1.samsung.com (EUCPMTA) with SMTP id 30.20.04284.816B66C5; Fri, 15 Feb 2019 12:52:40 +0000 (GMT) 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 <0PMY00LS8X3MCB70@eusync4.samsung.com>; Fri, 15 Feb 2019 12:52:40 +0000 (GMT) From: Marek Szyprowski To: linux-samsung-soc@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH 4/5] ARM: dts: exynos: Add support ARM architected timers Date: Fri, 15 Feb 2019 13:52:28 +0100 Message-id: <20190215125229.30180-5-m.szyprowski@samsung.com> X-Mailer: git-send-email 2.17.1 In-reply-to: <20190215125229.30180-1-m.szyprowski@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFlrOIsWRmVeSWpSXmKPExsWy7djP87oS29JiDHav17XYOGM9q8X1L89Z LeZ9lrU4f34Du8Wmx9dYLWac38dksfbIXXaLzZumMjtweGxa1cnmcefaHjaPd+fOsXtsXlLv 0bdlFaPH501yAWxRXDYpqTmZZalF+nYJXBm3frUzFXSIVNx+t4G5gXGHQBcjB4eEgInE6x79 LkYuDiGBFYwS07bNZIJwPjNKvPwwh7WLkROs6PbyQ4wQiWWMEv/eLIeqamCSuH5/PVgVm4Ch RNfbLjYQW0TAW2Lymb/sIEXMAl1MErcXHmAHSQgLeErMvtEGVsQioCrx7cg8FhCbV8BWYuPH y1Dr5CVWbzjADGJzCthJrFnTwwwySEJgBpvE418HGCGKXCQm/30O1SAj0dlxkAmiqJlRon3G LHYIp4dRYuucHWwQVdYSh49fBOtgFuCTmLRtOjMkCHglOtqEIEo8JO61f2WF+G0io0Tf17PM ExglFjAyrGIUTy0tzk1PLTbOSy3XK07MLS7NS9dLzs/dxAiMvtP/jn/dwbjvT9IhRgEORiUe 3hUZqTFCrIllxZW5hxglOJiVRHg516TFCPGmJFZWpRblxxeV5qQWH2KU5mBREuetZngQLSSQ nliSmp2aWpBaBJNl4uCUamC0eKf4d+H7ifzWKyfIJL2tXJdi/edWu+fW5mOHlnzg2eqtcIZl yyLHmBlPWrcenvff59nioLi1FWa/cqe2fwhXmbrJIMmbt49D6vw+g6xzR9OOPLlzau4aLqkz f9fvTb5y7+jNix77fXMDNKLWVGwo/FLu3rVW4Ou0Y5J99yLO/AxxFJh1j8vXQImlOCPRUIu5 qDgRAI0GTz66AgAA X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFupnluLIzCtJLcpLzFFi42I5/e/4NV2JbWkxBosP81hsnLGe1eL6l+es FvM+y1qcP7+B3WLT42usFjPO72OyWHvkLrvF5k1TmR04PDat6mTzuHNtD5vHu3Pn2D02L6n3 6NuyitHj8ya5ALYoLpuU1JzMstQifbsEroxbv9qZCjpEKm6/28DcwLhDoIuRk0NCwETi9vJD jF2MXBxCAksYJabf38AKkhASaGKS6JglAWKzCRhKdL3tYgOxRQS8JSaf+csO0sAs0MMk0X71 NztIQljAU2L2jTawIhYBVYlvR+axgNi8ArYSGz9eZoXYJi+xesMBZhCbU8BOYs2aHmaIZbYS l1c9YJzAyLOAkWEVo0hqaXFuem6xoV5xYm5xaV66XnJ+7iZGYDBtO/Zz8w7GSxuDDzEKcDAq 8fCuyEiNEWJNLCuuzD3EKMHBrCTCy7kmLUaINyWxsiq1KD++qDQntfgQozQHi5I473mDyigh gfTEktTs1NSC1CKYLBMHp1QDY2f2uplpMhfcCh2XXxC/EHeJo/BefUChbMnh/bcCPXRK3X+c bDI9sVXzcMHL8h/aDlInDs/hOXE39lTm0n+rhS//OM59d/nR8sTXNbnT3+0z1f2aGz5j+wX9 6HfChhoJlno7FBf2yh1iS1lkcPnwlD+P91x8MfHnuo0ht5POe1zy6JR0fji1/LUSS3FGoqEW c1FxIgCLZcC+IgIAAA== X-CMS-MailID: 20190215125240eucas1p277671ab6d0eb4d1102d3cddd6c61c255 CMS-TYPE: 201P X-CMS-RootMailID: 20190215125240eucas1p277671ab6d0eb4d1102d3cddd6c61c255 References: <20190215125229.30180-1-m.szyprowski@samsung.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190215_045245_065376_5DD30996 X-CRM114-Status: GOOD ( 15.64 ) 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 , Daniel Lezcano , Krzysztof Kozlowski , 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 All CortexA7/A15 based Exynos SoCs have ARM architected timers, so enable support for them directly in the base dtsi for Exynos3250, Exynos5250 and Exynos54xx SoCs. None of the known firmware properly configures arch timer registers, so mark them as not-fw-configured and set frequency to 24MHz, which is the only configuration supported by the remaining drivers (clocks) so far. Signed-off-by: Marek Szyprowski --- arch/arm/boot/dts/exynos3250.dtsi | 10 ++++++++++ arch/arm/boot/dts/exynos5250.dtsi | 1 + arch/arm/boot/dts/exynos54xx.dtsi | 10 ++++++++++ 3 files changed, 21 insertions(+) diff --git a/arch/arm/boot/dts/exynos3250.dtsi b/arch/arm/boot/dts/exynos3250.dtsi index 608d17454179..3966e7960964 100644 --- a/arch/arm/boot/dts/exynos3250.dtsi +++ b/arch/arm/boot/dts/exynos3250.dtsi @@ -134,6 +134,16 @@ }; }; + timer { + compatible = "arm,armv7-timer"; + interrupts = , + , + , + ; + clock-frequency = <24000000>; + arm,cpu-registers-not-fw-configured; + }; + sysram@2020000 { compatible = "mmio-sram"; reg = <0x02020000 0x40000>; diff --git a/arch/arm/boot/dts/exynos5250.dtsi b/arch/arm/boot/dts/exynos5250.dtsi index 80986b97dfe5..95af4050f69d 100644 --- a/arch/arm/boot/dts/exynos5250.dtsi +++ b/arch/arm/boot/dts/exynos5250.dtsi @@ -239,6 +239,7 @@ * so we need the value from DT. */ clock-frequency = <24000000>; + arm,cpu-registers-not-fw-configured; }; mct@101c0000 { diff --git a/arch/arm/boot/dts/exynos54xx.dtsi b/arch/arm/boot/dts/exynos54xx.dtsi index de26e5ee0d2d..45e06717ee51 100644 --- a/arch/arm/boot/dts/exynos54xx.dtsi +++ b/arch/arm/boot/dts/exynos54xx.dtsi @@ -46,6 +46,16 @@ status = "disabled"; }; + timer { + compatible = "arm,armv7-timer"; + interrupts = , + , + , + ; + arm,cpu-registers-not-fw-configured; + clock-frequency = <24000000>; + }; + sysram@2020000 { compatible = "mmio-sram"; reg = <0x02020000 0x54000>; From patchwork Fri Feb 15 12:52:29 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marek Szyprowski X-Patchwork-Id: 10814917 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 ECCC013B4 for ; Fri, 15 Feb 2019 12:53:21 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D911A2F1CA for ; Fri, 15 Feb 2019 12:53:21 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id CD5792F1DE; Fri, 15 Feb 2019 12:53:21 +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=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED 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 789242F1CA for ; Fri, 15 Feb 2019 12:53:21 +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=QoMFYnQ1rGmHiwETkTHD+rw3XXd8HX/c4HRK2sFetPY=; b=e1fbh0eRHrnC/bEafX9zD+bmxG Akj9fzU/yqeUZ+XwKY5Gys5WT6MLAQsHg/OnZV9DxSZfz78i0IHu1oVG/lYRhKWaO1Oxr98Qex3UQ J1gwOoQiqY4A7qcpMNr+1+i9ZfMer/j2U7D2FsmfC3tAm3Zf8FBxQqouvsKYLruBud3P7KHWg2sbi e/y8CCPQ5cL5nEJ185w02Hd4HaDQOoZDKc5iq2Xe+TeH79QcS3+IwoCRGNMIUFZMEeRv5Y8Gd4B3e Nr0N+j1s+v8keGWhXIU9D/YVVPAjljdqg47erL59dNQtkaztW2/RgfsHN9a1hj1G4HvWIN7e5NLBg wLPFqEXw==; 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 1guczU-0006ci-1b; Fri, 15 Feb 2019 12:53:16 +0000 Received: from mailout2.w1.samsung.com ([210.118.77.12]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gucyy-00062h-Kx for linux-arm-kernel@lists.infradead.org; Fri, 15 Feb 2019 12:52:48 +0000 Received: from eucas1p2.samsung.com (unknown [182.198.249.207]) by mailout2.w1.samsung.com (KnoxPortal) with ESMTP id 20190215125241euoutp024ff235d6df1dd4a5ef872fed7558c991~DiqqTOA0Z0874008740euoutp02a; Fri, 15 Feb 2019 12:52:41 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout2.w1.samsung.com 20190215125241euoutp024ff235d6df1dd4a5ef872fed7558c991~DiqqTOA0Z0874008740euoutp02a DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1550235162; bh=vhh9h8Ye7R8ou4zjA7my3tgHS2E/fWcAEoavnXMxYc4=; h=From:To:Cc:Subject:Date:In-reply-to:References:From; b=QB3bAesfZtUgvBhfFSOCNLh6PU916l7hKL3q+GkWi4AGOWLFMfIaDXnpxz8sW9jKz X9OEaSLodYZv9QAu1JIlRVPJccX1dEcaiEcazroUbaUw6XX6d5kUV2HxT5/YwyKKjZ f10nCaohz/Xcky9ny9xNiI/PrFEMxCRR6sHBY50Y= Received: from eusmges1new.samsung.com (unknown [203.254.199.242]) by eucas1p2.samsung.com (KnoxPortal) with ESMTP id 20190215125241eucas1p20262ae6b89fb53b0e228c0ab383a8d5c~Diqpzv4C10629506295eucas1p2w; Fri, 15 Feb 2019 12:52:41 +0000 (GMT) Received: from eucas1p2.samsung.com ( [182.198.249.207]) by eusmges1new.samsung.com (EUCPMTA) with SMTP id F6.35.04441.916B66C5; Fri, 15 Feb 2019 12:52:41 +0000 (GMT) Received: from eusmgms2.samsung.com (unknown [182.198.249.180]) by eucas1p2.samsung.com (KnoxPortal) with ESMTP id 20190215125240eucas1p219154e5bd27bd09dac0b8419c3e4e259~DiqpISWf-0683906839eucas1p2i; Fri, 15 Feb 2019 12:52:40 +0000 (GMT) X-AuditID: cbfec7f2-a1ae89c000001159-63-5c66b61990d7 Received: from eusync4.samsung.com ( [203.254.199.214]) by eusmgms2.samsung.com (EUCPMTA) with SMTP id D5.C7.04128.816B66C5; Fri, 15 Feb 2019 12:52:40 +0000 (GMT) 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 <0PMY00LS8X3MCB70@eusync4.samsung.com>; Fri, 15 Feb 2019 12:52:40 +0000 (GMT) From: Marek Szyprowski To: linux-samsung-soc@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH 5/5] ARM: exynos: Enable support for ARM architected timers Date: Fri, 15 Feb 2019 13:52:29 +0100 Message-id: <20190215125229.30180-6-m.szyprowski@samsung.com> X-Mailer: git-send-email 2.17.1 In-reply-to: <20190215125229.30180-1-m.szyprowski@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFlrKIsWRmVeSWpSXmKPExsWy7djP87qS29JiDHr+cFhsnLG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p0ve1iA7FFBLwlJp/5yw7SwCzQwyTRfvU3 O0hCGCix/+JzoCIODhYBVYnpkyNBwrwCthKzLiyGWiYvsXrDAWYQm1PATmLNmh5miF22EpdX PWCcwMizgJFhFaNIamlxbnpusZFecWJucWleul5yfu4mRmAobTv2c8sOxq53wYcYBTgYlXh4 V2SkxgixJpYVV+YeYpTgYFYS4eVckxYjxJuSWFmVWpQfX1Sak1p8iFGag0VJnPe8QWWUkEB6 YklqdmpqQWoRTJaJg1OqgbFV4I201paajZIyH/3etz9fdiN1Qfk8HY3lc51fqTsFPDriWFxi rlhw9tmPv/eqFbOXs3wI49UrXzxttgurS+fiJzuYNV60lBifCF+yU8RBeetnk+SjQUatdzi1 eCReOU97MN1vi9+b5LxOhWMF2lxqzEzHjFrZz30pnXuXY9KDeTWmcRJapkosxRmJhlrMRcWJ ALLsAyEhAgAA X-CMS-MailID: 20190215125240eucas1p219154e5bd27bd09dac0b8419c3e4e259 CMS-TYPE: 201P X-CMS-RootMailID: 20190215125240eucas1p219154e5bd27bd09dac0b8419c3e4e259 References: <20190215125229.30180-1-m.szyprowski@samsung.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190215_045245_011384_DE593B7B X-CRM114-Status: GOOD ( 13.11 ) 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 , Daniel Lezcano , Krzysztof Kozlowski , 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 ARM architected timer can be used together with Exynos MultiCore Timer driver, so enable support for it. Support for ARM architected timers is essential for enabling proper KVM support. Signed-off-by: Marek Szyprowski --- arch/arm/mach-exynos/Kconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm/mach-exynos/Kconfig b/arch/arm/mach-exynos/Kconfig index b40963cf91c7..b5ec21c027a1 100644 --- a/arch/arm/mach-exynos/Kconfig +++ b/arch/arm/mach-exynos/Kconfig @@ -18,6 +18,7 @@ menuconfig ARCH_EXYNOS select EXYNOS_SROM select EXYNOS_PM_DOMAINS if PM_GENERIC_DOMAINS select GPIOLIB + select HAVE_ARM_ARCH_TIMER select HAVE_ARM_SCU if SMP select HAVE_S3C2410_I2C if I2C select HAVE_S3C2410_WATCHDOG if WATCHDOG