Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp2658090pxb; Sun, 31 Oct 2021 22:02:17 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxUJkGzWqA6sAXKXDppb2WSsawZcaBKIYZqeRpWMXue4a7gLZHUeL6sRo/ZpXId70tpeSqv X-Received: by 2002:a05:6602:2e8c:: with SMTP id m12mr19060100iow.91.1635742937219; Sun, 31 Oct 2021 22:02:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1635742937; cv=none; d=google.com; s=arc-20160816; b=DfS84KGtzvdxFvf2tGXqw5S50RW+/oX6pT/4yoZdEvhtrgDNI+3yI3D+A3YUCKj6zx L53LAIAYji7zTYCQUSIxks2t/MAs+0tBuimiuHD+8KemcA0PTgrC4273J1UtxJT2Pd14 VUB8qUwSzR1dvpRhowD8zT7WAuHBqLKzSV1s6J7LKzlYuuU2duw6XpcD3bHH9SpD3vQR TSWBGhXoYL2Ktoi9oXRyJyGOeBJjk8mCXatKZ2ho1TtBlYOb4xSrBICuijRQqv/Z7RC6 pkTnUlW53nU9Cg2LCOaElL6M7lm1cpOSho+qrJKsiSVSHivOJ3o4eIXyLeMfGIwgF7S+ lH+g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:references:dlp-filter:cms-type:user-agent :in-reply-to:mime-version:message-id:subject:cc:to:from:date :dkim-signature:dkim-filter; bh=IJ8BEhRakEjtjgjClZJy5PcZ8sx14ybuUNY2BjRZzQA=; b=ryotqdVhdGUA6OIu6UzWB3gsaQ+/KlUkEFpzCyZSpmcBTJNJZBPpG4loGXqn6yF046 hVCiTiP6RayrfT1G1URxDG0bsREScK7G+4mrlW9JumC+ZEcPDTNdRYuWxkBAAWHZFs8U PYPWPrVO366u82APRPtDbqxOZ0Cee0nJJ/yHdrTyKKiL7xtkpGmqnkl0kB8xb/JQPMpZ gN8NPehVxTgxVJGSI9Btllda/1H+8N1YrTvSib807Hshk/+ihzMKZ6W9iA4pVx8RKgQ4 Glh0fYfQftVIuPEZDvYRLLMM01hoM07PX5WM6UCl1lZR86SFmJStXdL0j+MUt+CKv5vB 6h3w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=MiOj7Xwp; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-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. [23.128.96.18]) by mx.google.com with ESMTP id f5si23046055iow.102.2021.10.31.22.02.05; Sun, 31 Oct 2021 22:02:17 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=MiOj7Xwp; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-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 S229680AbhKAFBR (ORCPT + 99 others); Mon, 1 Nov 2021 01:01:17 -0400 Received: from mailout4.samsung.com ([203.254.224.34]:48266 "EHLO mailout4.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229502AbhKAFBO (ORCPT ); Mon, 1 Nov 2021 01:01:14 -0400 Received: from epcas2p4.samsung.com (unknown [182.195.41.56]) by mailout4.samsung.com (KnoxPortal) with ESMTP id 20211101045838epoutp04cec30b3b0678f57d03218c4038230455~zU1YWVbQu2350323503epoutp04g for ; Mon, 1 Nov 2021 04:58:38 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout4.samsung.com 20211101045838epoutp04cec30b3b0678f57d03218c4038230455~zU1YWVbQu2350323503epoutp04g DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1635742718; bh=IJ8BEhRakEjtjgjClZJy5PcZ8sx14ybuUNY2BjRZzQA=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=MiOj7Xwpo545MXdITUXWsMHhgKIqgygwTzDCRn2Qyxc9gsgfDzgH1QphUcJ2ohReS 5hwB/eYOewSTyt4Euv0RlwKQ9cNbPlDTQx/Ejri+kVWvHashx1yLhOczSlqOrF+Nww xgSMVwawePMoOqSuUzq6DHbMUiJzPGZw+DIxW5NY= Received: from epsnrtp4.localdomain (unknown [182.195.42.165]) by epcas2p4.samsung.com (KnoxPortal) with ESMTP id 20211101045838epcas2p4882c3fbaa3bf3c63b22491524ba4e42f~zU1XybeLY0577405774epcas2p4T; Mon, 1 Nov 2021 04:58:38 +0000 (GMT) Received: from epsmges2p3.samsung.com (unknown [182.195.36.92]) by epsnrtp4.localdomain (Postfix) with ESMTP id 4HjLQg2Ck4z4x9Qd; Mon, 1 Nov 2021 04:58:35 +0000 (GMT) Received: from epcas2p4.samsung.com ( [182.195.41.56]) by epsmges2p3.samsung.com (Symantec Messaging Gateway) with SMTP id FC.8D.10014.6F37F716; Mon, 1 Nov 2021 13:58:30 +0900 (KST) Received: from epsmtrp1.samsung.com (unknown [182.195.40.13]) by epcas2p3.samsung.com (KnoxPortal) with ESMTPA id 20211101045829epcas2p37b38a4e4fd0af4a72a62bdeba46daf17~zU1P5Un942895128951epcas2p3A; Mon, 1 Nov 2021 04:58:29 +0000 (GMT) Received: from epsmgms1p2.samsung.com (unknown [182.195.42.42]) by epsmtrp1.samsung.com (KnoxPortal) with ESMTP id 20211101045829epsmtrp1d2e3061320d8978940771ce158c53dff~zU1P4jeDH1809618096epsmtrp1N; Mon, 1 Nov 2021 04:58:29 +0000 (GMT) X-AuditID: b6c32a47-473ff7000000271e-a8-617f73f6715f Received: from epsmtip1.samsung.com ( [182.195.34.30]) by epsmgms1p2.samsung.com (Symantec Messaging Gateway) with SMTP id 5A.C2.08738.5F37F716; Mon, 1 Nov 2021 13:58:29 +0900 (KST) Received: from perf (unknown [12.36.155.123]) by epsmtip1.samsung.com (KnoxPortal) with ESMTPA id 20211101045829epsmtip1e168ff4e9d4430798a70171f70b1099b~zU1PrIXNn2432424324epsmtip1J; Mon, 1 Nov 2021 04:58:29 +0000 (GMT) Date: Mon, 1 Nov 2021 14:25:42 +0900 From: Youngmin Nam To: Krzysztof Kozlowski Cc: daniel.lezcano@linaro.org, tglx@linutronix.de, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org, pullip.cho@samsung.com, hoony.yu@samsung.com, hajun.sung@samsung.com, myung-su.cha@samsung.com Subject: Re: [PATCH v1 1/2] clocksource/drivers/exynos_mct_v2: introduce Exynos MCT version 2 driver for next Exynos SoC Message-ID: <20211101052542.GA35671@perf> MIME-Version: 1.0 In-Reply-To: <117dfec8-e417-642b-7647-9d17592826ad@canonical.com> User-Agent: Mutt/1.9.4 (2018-02-28) X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFlrFJsWRmVeSWpSXmKPExsWy7bCmhe634vpEg6s7BCzmfZa1aNp/idni +NrXrBYb3/5gstj0+BqrxeVdc9gsZpzfx2Sx+PEKJot/vQcZLTZvmsrswOUxq6GXzePOtT1s Hu/OnWP32Lyk3qNvyypGj8+b5ALYorJtMlITU1KLFFLzkvNTMvPSbZW8g+Od403NDAx1DS0t zJUU8hJzU22VXHwCdN0yc4AOU1IoS8wpBQoFJBYXK+nb2RTll5akKmTkF5fYKqUWpOQUmBfo FSfmFpfmpevlpZZYGRoYGJkCFSZkZ/xZN4uloJ23omnGAdYGxltcXYwcHBICJhKNi/K6GDk5 hAR2MEr8XeDUxcgFZH9ilOj+cp0NwvnMKLFp1koWkCqQhobWnUwQiV2MEkcWToZyHjFKrPmx hxmkikVARaLl6QqwDjYBXYltJ/4xgtgiAtYSR7fOZwZpYBb4xy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adzJ1MXJxCAnsYJQ49X0NG0RCRuL2ysusELawxP2WI6wQRQ8YJTb+m88IkmAR UJFoebqCBcRmE9CV2HbiH1hcRMBa4ujW+cwgDcwCDUwSB67MBEsIC1RJXHu6AGwDr4CmROO7 kywQU/8wSnyd2cIOkRCUODnzCdhUZgEtiRv/XgLdxwFkS0ss/wd2NqeAo8Ti7XvBZooKKEsc 2HacaQKj4Cwk3bOQdM9C6F7AyLyKUTK1oDg3PbfYsMAoL7Vcrzgxt7g0L10vOT93EyM4VrS0 djDuWfVB7xAjEwfjIUYJDmYlEd6ICzWJQrwpiZVVqUX58UWlOanFhxilOViUxHkvdJ2MFxJI TyxJzU5NLUgtgskycXBKNTDNuKJ4s8xwW23aTzaeqSpxHgpFC4wcThzc86z++OQJIaa2/ncP sIr4dOQL3X2SVeaaKcC4p2fPk7YFwsoz/27fXrtP9KVNWiWHkmrL+cXb/awM7UN2TBaWu7lP qP7UzAiG/HJeo48VQkIicl9k5RL/7JO5rb7sYuF/nZI99orfA14vf6Qic3xOzfOiXXskdCsT tuakbJlXfLr8Y8EF1bxXWV6Rb6zeyArG3V4wY96WAquYC0lrIpb+vXDpbqmZ4n3p3sKdD3qm zp58493FmIBUO+7Z0wMXm5w1nWNb5bfkSb9q0QSO5ArO0rI5D5gFMiLc5H2+rN/HLLY6r3K/ aYiX8WlTgVvsx3b+X5RislSJpTgj0VCLuag4EQAFM9T5BAMAAA== X-CMS-MailID: 20211101045829epcas2p37b38a4e4fd0af4a72a62bdeba46daf17 X-Msg-Generator: CA Content-Type: multipart/mixed; boundary="----cdUjzaOTU1RPrvxdiax6HhSlBq1jqBVFQM-mWLfQP3CdA8rT=_96e4a_" X-Sendblock-Type: AUTO_CONFIDENTIAL CMS-TYPE: 102P DLP-Filter: Pass X-CFilter-Loop: Reflected X-CMS-RootMailID: 20211021055112epcas2p278145beb21cd6cc4217813a41c1e1407 References: <20211021061804.39118-1-youngmin.nam@samsung.com> <20211021061804.39118-2-youngmin.nam@samsung.com> <117dfec8-e417-642b-7647-9d17592826ad@canonical.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org ------cdUjzaOTU1RPrvxdiax6HhSlBq1jqBVFQM-mWLfQP3CdA8rT=_96e4a_ Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline On Wed, Oct 27, 2021 at 10:38:09AM +0200, Krzysztof Kozlowski wrote: > On 21/10/2021 08:18, Youngmin Nam wrote: > > Exynos MCT version 2 is composed of 1 FRC and 12 comparators. > > The 12 comparators can produces interrupts independently, > > so they can be used as local timer of each CPU. > > > > ... > > > + > > +static void exynos_mct_comp_start(struct mct_clock_event_device *mevt, > > + bool periodic, unsigned long cycles) > > +{ > > + unsigned int index = mevt->comp_index; > > + unsigned int comp_enable; > > + unsigned int loop_cnt = 0; > > + > > + comp_enable = readl_relaxed(reg_base + EXYNOS_MCT_COMP_ENABLE(index)); > > + if (comp_enable == MCT_COMP_ENABLE) > > + exynos_mct_comp_stop(mevt); > > + > > + if (periodic) > > + writel_relaxed(MCT_COMP_CIRCULAR_MODE, reg_base + EXYNOS_MCT_COMP_MODE(index)); > > + > > + writel_relaxed(cycles, reg_base + EXYNOS_MCT_COMP_PERIOD(index)); > > This is unsigned long, so 64-bit on your platform. Use writeq_relaxed or > handle it somehow. Thanks for your review. I checked again and data sheet of MCTv2 shows compartor period has 32-bit data width. Once we write 32bit value to comp_period register, H/W will produce interrupt when increasing FRC is the same with the value of "current FRC + comp_period". > > > Best regards, > Krzysztof > ------cdUjzaOTU1RPrvxdiax6HhSlBq1jqBVFQM-mWLfQP3CdA8rT=_96e4a_ Content-Type: text/plain; charset="utf-8" ------cdUjzaOTU1RPrvxdiax6HhSlBq1jqBVFQM-mWLfQP3CdA8rT=_96e4a_--