linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Youngmin Nam <youngmin.nam@samsung.com>
To: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
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
Date: Mon, 1 Nov 2021 14:25:42 +0900	[thread overview]
Message-ID: <20211101052542.GA35671@perf> (raw)
In-Reply-To: <117dfec8-e417-642b-7647-9d17592826ad@canonical.com>

[-- Attachment #1: Type: text/plain, Size: 1312 bytes --]

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
> 

[-- Attachment #2: Type: text/plain, Size: 0 bytes --]



  reply	other threads:[~2021-11-01  4:58 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CGME20211021055104epcas2p4bd5278e58860af8c136a850c0f080087@epcas2p4.samsung.com>
2021-10-21  6:18 ` [PATCH v1 0/2] Indroduce Exynos Multi Core Timer version 2 Youngmin Nam
     [not found]   ` <CGME20211021055112epcas2p278145beb21cd6cc4217813a41c1e1407@epcas2p2.samsung.com>
2021-10-21  6:18     ` [PATCH v1 1/2] clocksource/drivers/exynos_mct_v2: introduce Exynos MCT version 2 driver for next Exynos SoC Youngmin Nam
2021-10-21  6:18       ` Krzysztof Kozlowski
2021-10-21  8:26         ` Youngmin Nam
2021-10-21  8:07           ` Krzysztof Kozlowski
2021-10-22  4:21             ` Youngmin Nam
2021-10-25  8:18               ` Krzysztof Kozlowski
2021-10-26  1:47                 ` Youngmin Nam
2021-10-26  7:10                   ` Krzysztof Kozlowski
2021-10-26 10:45                     ` Youngmin Nam
2021-10-26 11:00                       ` Krzysztof Kozlowski
     [not found]                         ` <CGME20211027011125epcas2p2916524051416ede854b750c91a19073b@epcas2p2.samsung.com>
2021-10-27  1:38                           ` Youngmin Nam
2021-10-27  6:39                             ` Krzysztof Kozlowski
2021-11-01  6:04                               ` Youngmin Nam
2021-10-27  7:34                             ` Will Deacon
2021-10-29  3:54                               ` Youngmin Nam
2021-10-26 11:00                       ` Krzysztof Kozlowski
2021-10-27  8:38       ` Krzysztof Kozlowski
2021-11-01  5:25         ` Youngmin Nam [this message]
     [not found]   ` <CGME20211021055115epcas2p158fbf3ac61d3deeb5995bd100d7edef1@epcas2p1.samsung.com>
2021-10-21  6:18     ` [PATCH v1 2/2] dt-bindings: timer: samsung,s5e99xx-mct: Document s5e99xx-mct bindings Youngmin Nam

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20211101052542.GA35671@perf \
    --to=youngmin.nam@samsung.com \
    --cc=daniel.lezcano@linaro.org \
    --cc=hajun.sung@samsung.com \
    --cc=hoony.yu@samsung.com \
    --cc=krzysztof.kozlowski@canonical.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-samsung-soc@vger.kernel.org \
    --cc=myung-su.cha@samsung.com \
    --cc=pullip.cho@samsung.com \
    --cc=tglx@linutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).