From: Tony Lindgren <tony@atomide.com>
To: Tero Kristo <tero.kristo@nokia.com>
Cc: linux-omap@vger.kernel.org
Subject: Re: [PATCH 1/1] Added sleep support to UART
Date: Mon, 9 Jun 2008 23:06:24 -0700 [thread overview]
Message-ID: <20080610060624.GE23796@atomide.com> (raw)
In-Reply-To: <20080610051104.GD23796@atomide.com>
* Tony Lindgren <tony@atomide.com> [080609 22:11]:
> Hi,
>
> Sorry for the delay on looking at this, it's looking pretty good in
> general. Few more mostly cosmetic comments below.
Here's one more comment:
> > --- a/arch/arm/mach-omap2/pm24xx.c
> > +++ b/arch/arm/mach-omap2/pm24xx.c
> > if (omap2_pm_debug) {
> > unsigned long long tmp;
> > - u32 resume_time;
> > + s64 resume_time;
> > + struct timespec t;
> >
> > - resume_time = omap2_read_32k_sync_counter();
> > + getnstimeofday(&t);
> > + resume_time = timespec_to_ns(&t);
> > tmp = resume_time - sleep_time;
> > - tmp *= 1000000;
> > - omap2_pm_dump(0, 1, tmp / 32768);
> > + omap2_pm_dump(0, 1, tmp / 1000);
> > }
You should make all these calculations using timespec_sub():
struct timespec ts1, ts2, ts_delta;
getnstimeofday(&ts1);
getnstimeofday(&ts2);
ts_delta = timespec_sub(&ts2, &ts1);
Regards,
Tony
next prev parent reply other threads:[~2008-06-10 6:06 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-06-03 10:47 [PATCH 1/1] Added sleep support to UART Tero Kristo
2008-06-10 5:11 ` Tony Lindgren
2008-06-10 6:06 ` Tony Lindgren [this message]
2008-06-10 14:07 ` Tero.Kristo
-- strict thread matches above, loose matches on Subject: below --
2008-05-29 14:55 Dynamic idle support for UART Tero Kristo
2008-05-29 14:55 ` [PATCH 1/1] Added sleep support to UART Tero Kristo
2008-05-30 23:01 ` Tony Lindgren
2008-06-02 8:09 ` Tero.Kristo
2008-06-02 16:29 ` Tony Lindgren
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=20080610060624.GE23796@atomide.com \
--to=tony@atomide.com \
--cc=linux-omap@vger.kernel.org \
--cc=tero.kristo@nokia.com \
/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.