From: Jens Gehrlein <sew_s@tqs.de>
To: u-boot@lists.denx.de
Subject: [U-Boot-Users] i.MX31: question about CFG_HZ and CKIL
Date: Wed, 14 May 2008 08:36:37 +0200 [thread overview]
Message-ID: <482A8875.1090802@tqs.de> (raw)
In-Reply-To: <20080509221328.CAEB4247F5@gemini.denx.de>
Hi Wolfgang, Guennadi,
Wolfgang Denk schrieb:
> In message <48216F73.4010809@tqs.de> you wrote:
>> If CKIL is the above mentioned 32 kHz clock, the resulting deviation in
>> the timers is "only" about 2.4% as long as CFG_HZ in mx31ads.h is 32000
>> Hz. Although it works with the current definition, I'd like to know your
>> opinions, whether it is necessary to adjust this value.
>
> Note that CFG_HZ is not really configurable, even if the name suggests
> so. In reality, CFG_HZ is a constant with the value 1000.
>
> There are some broken boards which don't handle this correctly, but
> at least that's what you should set.
So, as far as I understood the function get_timer() must also return a
value that is counted up 1000 times per second. But according to
cpu/arm1136/mx31/interrupt.c this is not the case. GPTCNT is updated
with 32000 or 32768 Hz, and this counter register's value is currently
returned by get_timer() (minus base, passed by the caller).
If CFG_HZ should be set to 1000 than cpu/arm1136/mx31/interrupt.c should
be fixed, i.e. the prescaler had to be adjusted from 1 to approx. 33. Do
you agree or did I understand this timer stuff completely wrong?
Best regards,
Jens
next prev parent reply other threads:[~2008-05-14 6:36 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-05-07 8:59 [U-Boot-Users] i.MX31: question about CFG_HZ and CKIL Jens Gehrlein
2008-05-08 7:53 ` Guennadi Liakhovetski
2008-05-09 22:13 ` Wolfgang Denk
2008-05-14 6:36 ` Jens Gehrlein [this message]
2008-05-14 10:30 ` Wolfgang Denk
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=482A8875.1090802@tqs.de \
--to=sew_s@tqs.de \
--cc=u-boot@lists.denx.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.