From: Dirk Behme <dirk.behme@googlemail.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] OMAP3: Fix timer handling to 1ms and CONFIG_SYS_HZ to 1000.
Date: Wed, 01 Apr 2009 20:03:27 +0200 [thread overview]
Message-ID: <49D3AC6F.1070604@googlemail.com> (raw)
In-Reply-To: <20090331202939.GI24923@game.jcrosoft.org>
Dear Jean-Christophe,
Jean-Christophe PLAGNIOL-VILLARD wrote:
> On 11:19 Tue 17 Mar , Dirk Behme wrote:
>> Fix OMAP3 timer handling to 1ms tick and CONFIG_SYS_HZ to 1000.
>> Clean up macros and comments.
>>
>> Signed-off-by: Dirk Behme <dirk.behme@googlemail.com>
>> Signed-off-by: Manikandan Pillai <mani.pillai@ti.com>
>> ---
>>
>> Changes from Mani's original patch which is replaced by this [1]:
>>
>> * Don't remove overflow handling in get_timer_masked()
>> * Update omap3_zoom1.h, too.
>> * Clean up timer related comments and macros in config files
>> * Don't touch reset_timer_masked()
>> * Switch divider clock divider from 256 to 8 to be able to get 1000Hz
>> * Remove unused udelay_masked()
>> * Minor clean up of get_tbclk()
>>
>> [1] http://lists.denx.de/pipermail/u-boot/2009-March/049012.html
>>
>> This patch is against U-Boot mainline commit
>> 'b3dd629e78870ba2dc9f8032978721c0fa02a856'
>> 'Prepare 2009.03-rc2'
>>
>> cpu/arm_cortexa8/omap3/interrupts.c | 50 +++++++++++-------------------------
>> include/configs/omap3_beagle.h | 11 +++----
>> include/configs/omap3_evm.h | 15 +++++-----
>> include/configs/omap3_overo.h | 11 +++----
>> include/configs/omap3_pandora.h | 11 +++----
>> include/configs/omap3_zoom1.h | 11 +++----
>> 6 files changed, 43 insertions(+), 66 deletions(-)
>>
>> Index: u-boot-main/cpu/arm_cortexa8/omap3/interrupts.c
>> ===================================================================
>> --- u-boot-main.orig/cpu/arm_cortexa8/omap3/interrupts.c
>> +++ u-boot-main/cpu/arm_cortexa8/omap3/interrupts.c
>> @@ -169,7 +169,16 @@ static ulong timestamp;
>> static ulong lastinc;
>> static gptimer_t *timer_base = (gptimer_t *)CONFIG_SYS_TIMERBASE;
>>
>> -/* nothing really to do with interrupts, just starts up a counter. */
>> +/*
>> + * Nothing really to do with interrupts, just starts up a counter.
>> + * We run the counter with 13MHz, divided by 8, resulting in timer
>> + * frequency of 1.625MHz. With 32bit counter register, counter
>> + * overflows in ~44min
>> + */
> It will be better to use the 12Mhz source clock and set the divider to 4
> so you will a a timer frequency to 3MHz and a perfect Match clock
> it will overflow ealier but the timer will be exact
Why do you think that existing code doesn't give exact value? With
this patch we get a nice 1000 Hz tick.
Existing patch is the most non-intrusive (i.e. touch only what's
necessary), easy and small fix for broken OMAP3 timer code. And it
gives fine 1000 Hz. Yes, everything can be done more perfect. But
often this isn't necessary. So please apply this version.
Dirk
Btw.: Could be agree on the "without too long delays" part of
http://lists.denx.de/pipermail/u-boot/2009-March/049885.html
?
next prev parent reply other threads:[~2009-04-01 18:03 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-03-17 10:19 [U-Boot] [PATCH] OMAP3: Fix timer handling to 1ms and CONFIG_SYS_HZ to 1000 Dirk Behme
2009-03-31 20:29 ` Jean-Christophe PLAGNIOL-VILLARD
2009-04-01 18:03 ` Dirk Behme [this message]
2009-04-01 22:43 ` Wolfgang Denk
2009-04-02 10:42 ` Ladislav Michl
2009-04-02 10:48 ` [U-Boot] [PATCH v2] " Ladislav Michl
2009-04-20 19:07 ` [U-Boot] [PATCH] " Ladislav Michl
2009-04-20 17:27 ` Dirk Behme
2009-04-20 22:10 ` Ladislav Michl
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=49D3AC6F.1070604@googlemail.com \
--to=dirk.behme@googlemail.com \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox