All the mail mirrored from lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] Fix day of week in mc146818
@ 2009-01-11 14:31 Hervé Poussineau
  2009-01-14 21:10 ` Aurelien Jarno
  0 siblings, 1 reply; 2+ messages in thread
From: Hervé Poussineau @ 2009-01-11 14:31 UTC (permalink / raw
  To: qemu-devel

[-- Attachment #1: Type: text/plain, Size: 492 bytes --]

Hello,

According to mc146818 specification, Day of Week register (#6) is 
between 1 and 7, 1 representing Sunday.
According C specification, tm_wday field in struct tm is between 0 and 
6, 0 representing Sunday.

Bit 2 of register B (#11) is named DM (data mode) and specifies if RTC 
stores values in BCD or in binary form.

Attached patch fixes the off by one error and replaces magic value 0x04 
by REG_B_DM.

Signed-off-by: Hervé Poussineau <hpoussin@reactos.org>

Hervé

[-- Attachment #2: mc146818.diff --]
[-- Type: plain/text, Size: 1636 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [Qemu-devel] [PATCH] Fix day of week in mc146818
  2009-01-11 14:31 [Qemu-devel] [PATCH] Fix day of week in mc146818 Hervé Poussineau
@ 2009-01-14 21:10 ` Aurelien Jarno
  0 siblings, 0 replies; 2+ messages in thread
From: Aurelien Jarno @ 2009-01-14 21:10 UTC (permalink / raw
  To: Hervé Poussineau; +Cc: qemu-devel

On Sun, Jan 11, 2009 at 03:31:14PM +0100, Hervé Poussineau wrote:
> Hello,
>
> According to mc146818 specification, Day of Week register (#6) is  
> between 1 and 7, 1 representing Sunday.
> According C specification, tm_wday field in struct tm is between 0 and  
> 6, 0 representing Sunday.
>
> Bit 2 of register B (#11) is named DM (data mode) and specifies if RTC  
> stores values in BCD or in binary form.
>
> Attached patch fixes the off by one error and replaces magic value 0x04  
> by REG_B_DM.
>
> Signed-off-by: Hervé Poussineau <hpoussin@reactos.org>
>

Thanks, applied.

-- 
  .''`.  Aurelien Jarno	            | GPG: 1024D/F1BCDB73
 : :' :  Debian developer           | Electrical Engineer
 `. `'   aurel32@debian.org         | aurelien@aurel32.net
   `-    people.debian.org/~aurel32 | www.aurel32.net

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2009-01-14 21:10 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-01-11 14:31 [Qemu-devel] [PATCH] Fix day of week in mc146818 Hervé Poussineau
2009-01-14 21:10 ` Aurelien Jarno

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.