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: 158515 Delivered-To: patch@linaro.org Received: by 2002:a02:48:0:0:0:0:0 with SMTP id 69csp669047jaa; Fri, 15 Feb 2019 04:52:42 -0800 (PST) X-Google-Smtp-Source: AHgI3IYS2LCcg0DSv6MrExwB3RJSDe1JJsNyw1vQ802xa+x5PdiM7CMetduZM5oHtFplsdANut9y X-Received: by 2002:a62:e017:: with SMTP id f23mr914300pfh.152.1550235162602; Fri, 15 Feb 2019 04:52:42 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1550235162; cv=none; d=google.com; s=arc-20160816; b=PtoM+93ndlR35srZnB0gEfy9v5pbkV0ALpm0GcmR7DMhZwt28CvaPpocrdM4oxZy0j dh0WhTD4X85GZLdF6ZMfJ8NGU8hxOVJcLlIUE3cNS5/KPmH3RcjnWGtY6Pxwi+Eu8GCF 89pb5Go9EWJyTYQ5amu8gdjUaXSoou30b4iBA6C/1ibQOnU4SQjGO8NoqKZteAtlr6Px k3H2Vt/TCTn9xoo/L8B6bjmXJJmzY5z+J0PzKE/B5U/zrvplgbkv8zZC/BDytMw7xr03 Go5CPjH40t8U+15GeL+MVYYtrMsapG+9+eJochlCUcDtYOC8QcHStVZonkuKYT5reQUz 649w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:cms-type:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature:dkim-filter; bh=zJetpoNhW01GT4Xt0gk6SKTpHAA/tdY/kH9zyQ9f4Ok=; b=josub82eo0Y6bRCHA0Urz0sinO+6DIdTpqB2UH01pNQwQ/zkt72optjc3w253kSgFK PWdVw4+okdaH1ZaFDeWUT58XD0Cw+eF6AMsTSDfrjWbIggXJcEpgpOkCA8vC6YEfzEQK yJmNleKWpXckjnOu6FLaWPmWLhKFFAPw6uFIxSG2A6C4d4v99wDcGLIUC7jOLZgOcvYa xhrGSy++QuIp0lrmTA3XolI70xYMpMi/i2nft48Xbv44/Qd/pIzfV8e6xfUzaVFWIEh8 yZtSEuW+LelZuyYgSYe0lUZ0D4XEaBA3Y441MAgs1qXZ9mJQhFhbsW5b7RQqlEW2gBGr 9PpQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=joe1NdsN; spf=pass (google.com: best guess record for domain of linux-samsung-soc-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-samsung-soc-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=samsung.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id i16si5357287pfi.192.2019.02.15.04.52.42; Fri, 15 Feb 2019 04:52:42 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-samsung-soc-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=joe1NdsN; spf=pass (google.com: best guess record for domain of linux-samsung-soc-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-samsung-soc-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=samsung.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2394727AbfBOMwm (ORCPT + 3 others); Fri, 15 Feb 2019 07:52:42 -0500 Received: from mailout2.w1.samsung.com ([210.118.77.12]:48459 "EHLO mailout2.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387887AbfBOMwl (ORCPT ); Fri, 15 Feb 2019 07:52:41 -0500 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 Cc: Marek Szyprowski , Thomas Gleixner , Daniel Lezcano , Krzysztof Kozlowski , Chanwoo Choi , Bartlomiej Zolnierkiewicz 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 LeZ9lrU4f34Du8Wmx9dYLWac38dksfbIXXaLzZumMjtweGxa1cnmcefaHjaPd+fOsXtsXlLv 0bdlFaPH501yAWxRXDYpqTmZZalF+nYJXBm7VtkWTOar2NPYwNbA+JC7i5GTQ0LARGLPk9lM XYxcHEICKxgl7rd/ZYNwPjNK/L89jwWmasX9DewQiWWMEi/3bGGEcBqYJPbPfcYEUsUmYCjR 9baLDcQWEfCWmHzmL1gHs0AXk8TthQfYQRLCAnYSn9avARvLIqAq0X3wB1gzr4CtxOH575kg 1slLrN5wgBnE5gSqX7OmhxlkkITABDaJlW0HgTZwADkuEmu3ukLUy0h0dhxkgqhpZpRonzGL HcLpYZTYOmcHG0SVtcTh4xdZQWxmAT6JSdumM0MM4pXoaBOCKPGQOPrsMDPEaxMZJSYtfsg8 gVFiASPDKkbx1NLi3PTUYsO81HK94sTc4tK8dL3k/NxNjMDYO/3v+KcdjF8vJR1iFOBgVOLh XZGRGiPEmlhWXJl7iFGCg1lJhJdzTVqMEG9KYmVValF+fFFpTmrxIUZpDhYlcd5qhgfRQgLp iSWp2ampBalFMFkmDk6pBkbtRUs8PoTpFtWxlDRG3bssItDk7i6wp4K/5OyTvoC5/p1t6ZxL ggO3VCx9IW0yyV+u1Xd5xlMbBtWkHVPfX2KetsH42JKpd9kij5rV1//tWn0qqGjqiWD7N/t5 7x3WZ7PQ83NQ7RDUlImvkb51L/LeFYZzyZGc3l/WCdsvM7OsYLJLvZPSrcRSnJFoqMVcVJwI AMbKBCO5AgAA X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFupnluLIzCtJLcpLzFFi42I5/e/4NV2xbWkxBjMfWVpsnLGe1eL6l+es FvM+y1qcP7+B3WLT42usFjPO72OyWHvkLrvF5k1TmR04PDat6mTzuHNtD5vHu3Pn2D02L6n3 6NuyitHj8ya5ALYoLpuU1JzMstQifbsEroxdq2wLJvNV7GlsYGtgfMjdxcjJISFgIrHi/gb2 LkYuDiGBJYwSM089YYFwmpgkNv69wgpSxSZgKNH1tosNxBYR8JaYfOYvWAezQA+TRPvV3+wg CWEBO4lP69ewgNgsAqoS3Qd/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> Sender: linux-samsung-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@vger.kernel.org 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(-) -- 2.17.1 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: 158517 Delivered-To: patch@linaro.org Received: by 2002:a02:48:0:0:0:0:0 with SMTP id 69csp669056jaa; Fri, 15 Feb 2019 04:52:43 -0800 (PST) X-Google-Smtp-Source: AHgI3IZ9wLN0LzSZ1WZqJc6VbBY9gxJEHx87PCpmoS4ir9LszYLU7NjNETzBPagI1dFE/eL4ZOO6 X-Received: by 2002:a17:902:b118:: with SMTP id q24mr10155186plr.209.1550235163173; Fri, 15 Feb 2019 04:52:43 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1550235163; cv=none; d=google.com; s=arc-20160816; b=h5WIKuDKO3RKBGGVqpekwxj6lb20TXvWfBfIw1JMzgEecvjqe+baS//OfkOR2k2WgK 1mGTgtCr+Za+VNqwrFzipTDFYyQLrmLfshfZ0hLsbKk5a4qjvu6u3CvacZ0/WsvqKueG cpqF8ndB87Pe65AtBVnKdDWv5eWSXCO+rmbVRhsGXsoKPtgf+OoCe3G+LJFQbpFmKESm RvxD0N7lVvU48X5Up2fmzV/OdvOU/LZfFHNS2Yas9cFrOghdShmnK6gX8kdVzDnLznqh lhHcluapNoyDRfjFpHM7cxNaortww8Wng9cTtDU67Dy5yS2I2oTTT4i8aFN/JfnugbUM cUVA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:cms-type:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature:dkim-filter; bh=23R/J6B8yoCfPOWlxldxP5D7mXL7n7ZMaMuWjzEhIWQ=; b=c3MuEz+bA0YX9GZciqM1HWIOHmlvRPQrSseR6yN+VdZgFDdVU2G7ao2WebHijEGpUQ zTJw7CI//vOiX1/w1NPOoiQmeHuQPTgEHfVbjMCeTfLKQuHGmOgTvqN9BVNoE/Ex68h7 x/NfrQXDu6nvM0gia6G1bhTfxD6yeTRSVQCtSosh8+naT7BMzZyNTsJEfMuAl9koZZ/B GCDUosyxUEc8JEmxRwDEyAMLAMlyG+6gWjRv1HbvAKSQQXJK9PvOlEhZQwCOELa3KZOR MiBMtKF1vSgL7KjQdXWaLCUrzfJ1Pqkp/a/QoxeNDjMGb+lGnXGYx2mcAoje7a1cxQ/6 l1mA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=qmLidFah; spf=pass (google.com: best guess record for domain of linux-samsung-soc-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-samsung-soc-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=samsung.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id i16si5357287pfi.192.2019.02.15.04.52.42; Fri, 15 Feb 2019 04:52:43 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-samsung-soc-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=qmLidFah; spf=pass (google.com: best guess record for domain of linux-samsung-soc-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-samsung-soc-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=samsung.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2394732AbfBOMwm (ORCPT + 3 others); Fri, 15 Feb 2019 07:52:42 -0500 Received: from mailout1.w1.samsung.com ([210.118.77.11]:44514 "EHLO mailout1.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2394691AbfBOMwm (ORCPT ); Fri, 15 Feb 2019 07:52:42 -0500 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 Cc: Marek Szyprowski , Thomas Gleixner , Daniel Lezcano , Krzysztof Kozlowski , Chanwoo Choi , Bartlomiej Zolnierkiewicz 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 /wMTxDp5idUbDjCD2JwCdhJr1vQwQ8SnsEn8W5cNcbeLxKtOTYiwjMTlyd0sILskBJoZJdpn zGKHcHoYJbbO2cEGUWUtcfj4RbBlzAJ8EpO2TWeGGMQr0dEmBFHiIbHu1jGo/ycySmy51s0+ gVFiASPDKkbx1NLi3PTUYuO81HK94sTc4tK8dL3k/NxNjMDIO/3v+NcdjPv+JB1iFOBgVOLh XZGRGiPEmlhWXJl7iFGCg1lJhJdzTVqMEG9KYmVValF+fFFpTmrxIUZpDhYlcd5qhgfRQgLp iSWp2ampBalFMFkmDk6pBsZE3562a/4xnzfe3P55g811hosvRZOeHThpmKhUu/OIZRy/2C8W 3j3bb5zpvdh0k9NaeNXJsz4TNCWbbj+JPFH8fnoGR/G7p3zTU7pF7kROP+AvFnN/6on9mk/Z Plm84l0zMU6/hOfKzq3s72/P8mFolf4mylCm82++y/I23iSFv75Zr9gZm8OVWIozEg21mIuK EwGaol/uuAIAAA== X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFprALMWRmVeSWpSXmKPExsVy+t/xa7ri29JiDF7ME7PYOGM9q8X1L89Z LeZ9lrU4f34Du8Wmx9dYLWac38dksfbIXXaLzZumMjtweGxa1cnmcefaHjaPd+fOsXtsXlLv 0bdlFaPH501yAWxRXDYpqTmZZalF+nYJXBk/N1xkL/jKVXH3xC6mBsa5nF2MnBwSAiYSPV/u MXYxcnEICSxhlNjw/TIzhNPEJDHrcwMTSBWbgKFE19suNhBbRMBbYvKZv+wgRcwCPUwS7Vd/ s4MkhAWSJW7du8sKYrMIqEqceLoVzOYVsJXo6P/ABLFOXmL1hgPMIDangJ3EmjU9YLYQUM3l VQ8YJzDyLGBkWMUoklpanJueW2ykV5yYW1yal66XnJ+7iREYTtuO/dyyg7HrXfAhRgEORiUe 3hUZqTFCrIllxZW5hxglOJiVRHg516TFCPGmJFZWpRblxxeV5qQWH2KU5mBREuc9b1AZJSSQ nliSmp2aWpBaBJNl4uCUamCcOf3S4u8nNqvNl7l75TDrH9/HyVv+febd8uGDRZURk9/UqYo/ Gp5uliiP6tv9/wv/9HDpGFOGJ5KqkrfSPQTv8q/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> Sender: linux-samsung-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@vger.kernel.org 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(-) -- 2.17.1 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: 158518 Delivered-To: patch@linaro.org Received: by 2002:a02:48:0:0:0:0:0 with SMTP id 69csp669062jaa; Fri, 15 Feb 2019 04:52:43 -0800 (PST) X-Google-Smtp-Source: AHgI3IZM5V/3D/l8JHKPBaqM3y87xSjECwcKAaQBYBg0rLUqYuwbby6YiKxUjUJLaMQUAEwcY3+n X-Received: by 2002:a63:6881:: with SMTP id d123mr5218429pgc.10.1550235163443; Fri, 15 Feb 2019 04:52:43 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1550235163; cv=none; d=google.com; s=arc-20160816; b=bJH9w2RciAqj1EHH8FG8mqNtVD5lsvefnsKu9AZYLgLLm2gKOuaY/zvAQdP4sXUZFM VOnI3qgf4b0yt6uEF3BNZSy1IxlgOYM7yIDWDB4QDSncfxGQzhIGB8jCefMhiqD+zJJN j35b9t1Nks8WEvzrkD4B/RcOZGl7VvYAcduCHaKoZs0cJQR1PRKfByeqnI8et/0r6Ehf HPkM4YXfll63glLelNhiGy53eWxSzicSRZlIjeOB5UaZIvvWt2uvNGTagXgK36rltisV Yoo0kVzq5wFMapdZyROdJ6ImkyG6TrVUtQBiTKiS58yc4e2GZlPmeqhFON/2PEghj6Fq mHAQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:cms-type:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature:dkim-filter; bh=S3nzVWc9y2XxWLwNUeI00lq0MvjHBGxxHnEHRZdYmK4=; b=LsZpeQ6ArDSWmIceb6gWm2r8qCCkKOHrH8Dj+cEB77NH/F1Vn98UZ431RQJ1ZT61i5 lmZRFpjiuaj7zA/jnFDQXI+HKvtSwgPh4pin6TuhtmlPYgCb4alhl0k6jlKtGVyxmsLF M2eqTZKxbUs7ssvqj5cAFyGQwqO8nK5Jl3ghwFfSBSzW8XW+rREibnPoWnSFQa5Ks99x KSRi7jFLa75oY6GgRn7EPAI8+icNRqpCOQ7d7uo4h0rISIAWDHf6ix6xYUGeA2AXodeC zzkA8wH+DEcZ93MCD2pafyRD2kDujiFVIEtTeFQmB/tO9KUvxZXuVlzBD01wfHeYq4HD X1HQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=hqgVt0yG; spf=pass (google.com: best guess record for domain of linux-samsung-soc-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-samsung-soc-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=samsung.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id i16si5357287pfi.192.2019.02.15.04.52.43; Fri, 15 Feb 2019 04:52:43 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-samsung-soc-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=hqgVt0yG; spf=pass (google.com: best guess record for domain of linux-samsung-soc-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-samsung-soc-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=samsung.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2394733AbfBOMwm (ORCPT + 3 others); Fri, 15 Feb 2019 07:52:42 -0500 Received: from mailout2.w1.samsung.com ([210.118.77.12]:48466 "EHLO mailout2.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2394724AbfBOMwm (ORCPT ); Fri, 15 Feb 2019 07:52:42 -0500 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 Cc: Marek Szyprowski , Thomas Gleixner , Daniel Lezcano , Krzysztof Kozlowski , Chanwoo Choi , Bartlomiej Zolnierkiewicz 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> Sender: linux-samsung-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@vger.kernel.org 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 --- drivers/clocksource/exynos_mct.c | 4 ++-- include/linux/cpuhotplug.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) -- 2.17.1 Reviewed-by: Krzysztof Kozlowski 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: 158519 Delivered-To: patch@linaro.org Received: by 2002:a02:48:0:0:0:0:0 with SMTP id 69csp669067jaa; Fri, 15 Feb 2019 04:52:43 -0800 (PST) X-Google-Smtp-Source: AHgI3Ia5K1FSxqIwFOi6jWioOdKKK40YCB+piZXt5cgoX42BiLqAOnKx09uDQb4Jd9Tv5amdHN4u X-Received: by 2002:a17:902:a612:: with SMTP id u18mr9903646plq.145.1550235163713; Fri, 15 Feb 2019 04:52:43 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1550235163; cv=none; d=google.com; s=arc-20160816; b=LHRJvJ/HCUOoebIqliyPntLJgXPff2v0cd7nbV/zBhVD6PqNUJAjqT/0yzacozC+oS m4Phdw+v9FHyEba4TAPJoHeuNMl4NDV64QQwknCoJTvNlyd4IjSQCyX9pUnEQa0+lqoS HqZ9YZZZVlThIcb4i+7mS7a0wOZZTP7Yh6zdsyPZrC7GT2DDrTLtLXqh/0/x1lol4fQx mYupJm53/srYxg0SUk+BaPq/me5JT9Lk54wsZOhosWYWks14eyqQfC9aa797RNDmmR+n OdioHEkaiEi1j6JIRqgkpjL/09Y3pWEpClxyjGjziATBd8x9YXvqDWgYyq7vdXOAua4T RO7Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:cms-type:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature:dkim-filter; bh=fHx1/gTigQk7lKnUMAYd/WWCAnY+8EztucUv4WRMRU4=; b=m2dnfSX039KkgEowBf7wzmOtcpAPIizybJ+7WVrGkJMsNpy7PTarI7Y7MtGS7rosoG WD78Co16TgWQ2YLnRmMppzJ6T6I1MPk2GE00roHENjMER3JPLpIVwDlXC027MkgtdmfB f5gJzUyAzrOkyrEpVcG5i/6Ny6WN0zNNBAAnyfvv5vvNMYA/P5HmqdqjYDmRqxTn8u9D WP84AUeHFUaB0P2ejaufdamtKRhgQ6pSsWAbyvS8sYhIQ3AsOJiBPzf7iTtWGyE+RELJ uz6WDRBoWQyg0ZIPXJjsQObkLMbgN1AaJwxqunHJ/+4OjGVtTRVPWKdnJewz0rBxSt5B 8qtg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=NfrtUq8P; spf=pass (google.com: best guess record for domain of linux-samsung-soc-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-samsung-soc-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=samsung.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id i16si5357287pfi.192.2019.02.15.04.52.43; Fri, 15 Feb 2019 04:52:43 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-samsung-soc-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=NfrtUq8P; spf=pass (google.com: best guess record for domain of linux-samsung-soc-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-samsung-soc-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=samsung.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2389229AbfBOMwm (ORCPT + 3 others); Fri, 15 Feb 2019 07:52:42 -0500 Received: from mailout2.w1.samsung.com ([210.118.77.12]:48473 "EHLO mailout2.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387887AbfBOMwm (ORCPT ); Fri, 15 Feb 2019 07:52:42 -0500 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 Cc: Marek Szyprowski , Thomas Gleixner , Daniel Lezcano , Krzysztof Kozlowski , Chanwoo Choi , Bartlomiej Zolnierkiewicz 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> Sender: linux-samsung-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@vger.kernel.org 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(+) -- 2.17.1 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: 158520 Delivered-To: patch@linaro.org Received: by 2002:a02:48:0:0:0:0:0 with SMTP id 69csp669078jaa; Fri, 15 Feb 2019 04:52:44 -0800 (PST) X-Google-Smtp-Source: AHgI3Ibqyk5Ylf1wSyPNmT5cYGHfOHvd62NsMHj7K/7TzME+pAnbU821Rjj8zKgKTo/ojSM6o5No X-Received: by 2002:a17:902:f08b:: with SMTP id go11mr10032058plb.115.1550235164378; Fri, 15 Feb 2019 04:52:44 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1550235164; cv=none; d=google.com; s=arc-20160816; b=l22zIWzCuijRbZgEQOR+u9UrTH1imA6o7LQZp19MFM57miW6HEkFRIkf3u5F51jRV0 /m0MJlkHp1WiClG9HceDqyjkhqj8sAqz/aX8JVxnxNOJiOTx+Ez4ICWcl7GPYlb9Dlxs a9dj5RiW8jydb8+/drAJ65pvdWmtm7wCPmqktnSpRdVxXuGpjb8yQDsAefR42zbXjpt4 20RDJVsFAwDiZOcyc+oTPYcDSJeO03TqGI+s64jWBYrtddws/AhrxjFVDsQjxylinsk8 y0Hcu37xNJzIvN6zi4cN7xRTu5GbKFchP2WBEWRWf8HQCp2EIlWaytOm2i/OqpjEC7rc C5Dw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:cms-type:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature:dkim-filter; bh=vhh9h8Ye7R8ou4zjA7my3tgHS2E/fWcAEoavnXMxYc4=; b=gNO6aiVG1VNfBqK2DYC0AXrsSyK11HRAtWCw++AcE2g+oBCmlA9rchH0vQbCMX3LwJ SSahY32hc9IEHrKX5VlGXN1bq/cCQwvdV52SYVYpXnW/h8FZjH4gZnxhhWIglod6aAsZ pTLKvCbxaYPzs7yq03y0x2YpvSUrkSEymcWyfmqQWjrVGEL1bYwGD1QWjgcNOksbpxxb qQm3rnzrkxfHVbhbHRHTXrib32Eywdmag20/CnpdvMBl4moPbHB82dR74bGWZXyLKjdN qI+L9WfmJuQe1YZWyzwTTK06/VHzRa1T79nGqIcy9LKfiGd2fR0ss+Nd/BOGYukqA0ty Smwg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=QB3bAesf; spf=pass (google.com: best guess record for domain of linux-samsung-soc-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-samsung-soc-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=samsung.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id i16si5357287pfi.192.2019.02.15.04.52.44; Fri, 15 Feb 2019 04:52:44 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-samsung-soc-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=QB3bAesf; spf=pass (google.com: best guess record for domain of linux-samsung-soc-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-samsung-soc-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=samsung.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387887AbfBOMwn (ORCPT + 3 others); Fri, 15 Feb 2019 07:52:43 -0500 Received: from mailout2.w1.samsung.com ([210.118.77.12]:48482 "EHLO mailout2.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2394691AbfBOMwn (ORCPT ); Fri, 15 Feb 2019 07:52:43 -0500 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 Cc: Marek Szyprowski , Thomas Gleixner , Daniel Lezcano , Krzysztof Kozlowski , Chanwoo Choi , Bartlomiej Zolnierkiewicz 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+cFhsnLGe1eL6l+es FvM+y1qcP7+B3WLT42usFjPO72OyWHvkLrvF5k1TmR04PDat6mTzuHNtD5vHu3Pn2D02L6n3 6NuyitHj8ya5ALYoLpuU1JzMstQifbsEroyO+T+ZCxawVRzf0cDSwLiQtYuRk0NCwETi+aTz 7CC2kMAKRomt/zS6GLmA7M+MEi9urGODKXp76z4TRGIZo8Tave2sEE4Dk8T1++vBRrEJGEp0 ve0C6xAR8JaYfOYvO0gRs0AXk8TthQfAdggDJfZffA5UxMHBIqAqMX1yJEiYV8BWYtaFxVAn yUus3nCAGcTmFLCTWLOmhxlkjoTABDaJE5vmMEIUuUjsmHQKqkFG4vLkbhaIomZGifYZs9gh nB6gh+bsgHrCWuLw8YtgHcwCfBKTtk1nBrlCQoBXoqNNCML0kFi7AOqziUCtO/czT2CUWMDI sIpRPLW0ODc9tdgwL7Vcrzgxt7g0L10vOT93EyMw8k7/O/5pB+PXS0mHGAU4GJV4eFdkpMYI sSaWFVfmHmKU4GBWEuHlXJMWI8SbklhZlVqUH19UmpNafIhRmoNFSZy3muFBtJBAemJJanZq akFqEUyWiYNTqoFxkWWK6f8ljgHmcY6G8h3yx6yrvvfbyivVMx+evuCJ++J/QYKiVvu87ulx tUz20rZwuynC5nlt5UI1of1vQ+dw9k1iWvvlxcEja0+UeH9ud+5+abSBQXVy4sxpQjoXH3ZZ Hb0ewHyvP5S/bnYf9/LHVcZ1uXwzoxWPlk5cZW/xotmhyySpZaYSS3FGoqEWc1FxIgB4c1pq uAIAAA== X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFupjluLIzCtJLcpLzFFi42I5/e/4NV2JbWkxBjOWqVtsnLGe1eL6l+es FvM+y1qcP7+B3WLT42usFjPO72OyWHvkLrvF5k1TmR04PDat6mTzuHNtD5vHu3Pn2D02L6n3 6NuyitHj8ya5ALYoLpuU1JzMstQifbsEroyO+T+ZCxawVRzf0cDSwLiQtYuRk0NCwETi7a37 TF2MXBxCAksYJZYv+QWWEBJoYpLomCUBYrMJGEp0ve1iA7FFBLwlJp/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> Sender: linux-samsung-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@vger.kernel.org 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(+) -- 2.17.1 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