From: Simon Schwarz <schwarz@corscience.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] The forbidden value in omap3-common timer.c code
Date: Thu, 21 Apr 2011 14:13:38 +0200 [thread overview]
Message-ID: <4DB01F72.9070504@corscience.de> (raw)
Hi there,
I just started to work with the u-boot sources for my bachelor thesis.
There was a part in the source which irritated me a bit.
I talk about ./arch/arm/cpu/armv7/omap-common/timer.c
It's about that part of code:
#define TIMER_LOAD_VAL 0xffffffff
int timer_init(void)
{
/* start the counter ticking up, reload value on overflow */
writel(TIMER_LOAD_VAL, &timer_base->tldr);
/* enable timer */
writel((CONFIG_SYS_PTV << 2) | TCLR_PRE | TCLR_AR | TCLR_ST,
&timer_base->tclr);
reset_timer_masked(); /* init the timestamp and lastinc value */
return 0;
}
The tldr ist loaded with 0xFFFFFFFF.
The OMAP35x Technical Reference Manual (Rev. P) says on page 2583:
Do not put the overflow value (0xFFFFFFFF) in the GPTi.TLDR register
because it can lead to undesired results.
Is there a reason why the value is used nevertheless? At this time I
don't know where the timer is used, maybe the "undesired results"
haven't been noticed yet?
Thanks!
Simon
--
-------------------------------------------------
Simon Schwarz
Corscience GmbH& Co. KG
Henkestra?e 91
D-91052 Erlangen
e-mail: schwarz at corscience.de
Internet: www.corscience.de
-------------------------------------------------
Corscience GmbH& Co.KG
Sitz der Gesellschaft/Place of business: Erlangen
Amtsgericht/Local court: F?rth
Handelsregisternummer/Commercial Register No.: HRA 7510
Gesch?ftsf?hrer/Managing director: Prof. Dr. Armin Bolz,
Dr. Karl-Andreas Feldhahn, Dipl.-Volksw. Marc Griefahn
CONFIDENTIALITY:
This e-mail and any attachments are confidential and may also be
privileged. If received in error, please do not disclose the contents
to anyone, but notify us immediately by return e-mail and delete this
e-mail and any attachments from your system. Thank you.
next reply other threads:[~2011-04-21 12:13 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-04-21 12:13 Simon Schwarz [this message]
2011-04-21 13:21 ` [U-Boot] The forbidden value in omap3-common timer.c code Bedia, Vaibhav
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=4DB01F72.9070504@corscience.de \
--to=schwarz@corscience.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.