From: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] ARM: Use do_div() instead of division for "long long".
Date: Fri, 24 Oct 2008 13:30:41 +0200 [thread overview]
Message-ID: <20081024113041.GA32425@game.jcrosoft.org> (raw)
In-Reply-To: <1224658841-14858-1-git-send-email-wd@denx.de>
> #include <asm/proc-armv/ptrace.h>
> #include <s3c6400.h>
> +#include <div64.h>
>
> static ulong timer_load_val;
>
> @@ -148,7 +149,9 @@ void reset_timer(void)
>
> ulong get_timer_masked(void)
> {
> - return get_ticks() / (timer_load_val / (100 * CFG_HZ));
> + unsigned long long res = get_ticks();
> + do_div (res, (timer_load_val / (100 * CFG_HZ)));
> + return res;
CFG_HZ was renamed CONFIG_SYS_HZ
> }
I've start to think to re-rename it CFG_HZ as done in Linux, normaly this
value is the same for all arch & board
Best Regards,
J.
next prev parent reply other threads:[~2008-10-24 11:30 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-10-22 7:00 [U-Boot] [PATCH] ARM: Use do_div() instead of division for "long long" Wolfgang Denk
2008-10-24 11:30 ` Jean-Christophe PLAGNIOL-VILLARD [this message]
2008-10-24 11:52 ` Wolfgang Denk
2008-11-02 9:41 ` Jean-Christophe PLAGNIOL-VILLARD
[not found] <mailman.680.1220914851.2783.u-boot@lists.denx.de>
2008-09-09 0:04 ` Gururaja Hebbar K R
2008-09-08 23:33 ` Jean-Christophe PLAGNIOL-VILLARD
-- strict thread matches above, loose matches on Subject: below --
2008-09-08 22:59 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=20081024113041.GA32425@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