Patchwork [U-Boot] README: document the requirements for CONFIG_SYS_HZ

login
register
mail settings
Submitter Stephen Warren
Date March 22, 2013, 3:41 a.m.
Message ID <1363923692-12748-1-git-send-email-swarren@wwwdotorg.org>
Download mbox | patch
Permalink /patch/229879/
State Superseded
Delegated to: Tom Rini
Headers show

Comments

Stephen Warren - March 22, 2013, 3:41 a.m.
CONFIG_SYS_HZ must be 1000, and get_timer() must therefore return mS.
Document this.

Signed-off-by: Stephen Warren <swarren@wwwdotorg.org>
---
 README |    6 ++++++
 1 file changed, 6 insertions(+)
Wolfgang Denk - March 22, 2013, 9:12 p.m.
Dear Stephen,

In message <1363923692-12748-1-git-send-email-swarren@wwwdotorg.org> you wrote:
> CONFIG_SYS_HZ must be 1000, and get_timer() must therefore return mS.
> Document this.

"must return mS" ? "mS" means Milli-Siemens, which is a unit of
electric conductance and electric admittance.  You mean "ms" =
milliseconds ...

> +- CPU timer options:
> +		CONFIG_SYS_HZ
> +
> +		The frequency of the timer returned by get_timer(). This value
> +		MUST be 1000.

This is misleading, or even incorrect.  If I read this, I would expect
that get_timer() returns 1000. Obviously, this is incorrect.  Instead,
get_timer() returns timestamp information in millisecond resolution.


Best regards,

Wolfgang Denk
Stephen Warren - March 22, 2013, 9:18 p.m.
On 03/22/2013 03:12 PM, Wolfgang Denk wrote:
> Dear Stephen,
> 
> In message <1363923692-12748-1-git-send-email-swarren@wwwdotorg.org> you wrote:
>> CONFIG_SYS_HZ must be 1000, and get_timer() must therefore return mS.
>> Document this.
> 
> "must return mS" ? "mS" means Milli-Siemens, which is a unit of
> electric conductance and electric admittance.  You mean "ms" =
> milliseconds ...

It seems that's true.

>> +- CPU timer options:
>> +		CONFIG_SYS_HZ
>> +
>> +		The frequency of the timer returned by get_timer(). This value
>> +		MUST be 1000.
> 
> This is misleading, or even incorrect.  If I read this, I would expect
> that get_timer() returns 1000. Obviously, this is incorrect.  Instead,
> get_timer() returns timestamp information in millisecond resolution.

That is not what that sentence means.
Wolfgang Denk - March 22, 2013, 9:41 p.m.
Dear Stephen Warren,

In message <514CCAAE.6020909@wwwdotorg.org> you wrote:
>
> >> +		The frequency of the timer returned by get_timer(). This value
> >> +		MUST be 1000.
> > 
> > This is misleading, or even incorrect.  If I read this, I would expect
> > that get_timer() returns 1000. Obviously, this is incorrect.  Instead,
> > get_timer() returns timestamp information in millisecond resolution.
> 
> That is not what that sentence means.

Yes, I know.  But it can be easily misinterpreted.

Best regards,

Wolfgang Denk
Tom Rini - March 27, 2013, 8:01 p.m.
On Fri, Mar 22, 2013 at 10:41:53PM +0100, Wolfgang Denk wrote:
> Dear Stephen Warren,
> 
> In message <514CCAAE.6020909@wwwdotorg.org> you wrote:
> >
> > >> +		The frequency of the timer returned by get_timer(). This value
> > >> +		MUST be 1000.
> > > 
> > > This is misleading, or even incorrect.  If I read this, I would expect
> > > that get_timer() returns 1000. Obviously, this is incorrect.  Instead,
> > > get_timer() returns timestamp information in millisecond resolution.
> > 
> > That is not what that sentence means.
> 
> Yes, I know.  But it can be easily misinterpreted.

How about:
The frequency of the timer returned by get_timer().  get_timer() must
operate in milliseconds and this CONFIG option must be set to 1000.

Patch

diff --git a/README b/README
index 7f2506a..1871ada 100644
--- a/README
+++ b/README
@@ -495,6 +495,12 @@  The following options need to be configured:
 		exists, unlike the similar options in the Linux kernel. Do not
 		set these options unless they apply!
 
+- CPU timer options:
+		CONFIG_SYS_HZ
+
+		The frequency of the timer returned by get_timer(). This value
+		MUST be 1000.
+
 - Linux Kernel Interface:
 		CONFIG_CLOCKS_IN_MHZ