From: sshtylyov@mvista.com (Sergei Shtylyov)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 3/3] rtc: rtc-s3c: Add BCD register initialization codes
Date: Wed, 21 Jul 2010 18:42:20 +0400 [thread overview]
Message-ID: <4C47074C.703@ru.mvista.com> (raw)
In-Reply-To: <1279702666-13021-4-git-send-email-kgene.kim@samsung.com>
Hello.
Kukjin Kim wrote:
> From: Taekgyun Ko <taeggyun.ko@samsung.com>
> RTC needs to be initialized when BCD registers have invalid value.
> Signed-off-by: Taekgyun Ko <taeggyun.ko@samsung.com>
> Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
[...]
> diff --git a/drivers/rtc/rtc-s3c.c b/drivers/rtc/rtc-s3c.c
> index 2040017..e96e109 100644
> --- a/drivers/rtc/rtc-s3c.c
> +++ b/drivers/rtc/rtc-s3c.c
> @@ -536,10 +536,20 @@ static int __devinit s3c_rtc_probe(struct platform_device *pdev)
>
> s3c_rtc_cpu_type = platform_get_device_id(pdev)->driver_data;
>
> - if (s3c_rtc_cpu_type == TYPE_S3C64XX)
> + if (s3c_rtc_cpu_type == TYPE_S3C64XX) {
> rtc->max_user_freq = 32768;
> - else
> +
> + /* Check RTC Time */
> +
> + for (i = S3C2410_RTCSEC; i <= S3C2410_RTCYEAR; i += 0x4) {
> + tmp = readb(s3c_rtc_base + i);
> +
> + if (((tmp & 0xf) > 0x9) || (((tmp >> 4) & 0xf) > 0x9))
There is no need to have parens around > operations.
WBR, Sergei
next prev parent reply other threads:[~2010-07-21 14:42 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 [this message]
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
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=4C47074C.703@ru.mvista.com \
--to=sshtylyov@mvista.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).