From: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH-ARM] CONFIG_SYS_HZ fix for ARM920T S3C24X0 Boards
Date: Sun, 5 Jul 2009 00:15:45 +0200 [thread overview]
Message-ID: <20090704221545.GC30172@game.jcrosoft.org> (raw)
In-Reply-To: <4A3D8CF8.10005@fearnside-systems.co.uk>
On 02:29 Sun 21 Jun , kevin.morfitt at fearnside-systems.co.uk wrote:
> This sets CONFIG_SYS_HZ to 1000 for all boards that use the s3c2400 and
> s3c2410 cpu's.
>
> Tested on an Embest SBC2440-II Board with local u-boot patches as I don't
> have any s3c2400 or s3c2410 boards but need this patch applying before I can
> submit patches for thge SBC2440-II Board.
>
> Also, ran MAKEALL for all ARM9 targets and no new warnings or errors were found.
>
> Note that the existing code modified by this patch does not meet the u-boot
> coding style but I'd like to handle this separately and submit patches to fix
> this later.
It look fine but it will be good that someone test it on the other soc
I'll try to ping someone
>
> Signed-off-by: Kevin Morfitt <kevin.morfitt@fearnside-systems.co.uk>
> ---
> cpu/arm920t/s3c24x0/timer.c | 42 ++++++++++++++++++++++++++----------------
> include/configs/sbc2410x.h | 4 +---
> include/configs/smdk2400.h | 4 +---
> include/configs/smdk2410.h | 4 +---
> include/configs/trab.h | 12 +-----------
> 5 files changed, 30 insertions(+), 36 deletions(-)
> mode change 100644 => 100755 cpu/arm920t/s3c24x0/timer.c
> mode change 100644 => 100755 include/configs/sbc2410x.h
> mode change 100644 => 100755 include/configs/smdk2400.h
> mode change 100644 => 100755 include/configs/smdk2410.h
> mode change 100644 => 100755 include/configs/trab.h
>
> diff --git a/cpu/arm920t/s3c24x0/timer.c b/cpu/arm920t/s3c24x0/timer.c
> old mode 100644
> new mode 100755
> index f0a09cd..8ea2e4b
> --- a/cpu/arm920t/s3c24x0/timer.c
> +++ b/cpu/arm920t/s3c24x0/timer.c
> @@ -38,7 +38,9 @@
> #include <s3c2410.h>
> #endif
>
> +static unsigned long get_timer_raw(void);
> int timer_load_val = 0;
> +static ulong timer_clk;
>
>
> +static unsigned long get_timer_raw(void)
rename it get_ticks
> +{
> + ulong now = READ_TIMER();
> +
> + if (lastdec >= now) {
> + /* normal mode */
> + timestamp += lastdec - now;
> + } else {
> + /* we have an overflow ... */
> + timestamp += lastdec + timer_load_val - now;
> + }
> + lastdec = now;
> +
> + return timestamp;
> +}
> +
> /*
> * This function is derived from PowerPC code (read timebase as long long).
> * On ARM it just returns the timer value.
> */
> unsigned long long get_ticks(void)
> {
> - return get_timer(0);
> + return get_timer_raw();
> }
>
Best Regards,
J.
prev parent reply other threads:[~2009-07-04 22:15 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-06-21 1:29 [U-Boot] [PATCH-ARM] CONFIG_SYS_HZ fix for ARM920T S3C24X0 Boards kevin.morfitt at fearnside-systems.co.uk
2009-07-04 22:15 ` Jean-Christophe PLAGNIOL-VILLARD [this message]
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=20090704221545.GC30172@game.jcrosoft.org \
--to=plagnioj@jcrosoft.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