From: Chanwoo Choi <cw00.choi@samsung.com>
To: Marek Szyprowski <m.szyprowski@samsung.com>
Cc: linux-kernel@vger.kernel.org, rtc-linux@googlegroups.com,
Kyungmin Park <kyungmin.park@samsung.com>,
Alessandro Zummo <a.zummo@towertech.it>,
Kukjin Kim <kgene.kim@samsung.com>
Subject: Re: [PATCH] drivers: rtc: fix s3c-rtc initialization failure without rtc source clock
Date: Thu, 16 Oct 2014 11:25:36 +0900 [thread overview]
Message-ID: <543F2CA0.3080703@samsung.com> (raw)
In-Reply-To: <1413372446-28541-1-git-send-email-m.szyprowski@samsung.com>
On 10/15/2014 08:27 PM, Marek Szyprowski wrote:
> This patch fixes unconditional initialization failure on non-exynos3250
> SoCs. Commit df9e26d093d33a097c5558aab017dd2f540ccfe5 ("rtc: s3c: add support for RTC of Exynos3250 SoC") introduced rtc source clock support,
> but also added initialization failure on SoCs, which doesn't need such
> clock.
>
> Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
> ---
> drivers/rtc/rtc-s3c.c | 14 ++++++++------
> 1 file changed, 8 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/rtc/rtc-s3c.c b/drivers/rtc/rtc-s3c.c
> index a6b1252c9941..806072238c00 100644
> --- a/drivers/rtc/rtc-s3c.c
> +++ b/drivers/rtc/rtc-s3c.c
> @@ -535,13 +535,15 @@ static int s3c_rtc_probe(struct platform_device *pdev)
> }
> clk_prepare_enable(info->rtc_clk);
>
> - info->rtc_src_clk = devm_clk_get(&pdev->dev, "rtc_src");
> - if (IS_ERR(info->rtc_src_clk)) {
> - dev_err(&pdev->dev, "failed to find rtc source clock\n");
> - return PTR_ERR(info->rtc_src_clk);
> + if (info->data->needs_src_clk) {
> + info->rtc_src_clk = devm_clk_get(&pdev->dev, "rtc_src");
> + if (IS_ERR(info->rtc_src_clk)) {
> + dev_err(&pdev->dev,
> + "failed to find rtc source clock\n");
> + return PTR_ERR(info->rtc_src_clk);
> + }
> + clk_prepare_enable(info->rtc_src_clk);
> }
> - clk_prepare_enable(info->rtc_src_clk);
> -
>
> /* check to see if everything is setup correctly */
> if (info->data->enable)
>
Reviewed-by: Chanwoo Choi <cw00.choi@samsung.com>
Thanks,
Chanwoo Choi
prev parent reply other threads:[~2014-10-16 2:25 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-10-15 11:27 [PATCH] drivers: rtc: fix s3c-rtc initialization failure without rtc source clock Marek Szyprowski
2014-10-16 2:25 ` Chanwoo Choi [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=543F2CA0.3080703@samsung.com \
--to=cw00.choi@samsung.com \
--cc=a.zummo@towertech.it \
--cc=kgene.kim@samsung.com \
--cc=kyungmin.park@samsung.com \
--cc=linux-kernel@vger.kernel.org \
--cc=m.szyprowski@samsung.com \
--cc=rtc-linux@googlegroups.com \
/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.