From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932886AbcGIAqy (ORCPT ); Fri, 8 Jul 2016 20:46:54 -0400 Received: from smtp.codeaurora.org ([198.145.29.96]:56187 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932223AbcGIAqq (ORCPT ); Fri, 8 Jul 2016 20:46:46 -0400 Subject: Re: [PATCH v9 01/10] clk: fix initial state of critical clock's parents To: Michael Turquette , James Liao References: <1466581229-2342-1-git-send-email-erin.lo@mediatek.com> <1466581229-2342-2-git-send-email-erin.lo@mediatek.com> <20160702012140.GB17071@codeaurora.org> <1467604308.26485.4.camel@mtksdaap41> <146802073038.73491.6675612765998057903@resonance> Cc: Erin Lo , Matthias Brugger , Rob Herring , John Crispin , Arnd Bergmann , Sascha Hauer , Daniel Kurtz , Philipp Zabel , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-mediatek@lists.infradead.org, linux-clk@vger.kernel.org, srv_heupstream@mediatek.com From: Stephen Boyd Message-ID: <57804973.4050306@codeaurora.org> Date: Fri, 8 Jul 2016 17:46:43 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.8.0 MIME-Version: 1.0 In-Reply-To: <146802073038.73491.6675612765998057903@resonance> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 07/08/2016 04:32 PM, Michael Turquette wrote: > --- > drivers/clk/clk.c | 10 ++++++++-- > 1 file changed, 8 insertions(+), 2 deletions(-) > > diff --git a/drivers/clk/clk.c b/drivers/clk/clk.c > index 820a939fb6bb..70efe4c4e0cc 100644 > --- a/drivers/clk/clk.c > +++ b/drivers/clk/clk.c > @@ -2449,8 +2449,14 @@ static int __clk_core_init(struct clk_core *core) > hlist_for_each_entry_safe(orphan, tmp2, &clk_orphan_list, child_node) { > struct clk_core *parent = __clk_init_parent(orphan); > > - if (parent) > - clk_core_reparent(orphan, parent); > + /* > + * we could call __clk_set_parent, but that would result in a > + * reducant call to the .set_rate op, if it exists Did you mean .set_parent op? > + */ > + if (parent) { > + __clk_set_parent_before(orphan, parent); > + __clk_set_parent_after(orphan, parent, NULL); > + } > } > > /* -- Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a Linux Foundation Collaborative Project