[PATCH 13/13] SPEAr: Call clk_prepare() before calling clk_enable

Turquette, Mike mturquette at ti.com
Thu Apr 19 14:56:09 EDT 2012


On Wed, Apr 18, 2012 at 6:36 PM, viresh kumar <viresh.linux at gmail.com> wrote:
>
> On Apr 19, 2012 2:47 AM, "Turquette, Mike" <mturquette at ti.com> wrote:
>>
>> On Tue, Apr 17, 2012 at 4:15 AM, Viresh Kumar <viresh.kumar at st.com> wrote:
>> > With common clock framework, it is must to call clk_{un}prepare()
>> > before/after
>> > clk_{dis}enable. This patch fixes this for SPEAr timer.
>> >
>> > Signed-off-by: Viresh Kumar <viresh.kumar at st.com>
>> > ---
>> >  arch/arm/plat-spear/time.c |    8 ++++----
>> >  1 files changed, 4 insertions(+), 4 deletions(-)
>> >
>> > diff --git a/arch/arm/plat-spear/time.c b/arch/arm/plat-spear/time.c
>> > index a3164d1..4f05d26 100644
>> > --- a/arch/arm/plat-spear/time.c
>> > +++ b/arch/arm/plat-spear/time.c
>> > @@ -218,10 +218,10 @@ void __init spear_setup_timer(resource_size_t
>> > base, int irq)
>> >                goto err_iomap;
>> >        }
>> >
>> > -       ret = clk_enable(gpt_clk);
>> > +       ret = clk_prepare_enable(gpt_clk);
>>
>> Where do you call clk_enable?  Further down in the code somewhere?
>
> I called prepare_enable() here.
> Did i get your question correctly?

My mistake.  When I glanced over the code I saw "clk_prepare" and
somehow skipped the "_enable" part.

Regards,
Mike

>> Also does this change break git bisect for your platform?  Maybe you
>> should move this change before patch 12/13 to prevent run-time
>> breakage?
>
> Correct.
>
> --
> Viresh



More information about the linux-arm-kernel mailing list