From: kgene.kim@samsung.com (Kukjin Kim)
To: linux-arm-kernel@lists.infradead.org
Subject: [rtc-linux] [PATCH 3/3] rtc: rtc-s3c: Add BCD register initialization codes
Date: Tue, 27 Jul 2010 22:11:53 +0900 [thread overview]
Message-ID: <001501cb2d8d$4abfbef0$e03f3cd0$%kim@samsung.com> (raw)
In-Reply-To: <AANLkTimMaNp4JN+f-A=NpuchSfDaTnKBcCeBdjkR8rm1@mail.gmail.com>
Wan ZongShun wrote:
>
> 2010/7/23 Kukjin Kim <kgene.kim@samsung.com>:
> > Wan ZongShun wrote:
> >>
> >> 2010/7/21 Kukjin Kim <kgene.kim@samsung.com>:
> >> > From: Taekgyun Ko <taeggyun.ko@samsung.com>
> >> >
> >> > RTC needs to be initialized when BCD registers have invalid value.
> >>
> >> Do you mean that the hardware register does not have default value?
> >> Any results if no initialized value here?
> >>
> > Hi,
> >
> > Yes..I mean that it has no default value.
> > As you know, it has to be keep the previous time value after reset..and the reset
> value is not defined.
> >
>
> So, reset is no use to this RTC BCD registers, it still keep previous
> time value.
>
> > So added check that functionality, because if it has no valid BCD value, RTC
> time does not move on.
> > Of course, if we set time at that time, RTC works well...I mean just need initialize
> that.
> >
>
> Okay,good patch.:)
>
Thanks ;-)
> In addtion,For making sure to get valid value, it is much better to
> use also 'rtc_valid_tm(tm)' to check returning time value in your
> s3c_rtc_gettime() and s3c_rtc_getalarm(() functions.
>
Ok..will do it later as per your suggestion.
>
> >> >
> >> > Signed-off-by: Taekgyun Ko <taeggyun.ko@samsung.com>
> >> > Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
> >> > ---
> >> > drivers/rtc/rtc-s3c.c | 14 ++++++++++++--
> >> > 1 files changed, 12 insertions(+), 2 deletions(-)
> >> >
(snip)
Thanks.
Best regards,
Kgene.
--
Kukjin Kim <kgene.kim@samsung.com>, Senior Engineer,
SW Solution Development Team, Samsung Electronics Co., Ltd.
next prev parent reply other threads:[~2010-07-27 13:11 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-07-21 8:57 [PATCH 0/3] Updates RTC driver for Samsung S3C64XX and newer SoCs Kukjin Kim
2010-07-21 8:57 ` [PATCH 1/3] ARM: SAMSUNG: Updates RTC register for support Alarm IRQ and Time Tick Kukjin Kim
2010-07-21 8:57 ` [PATCH 2/3] rtc: rtc-s3c: Updates driver for S3C64XX and newer SoCs Kukjin Kim
2010-07-21 8:57 ` [PATCH 3/3] rtc: rtc-s3c: Add BCD register initialization codes Kukjin Kim
2010-07-21 14:42 ` Sergei Shtylyov
2010-07-23 7:04 ` Kukjin Kim
2010-07-22 1:50 ` [rtc-linux] " Wan ZongShun
2010-07-23 7:34 ` Kukjin Kim
2010-07-23 9:28 ` Wan ZongShun
2010-07-27 13:11 ` Kukjin Kim [this message]
2010-07-28 18:17 ` Ben Dooks
2010-07-29 1:55 ` Kukjin Kim
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='001501cb2d8d$4abfbef0$e03f3cd0$%kim@samsung.com' \
--to=kgene.kim@samsung.com \
--cc=linux-arm-kernel@lists.infradead.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).