Received: by 2002:a25:7ec1:0:0:0:0:0 with SMTP id z184csp2776293ybc; Mon, 25 Nov 2019 04:05:49 -0800 (PST) X-Google-Smtp-Source: APXvYqzTVF+BPQjquUDQXiZW98dk52X+QPEe87MqEwRxCg4rD1FG49Agp/mSS4CqaIJFz7z4kbqf X-Received: by 2002:a50:ec89:: with SMTP id e9mr18173178edr.104.1574683549105; Mon, 25 Nov 2019 04:05:49 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1574683549; cv=none; d=google.com; s=arc-20160816; b=TxCABnl5ZKRCdywR2UrA0xI+qzHTZgBRDhm1UNPTWZamwCDjf6NxhmPc+LKH6uKamn Ws3CR43tWxG4GHS/TCH5Ssfn63EiSay6P+VoDO9gJapcXEocsxkq2jHKYqVbwvh9gby+ l+xlLqXFCv+olvxzGV38U2+tonaLbV6KoIlOtebuUyw6AdpWjRA5JrtmY4ZL7nYoVq0I fi41H/0xHypxtLUlxRTSgXmAKt8VI3jXhfBQKAdCz/6Bew6pqOfiAAIHJC1pwkyYFm4y qItD5FVg0AaZ8o+nrv2xuob4EesfKR4kUcbAe/EtGpvL6gbfBAO4UwtBtlf0uToK0Z3L xamA== 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; bh=2lioAcTKRt4OY7QKyYpeTRLU4WYBJKic1EIEideLPkw=; b=jnuAb0lBzxIux5a4A5j6vOApvhLV2qjOIWE2GgCVY57HvCnRSUpknf+qVJuKHj8NTA CRT8AphAqwKutkE5SKMgSMKfn49/fKKYFKXyW4x8ewExXsCqRTmT0bu5KeTHMkG2auYd KdvLiJaMqJU6T8PToB+DNj+4kTDtm4TJywzH0acQS7TgIs14eX9uR+jviwZyTsSMxa+i YX7v2aLMvwWiD7I6KdQBSdp3hLcPl4rtMYEoQvA9YQOL2TQ+OD8GZsm7wZSTHJ7eQz9V rNfc8qZSK9ik623/h+pUdbEBW8nzV3md5+sVrsljht/HBK0mBwTXuLB7bYBvUuScThWx tyOw== ARC-Authentication-Results: i=1; mx.google.com; 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 g7si4896174edq.134.2019.11.25.04.05.24; Mon, 25 Nov 2019 04:05:49 -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; 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 S1727309AbfKYMBf (ORCPT + 99 others); Mon, 25 Nov 2019 07:01:35 -0500 Received: from mail-sz.amlogic.com ([211.162.65.117]:63357 "EHLO mail-sz.amlogic.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726980AbfKYMBf (ORCPT ); Mon, 25 Nov 2019 07:01:35 -0500 Received: from [10.28.39.99] (10.28.39.99) by mail-sz.amlogic.com (10.28.11.5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1591.10; Mon, 25 Nov 2019 20:01:56 +0800 Subject: Re: [PATCH v2 3/3] clk: meson: a1: add support for Amlogic A1 clock driver To: Jerome Brunet , Neil Armstrong CC: Kevin Hilman , Rob Herring , Martin Blumenstingl , Michael Turquette , Stephen Boyd , Qiufang Dai , Jianxin Pan , Victor Wan , Chandle Zou , , , , References: <1571382865-41978-1-git-send-email-jian.hu@amlogic.com> <1571382865-41978-4-git-send-email-jian.hu@amlogic.com> <1jsgnmba1a.fsf@starbuckisacylon.baylibre.com> <49b33e94-910b-3fd9-4da1-050742d07e93@amlogic.com> <1jblts3v7e.fsf@starbuckisacylon.baylibre.com> <1jh839f2ue.fsf@starbuckisacylon.baylibre.com> <20d04452-fc63-9e9e-220f-146b493a860f@amlogic.com> <1695e9b0-1730-eef6-491d-fe90ac897ee9@amlogic.com> <1jtv6yftmm.fsf@starbuckisacylon.baylibre.com> <9e652ed1-384e-f630-f2a4-0aa4486df577@amlogic.com> <1j7e3oqn36.fsf@starbuckisacylon.baylibre.com> From: Jian Hu Message-ID: <9ec317e8-136e-1ab4-4e9b-21210e7f3e05@amlogic.com> Date: Mon, 25 Nov 2019 20:01:56 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.9.1 MIME-Version: 1.0 In-Reply-To: <1j7e3oqn36.fsf@starbuckisacylon.baylibre.com> Content-Type: text/plain; charset="windows-1252"; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Originating-IP: [10.28.39.99] X-ClientProxiedBy: mail-sz.amlogic.com (10.28.11.5) To mail-sz.amlogic.com (10.28.11.5) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2019/11/25 18:14, Jerome Brunet wrote: > > On Thu 21 Nov 2019 at 04:21, Jian Hu wrote: > >> Hi, Jerome >> >> On 2019/11/20 23:35, Jerome Brunet wrote: >>> >>> On Wed 20 Nov 2019 at 10:28, Jian Hu wrote: >>> >>>> Hi, jerome >>>> >>>> Is there any problem about fixed_pll_dco's parent_data? >>>> >>>> Now both name and fw_name are described in parent_data. >>> >>> Yes, there is a problem. This approach is incorrect, as I've tried to >>> explain a couple times already. Let me try to re-summarize why this >>> approach is incorrect. >>> >>> Both fw_name and name should be provided when it is possible that >>> the DT does not describe the input clock. IOW, it is only for controllers >>> which relied on the global name so far and are now starting to describe >>> the clock input in DT >>> >>> This is not your case. >>> Your controller is new and DT will have the correct >>> info >>> >>> You are trying work around an ordering issue by providing both fw_name >>> and name. This is not correct and I'll continue to nack it. >>> >>> If the orphan clock is not reparented as you would expect, I suggest you >>> try to look a bit further at how the reparenting of orphans is done in >>> CCF and why it does not match your expectation. >>> >> I have debugged the handle for orphan clock in CCF, Maybe you are missing >> the last email. > > Nope, got it the first time > >> Even though the clock index exit, it will get failed for the orphan clock's >> parent clock due to it has not beed added to the provider. > > If the provider is not registered yet, of course any query to it won't > work. This why I have suggested to this debug *further* : > > * Is the orphan reparenting done when a new provider is registered ? > * If not, should it be done ? is this your problem ? > Yes, the orphan reparenting is done when the new provider is registered. Reparenting the orphan will be done when each clock is registered by devm_clk_hw_register. And at this time the provider has not been registered. After all clocks are registered by devm_clk_hw_register, the provider will be registered by devm_of_clk_add_hw_provider. Reparenting the orphan will fail when fw_name is added alone, the couse is that devm_clk_hw_register is always running ahead of devm_of_clk_add_hw_provider. That is why it will failed to get parent for the orphan clock. > > . >