From: Robert Reif <reif@earthlink.net>
To: sparclinux@vger.kernel.org
Subject: Re: [PATCH] rtc-m48t59: fix setting of a year on m48t08 and m48t02
Date: Wed, 10 Sep 2008 02:07:47 +0000 [thread overview]
Message-ID: <48C72BF3.4070606@earthlink.net> (raw)
In-Reply-To: <20080904185704.e5c9d1fc.krzysztof.h1@poczta.fm>
[-- Attachment #1: Type: text/plain, Size: 305 bytes --]
Krzysztof Helt wrote:
> From: Krzysztof Helt <krzysztof.h1@wp.pl>
>
> Fix setting of a year in m48t08 and m48t02 clocks.
> They do not have century bits and setting them
> causes the year to overflow (bit 0x80 set).
>
I think this fix is also needed.
Signed-off-by: Robert Reif <reif@earthlink.net>
[-- Attachment #2: rtc.diff.txt --]
[-- Type: text/plain, Size: 591 bytes --]
diff --git a/drivers/rtc/rtc-m48t59.c b/drivers/rtc/rtc-m48t59.c
index 761e9d7..ce4eff6 100644
--- a/drivers/rtc/rtc-m48t59.c
+++ b/drivers/rtc/rtc-m48t59.c
@@ -82,7 +82,8 @@ static int m48t59_rtc_read_time(struct device *dev, struct rtc_time *tm)
tm->tm_mday = BCD2BIN(M48T59_READ(M48T59_MDAY));
val = M48T59_READ(M48T59_WDAY);
- if ((val & M48T59_WDAY_CEB) && (val & M48T59_WDAY_CB)) {
+ if ((pdata->type == M48T59RTC_TYPE_M48T59) &&
+ (val & M48T59_WDAY_CEB) && (val & M48T59_WDAY_CB)) {
dev_dbg(dev, "Century bit is enabled\n");
tm->tm_year += 100; /* one century */
}
next prev parent reply other threads:[~2008-09-10 2:07 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-09-04 16:57 [PATCH] rtc-m48t59: fix setting of a year on m48t08 and m48t02 rtcs Krzysztof Helt
2008-09-08 1:26 ` [PATCH] rtc-m48t59: fix setting of a year on m48t08 and m48t02 David Miller
2008-09-10 2:07 ` Robert Reif [this message]
2008-09-10 2:30 ` David Miller
2008-09-10 2:30 ` David Miller
2008-09-10 2:38 ` David Miller
2008-09-10 5:16 ` Krzysztof Helt
2008-09-10 10:53 ` Robert Reif
2008-09-11 10:04 ` [PATCH] rtc-m48t59: fix setting of a year on m48t08 and m48t02 rtcs Alexander Beregalov
2008-09-13 10:33 ` [PATCH] rtc-m48t59: fix setting of a year on m48t08 and m48t02 Krzysztof Helt
2008-10-03 20:38 ` [PATCH] rtc-m48t59: fix setting of a year on m48t08 and m48t02 rtcs Alexander Beregalov
2008-10-04 10:27 ` krzysztof.h1
2008-10-04 11:26 ` Alexander Beregalov
2008-10-07 21:39 ` [PATCH] rtc-m48t59: fix setting of a year on m48t08 and m48t02 Krzysztof Helt
2008-10-07 21:40 ` David Miller
2008-10-13 20:51 ` Krzysztof Helt
2008-10-13 22:12 ` [PATCH] rtc-m48t59: fix setting of a year on m48t08 and m48t02 rtcs Alexander Beregalov
2008-10-19 14:12 ` [PATCH] rtc-m48t59: fix setting of a year on m48t08 and m48t02 Krzysztof Helt
2008-10-19 22:17 ` [PATCH] rtc-m48t59: fix setting of a year on m48t08 and m48t02 rtcs Alexander Beregalov
2008-10-19 23:31 ` Alexander Beregalov
2008-10-23 17:32 ` [PATCH] rtc-m48t59: fix setting of a year on m48t08 and m48t02 Krzysztof Helt
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=48C72BF3.4070606@earthlink.net \
--to=reif@earthlink.net \
--cc=sparclinux@vger.kernel.org \
/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.