All of 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

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.