Received: by 2002:ac0:946b:0:0:0:0:0 with SMTP id j40csp285838imj; Sat, 16 Feb 2019 00:00:34 -0800 (PST) X-Google-Smtp-Source: AHgI3IajwcsIfdzxBo/1NY+RMfXZJnoKYHhQb+MDpwlBFiASfJQV+uk8J5eb+OWNg26tIUicOi3/ X-Received: by 2002:a63:31d0:: with SMTP id x199mr9289967pgx.182.1550304034620; Sat, 16 Feb 2019 00:00:34 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1550304034; cv=none; d=google.com; s=arc-20160816; b=hpIqT2CPQI+1O1R/Plb4irhEGvZmQ41nDav4TDwZsKrcL/w7HSeTHDfC8tkwpMATy4 /WgvQh5HVaDZC3T+202SqHo93puu2r3m6ckSvNDpu2zrpf5WuHn3HlOvVKM74cBsx5Ma GWXl1TzZlgVsHDfemk8rjep72EzbvWmRs+2yYnqHSVRILbQ9nYMFaVUmDViqsDiBqNHu Ke1ZNks2iYmKL+JSJKcZycgPkylJWSjqqfb9XPLwe4hZx4jkt1VBAP+bE8GGUInK+jfR 8+h/RlODSwajv/5HbgpsTslofn2IpHS8E2GNzGChVaS6/Fx8hFmd3XhFLiWWUQluPG/k uF5A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dmarc-filter :dkim-signature:dkim-signature; bh=XH5HcoxvJtgr3qvmLo1hNaEG6HjQpF85UNihruSbHjg=; b=P26PZbLZsijrbCzEvgcwhmFcwa49uQsTXAKhS0sex/t8WcTOm94uq/RmfjartUq1+a wN7RTZ4PGfQ6bzqd7JJV+GAXcLPcwC1Q36b3MTlISv27kOMbG9EzbKUOnK+gxCmTaz/B azoBAgMrwaTUnejumsQdH1Rq8LM9h4W8IaIQ8n4MB+ClgYrrqae8mBQTW7rTBmfGrb/s qevUBc2lmjwWkjiNEf76K3wD0nSBybnzh7PH+mOzewDvX8SNaYsBWwE0nYT277JEzjLw BbuDfYmUYuPv8ZTAHiZCoDhacmAz2/mudGxHyG4vIEYgu3cxK+14XEsE62OF+sBKEavt Fl2w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@codeaurora.org header.s=default header.b=OBIZh2NH; dkim=pass header.i=@codeaurora.org header.s=default header.b=L33Ba0dS; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f11si7545860plo.254.2019.02.16.00.00.18; Sat, 16 Feb 2019 00:00:34 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@codeaurora.org header.s=default header.b=OBIZh2NH; dkim=pass header.i=@codeaurora.org header.s=default header.b=L33Ba0dS; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2392270AbfBOVex (ORCPT + 99 others); Fri, 15 Feb 2019 16:34:53 -0500 Received: from smtp.codeaurora.org ([198.145.29.96]:58848 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728755AbfBOVew (ORCPT ); Fri, 15 Feb 2019 16:34:52 -0500 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id 8D06460740; Fri, 15 Feb 2019 21:34:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1550266491; bh=iINz1J/kWeXA8OIScImdjmAqVvGyFD8fIdrQ0CUopQs=; h=Subject:To:Cc:References:From:Date:In-Reply-To:From; b=OBIZh2NHUYXYDHx961KmuAGuma6iC/jq8gWaL41DHTvP2ATU13ZM82gz1lrQUq1Gk lCLyuedKJVWnuYUXRMSQO9dYGg7iXf0isf+3agn8wVtCK7/6n6tMAXUFqf18ENObBm tibIYKhNShgTYlm5E3gIhC8A5QVgbYTI5nn1KxAk= X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on pdx-caf-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.7 required=2.0 tests=ALL_TRUSTED,BAYES_00, DKIM_INVALID,DKIM_SIGNED autolearn=no autolearn_force=no version=3.4.0 Received: from [10.226.60.81] (i-global254.qualcomm.com [199.106.103.254]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: jhugo@smtp.codeaurora.org) by smtp.codeaurora.org (Postfix) with ESMTPSA id 2744860709; Fri, 15 Feb 2019 21:34:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1550266490; bh=iINz1J/kWeXA8OIScImdjmAqVvGyFD8fIdrQ0CUopQs=; h=Subject:To:Cc:References:From:Date:In-Reply-To:From; b=L33Ba0dSDLM9f3k4fFNLzhgUQIZyic3VCYKs0LNAggPm1taI68wA60nV9LTX3w9k4 j/LdcWDRgVb6qSWMZ7D+aR8gc04KYTowQq0pk7OPpI9/TV+wES+iL9+vElr0hk4Q1I 3+M1vTxoG7xl66muUCgMF9uDiWkz0qf8oWqXmsfs= DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 2744860709 Authentication-Results: pdx-caf-mail.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: pdx-caf-mail.web.codeaurora.org; spf=none smtp.mailfrom=jhugo@codeaurora.org Subject: Re: [PATCH 2/9] clk: Introduce get_parent_hw clk op To: Stephen Boyd , Michael Turquette Cc: linux-kernel@vger.kernel.org, linux-clk@vger.kernel.org, Miquel Raynal , Jerome Brunet , Russell King References: <20190129061021.94775-1-sboyd@kernel.org> <20190129061021.94775-3-sboyd@kernel.org> <41f8f325-2738-3995-1fc8-354a9412041e@codeaurora.org> <155025643198.115909.9355230466710329335@swboyd.mtv.corp.google.com> <488f5033-c7a5-b49b-b973-c1415e533019@codeaurora.org> <155026616459.115909.14315694127255521155@swboyd.mtv.corp.google.com> From: Jeffrey Hugo Message-ID: Date: Fri, 15 Feb 2019 14:34:48 -0700 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.4.0 MIME-Version: 1.0 In-Reply-To: <155026616459.115909.14315694127255521155@swboyd.mtv.corp.google.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2/15/2019 2:29 PM, Stephen Boyd wrote: > Quoting Jeffrey Hugo (2019-02-15 11:29:26) >> On 2/15/2019 11:47 AM, Stephen Boyd wrote: >>> Quoting Jeffrey Hugo (2019-02-11 08:09:00) >>>> On 1/28/2019 11:10 PM, Stephen Boyd wrote: >>>> >>>>> +static int clk_init_parent(struct clk_core *core) >>>>> +{ >>>>> + core->parent = __clk_init_parent(core, true); >>>>> + if (IS_ERR(core->parent)) >>>>> + return PTR_ERR(core->parent); >>>>> + >>>>> + /* >>>>> + * Populate core->parent if parent has already been clk_core_init'd. If >>>>> + * parent has not yet been clk_core_init'd then place clk in the orphan >>>>> + * list. If clk doesn't have any parents then place it in the root >>>>> + * clk list. >>>>> + * >>>>> + * Every time a new clk is clk_init'd then we walk the list of orphan >>>>> + * clocks and re-parent any that are children of the clock currently >>>>> + * being clk_init'd. >>>>> + */ >>>>> + if (core->parent) { >>>>> + hlist_add_head(&core->child_node, >>>>> + &core->parent->children); >>>>> + core->orphan = core->parent->orphan; >>>>> + } else if (!core->num_parents) { >>>>> + hlist_add_head(&core->child_node, &clk_root_list); >>>>> + core->orphan = false; >>>>> + } else { >>>>> + hlist_add_head(&core->child_node, &clk_orphan_list); >>>> >>>> Missing "core->orphan = true;"? >>>> The snippet below had that line. Its not clear why it appears to be >>>> dropped here. >>>> >>> >>> Hmm. Weird. I think I may have been getting ahead of myself and moving >>> the orphan updating code into __clk_init_parent(). I can't remember why >>> though, so I guess I'll go all the way and move it all into >>> __clk_init_parent() now. Thanks for pointing it out. >>> >> >> No problem. >> >> Just FYI, I've rebased the 8998 mmcc series on top of this, and as far >> as I can tell, everything seems to be working great. >> > > Cool. Are you using the new way to specify parents or have you > maintained the previous design of using string names for parents? > I fully converted to the new way, although I did it in stages, so both paths got tested during the conversion. I plan on posting v2 next week. -- Jeffrey Hugo Qualcomm Datacenter Technologies as an affiliate of Qualcomm Technologies, Inc. Qualcomm Technologies, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project.