public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Wolfgang Denk <wd@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] rtc: pcf8563: Make century compatible with Linux
Date: Sun, 02 Sep 2012 17:31:12 +0200	[thread overview]
Message-ID: <20120902153112.12343203B2F@gemini.denx.de> (raw)
In-Reply-To: <2136837803.335794.1342793136811.JavaMail.root@advansee.com>

Dear Beno?t Th?baudeau,

In message <2136837803.335794.1342793136811.JavaMail.root@advansee.com> you wrote:
> This driver uses the century bit of this RTC in the opposite way Linux does> .
> From Linux's rtc-pcf8563.c:
> 	/*
> 	 * The meaning of MO_C bit varies by the chip type.
> 	 * From PCF8563 datasheet: this bit is toggled when the years
> 	 * register overflows from 99 to 00
> 	 *   0 indicates the century is 20xx
> 	 *   1 indicates the century is 19xx
> 	 * From RTC8564 datasheet: this bit indicates change of
> 	 * century. When the year digit data overflows from 99 to 00,
> 	 * this bit is set. By presetting it to 0 while still in the
> 	 * 20th century, it will be set in year 2000, ...
> 	 * There seems no reliable way to know how the system use this
> 	 * bit.  So let's do it heuristically, assuming we are live in
> 	 * 1970...2069.
> 	 */
>
> As U-Boot's PCF8563 driver does not say it is supposed to support the RTC85> 64,
> make this driver compatible with Linux's by giving the opposite meaning to > the
> century bit.
>
> Signed-off-by: Beno?t Th?baudeau <benoit.thebaudeau@advansee.com>
> Cc: Wolfgang Denk <wd@denx.de>
> ---
>  .../drivers/rtc/pcf8563.c                          |    4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)

Applied, thanks.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
Shakespeare's Law of Prototyping: (Hamlet III, iv, 156-160)
        O, throw away the worser part of it,
        And live the purer with the other half.

      parent reply	other threads:[~2012-09-02 15:31 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-07-20 14:05 [U-Boot] [PATCH] rtc: pcf8563: Make century compatible with Linux Benoît Thébaudeau
2012-08-03 23:06 ` Benoît Thébaudeau
2012-08-10 14:40   ` Benoît Thébaudeau
2012-09-02 15:31 ` Wolfgang Denk [this message]

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=20120902153112.12343203B2F@gemini.denx.de \
    --to=wd@denx.de \
    --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