Kernel Newbies archive mirror
 help / color / mirror / Atom feed
From: Siddh Raman Pant <code@siddh.me>
To: "Chan Kim" <ckim@etri.re.kr>
Cc: 'linus probert' <linus.probert@gmail.com>,
	kernelnewbies <kernelnewbies@kernelnewbies.org>
Subject: RE: clock_gettime function doesn't scale to real time.. and changing CNTFRQ_EL0 doesn't make any change..(arm64)
Date: Tue, 08 Nov 2022 16:01:20 +0530	[thread overview]
Message-ID: <18456cb6495.5733bb72319434.7278664327863023749@siddh.me> (raw)
In-Reply-To: <153e01d8f331$2e11dfa0$8a359ee0$@etri.re.kr>

On Tue, 08 Nov 2022 10:45:55 +0530  Chan Kim  wrote:
> 
> Hello all,
> 
> I fixed this problem and now the time measurement and commands like sleep
> works just fine.
> 
> Two points I fixed : 
> - I had 'clock-frequency' property set with wrong frequency in my timer node
> in the device tree so I removed it. 
>    The document says when the boot loader sets CNTFRQ register correctly, we
> don't have to provide 'clock-frequency' property value.
> - The correct frequency of the system counter (arm464) was 10MHz in our
> board. Previously I set CNTFRQ register with 5MHz but I fixed it to 10MHz.
> 
> One more thing to note. The system counter has both system register view and
> memory mapped register view. 
> Previously I said even if I set cntfrq_el0 register with some values (using
> system register, "msr cntfrq_el0, COUNTER_FREQUENCY") it did not change
> anything.
> It was because I set the same register with old value (5MHz) using the
> memory mapped access later (like with "writel(COUNTER_FREQUENCY,
> 0x4c018020);").
> 
> Hope this helps someone later.
> Thank you!
> 
> Chan Kim
> 

Glad to know. Thanks for sharing the updates and the cause behind it!

Thanks,
Siddh


_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

  reply	other threads:[~2022-11-08 10:32 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-04  9:04 clock_gettime function doesn't scale to real time.. and changing CNTFRQ_EL0 doesn't make any change..(arm64) Chan Kim
2022-11-04 12:04 ` Linus Probert
2022-11-04 19:51 ` Siddh Raman Pant
2022-11-05 11:46   ` Chan Kim
2022-11-08  5:15     ` Chan Kim
2022-11-08 10:31       ` Siddh Raman Pant [this message]
2022-11-08  5:18     ` Chan Kim

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=18456cb6495.5733bb72319434.7278664327863023749@siddh.me \
    --to=code@siddh.me \
    --cc=ckim@etri.re.kr \
    --cc=kernelnewbies@kernelnewbies.org \
    --cc=linus.probert@gmail.com \
    /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 read-only IMAP folder(s) and NNTP newsgroup(s).