linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: heiko@sntech.de (Heiko Stübner)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 6/7] ARM: SAMSUNG: use clk_prepare_enable in samsung-time
Date: Thu, 14 Mar 2013 00:16:34 +0100	[thread overview]
Message-ID: <201303140016.35152.heiko@sntech.de> (raw)
In-Reply-To: <CADTbHxq-gxoN9HKkjPsZ5uBt7PhrvO8XdQdmAyscOA+xPy9Z7A@mail.gmail.com>

Hi,

Am Mittwoch, 13. M?rz 2013, 17:59:04 schrieb Pankaj Jangra:
> Hi,
> 
> On Tue, Mar 12, 2013 at 6:15 AM, Heiko St?bner <heiko@sntech.de> wrote:
> > The common clock framework expects clocks to be prepared
> > before they are enabled.
> > 
> > Signed-off-by: Heiko Stuebner <heiko@sntech.de>
> > ---
> > 
> >  arch/arm/plat-samsung/samsung-time.c |    6 +++---
> >  1 files changed, 3 insertions(+), 3 deletions(-)
> > 
> > diff --git a/arch/arm/plat-samsung/samsung-time.c
> > b/arch/arm/plat-samsung/samsung-time.c index f899cbc..6ebb851 100644
> > --- a/arch/arm/plat-samsung/samsung-time.c
> > +++ b/arch/arm/plat-samsung/samsung-time.c
> > @@ -355,7 +355,7 @@ static void __init samsung_timer_resources(void)
> > 
> >         if (IS_ERR(timerclk))
> >         
> >                 panic("failed to get timers clock for timer");
> 
> Also how about calling the clk_prepare_enable() only if the clk_get()
> call is a sucess? Though clk framework will take care of it. Just
> thinking even to avoid that call if clk_get() fails since you are
> modifying the code.

I remember there was a discussion about panic vc error handling when this was 
introduced but I don't remember the specifics, but it seems they agreed to do 
it this way with letting the kernel panic when the clock is missing.


Also the current plan seems to replace the clocksource and pwm drivers that 
occupy the same register space with a driver handling both, making the pwm 
specific clocks obsolete and only the timers clock will remain. So this was 
merely meant as a fixup when using the clock changes with the current 
clocksource code.


> > -       clk_enable(timerclk);
> > +       clk_prepare_enable(timerclk);
> > 
> >         sprintf(devname, "s3c24xx-pwm.%lu", event_id);
> >         s3c_device_timer[event_id].id = event_id;
> > 
> > @@ -369,7 +369,7 @@ static void __init samsung_timer_resources(void)
> > 
> >         if (IS_ERR(tdiv_event))
> >         
> >                 panic("failed to get pwm-tdiv clock for event timer");
> 
> Same here...
> 
> > -       clk_enable(tin_event);
> > +       clk_prepare_enable(tin_event);
> > 
> >         sprintf(devname, "s3c24xx-pwm.%lu", source_id);
> 
> Regards,
> Pankaj Jangra

  reply	other threads:[~2013-03-13 23:16 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-03-12  0:41 [PATCH 0/7] ARM: S3C24XX: Convert S3C2416 to common clock framework Heiko Stübner
2013-03-12  0:42 ` [PATCH 1/7] clk: samsung: add plls used in s3c2416 and s3c2443 Heiko Stübner
2013-03-12 11:27   ` Russell King - ARM Linux
2013-03-12 12:10   ` Sylwester Nawrocki
2013-03-12 12:21     ` Heiko Stübner
2013-03-12 13:17       ` Sylwester Nawrocki
2013-03-12  0:42 ` [PATCH 2/7] ARM: S3C24XX: add soc_is_s3c2416 and soc_is_s3c2443 Heiko Stübner
2013-03-12  0:43 ` [PATCH 3/7] ARM: S3C24XX: enable legacy clock code only when SAMSUNG_CLOCK selected Heiko Stübner
2013-03-12  0:43 ` [PATCH 4/7] clk: samsung: add clock-driver for s3c2416, s3c2443 and s3c2450 Heiko Stübner
2013-03-12  0:44 ` [PATCH 5/7] DO_NOT_APPLY: add clock driver for Samsung pwm clocks Heiko Stübner
2013-03-12  0:45 ` [PATCH 6/7] ARM: SAMSUNG: use clk_prepare_enable in samsung-time Heiko Stübner
2013-03-13 16:59   ` Pankaj Jangra
2013-03-13 23:16     ` Heiko Stübner [this message]
2013-03-12  0:46 ` [PATCH 7/7] DO_NOT_APPLY: convert s3c2416 to use the common clock framework Heiko Stübner

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=201303140016.35152.heiko@sntech.de \
    --to=heiko@sntech.de \
    --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).