Received: by 2002:a05:7412:b130:b0:e2:908c:2ebd with SMTP id az48csp897569rdb; Fri, 17 Nov 2023 16:49:16 -0800 (PST) X-Google-Smtp-Source: AGHT+IEvtO1pEO+lK2XeTnC++cYqeymj4s7ge36Cb6rWWHw769ez4nEr/9iis2eLzKpNFO7PcLct X-Received: by 2002:a17:90b:1c87:b0:280:cd49:2548 with SMTP id oo7-20020a17090b1c8700b00280cd492548mr1192023pjb.6.1700268556155; Fri, 17 Nov 2023 16:49:16 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700268556; cv=none; d=google.com; s=arc-20160816; b=fbCgJslhI95uMg4RivpBUNrUAzalafSRAr1qPdJYUBY/Ya+MDHj1/C/DWras/ZnqMi d37WJ6GNQPNi8Noemr5P2HpwcVVyLJhC2duvEn/9dFqxJjitIL9kG/g01VhiBb3fdOOd TeTfhozJ2A5ZnA8QiVpWBBXMQ6UgV4P1K/zD/UZfStnHZienUzKrBiWp5wlF5AuDKoNx 7a7DUzzK3Ma5LoRu25n78KqV+bTfvNL82sgSWmsa0R5Ka713fa+VTFqJNVLM9kyR7CyX qHdQVfPH73ma5HZpiqT8nOg1I23Ge3mrBFxRDRhyr2eV46CKWfwNbABKi3B047/gHImb 6Ukg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:autocrypt :from:references:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=yJXzr0OE2tNPiyGJ3aKzCqrkEywUIhP19xPsryf4etM=; fh=ha2OjyEcq4rquDMMMzMrUyCeNveT4SS8zgXIz4tKSS8=; b=eZjYLCcCv17tLSVqIbyClYr5/QYv0ch5o8in1zoikIg3KKqL30HD73CbJNglw2Lqqn wWEJ4EVSJM6+89esDfr9MJRrXpVrwoTwW9u91XMejIXrsR3I007Lk3nY0sygiE4+vzzm eEXVpEdha7Yz106/lhSAREcgfh3c49alAkpBmmUWWZAZaWbAqWonHOwjqQm3Fo5DaOgY tL+9d0LNNvTDSYFXJyOZghETgzaHGToZe7P0U1Jp1M5+J6NFPh2qBVqBUL+3M5iWh6Mp 4Ed7Iju2PUAfWpF/SU2BUG3F2kddnR+e3lceMPpxeLhjhxvWAQduvZKv7ImlohYnY1MY 7cyQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=D2ZhqhFy; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from agentk.vger.email (agentk.vger.email. [23.128.96.32]) by mx.google.com with ESMTPS id lr18-20020a17090b4b9200b00274e5b20e65si3183971pjb.50.2023.11.17.16.49.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 17 Nov 2023 16:49:16 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) client-ip=23.128.96.32; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=D2ZhqhFy; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by agentk.vger.email (Postfix) with ESMTP id B05FB823787F; Fri, 17 Nov 2023 16:49:13 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346404AbjKRAtF (ORCPT + 99 others); Fri, 17 Nov 2023 19:49:05 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47160 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230036AbjKRAtE (ORCPT ); Fri, 17 Nov 2023 19:49:04 -0500 Received: from mail-lf1-x133.google.com (mail-lf1-x133.google.com [IPv6:2a00:1450:4864:20::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AD43BD7E for ; Fri, 17 Nov 2023 16:49:00 -0800 (PST) Received: by mail-lf1-x133.google.com with SMTP id 2adb3069b0e04-5098e423ba2so3661638e87.2 for ; Fri, 17 Nov 2023 16:49:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1700268539; x=1700873339; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:autocrypt:from:references:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=yJXzr0OE2tNPiyGJ3aKzCqrkEywUIhP19xPsryf4etM=; b=D2ZhqhFy2k22qdWyPiSYxVPXl16y1F+ceBW0mxtE8bDnXmcVP+N+H8eJ8kMe2ufOpG ZR3Npqf/gPntk6c+4w59EEzkURBD6EsAOsAXI7tqqSZRj1vOokOZKWyzt29W3XeURR2v VQ9qTrSgzLNeYoL/uZjxMJ/KRoM3ekeEdgCgDyqMm5FdpaCQKvAnwoKXu4MsTnN2nKBo oCUN9+GF6tqwq5wQZrQqDYjbStSMhAPckpjolj7PJ+OFDBP2LP5/vVe+PplHYh1r3gCx z/ssPJLwznalHA9sXUGyCpGJ+S2iwbdS32iraaA8aEnk2dCY+qOdmgBi9jbMxOFR+WGi 49Og== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1700268539; x=1700873339; h=content-transfer-encoding:in-reply-to:autocrypt:from:references:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=yJXzr0OE2tNPiyGJ3aKzCqrkEywUIhP19xPsryf4etM=; b=rC4coLwFFhwb5GI3AULWdurzmMF4Bby4mmYsKUn+BF/B89Aqdaje6pBusgEn2nB9OW xvEUc01zHdTSjc432toV2p8eF8P0pid9HKA394DQaTkKH57PKiD0hvQGp3Pfa4vE5321 zKg0zmEdvvZe3LxbWfxM6XT9e0eyEMXYRYv5zwEVfxhM0RaX2u3SZ30Fru8vU4+TzUOE ympRUe0N9o3nj5FdxwEg37ulqFij97omQquy0zu4tQPH6cOFpVtp2vkqepqNCVPaq4su oe7+19VRiZ0hdzfAfeFGhQ2dnkrkKXq2aiK9Z3/Q8D9MXJR6QjlF/ecMqlom6qLUSBxm mshA== X-Gm-Message-State: AOJu0Yy2FVGbBPq4hCcn66RYpR/cRJtHNv0k+HfBpTm9/TWByrScrIu3 /zzJlUn8EpNaIFMTNlcMuYTzfQ== X-Received: by 2002:a19:7616:0:b0:50a:a2cb:cd72 with SMTP id c22-20020a197616000000b0050aa2cbcd72mr719279lff.68.1700268538923; Fri, 17 Nov 2023 16:48:58 -0800 (PST) Received: from [192.168.201.100] (178235187040.dynamic-4-waw-k-2-3-0.vectranet.pl. [178.235.187.40]) by smtp.gmail.com with ESMTPSA id y2-20020a056402134200b0054873a656d0sm120563edw.45.2023.11.17.16.48.57 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 17 Nov 2023 16:48:58 -0800 (PST) Message-ID: <64a9d171-377c-48df-bdcd-1ac6d13c2da6@linaro.org> Date: Sat, 18 Nov 2023 01:48:55 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH] clk: qcom: gcc-msm8953: fix stuck gcc_usb30_master_clk Content-Language: en-US To: Stephen Boyd , Andy Gross , =?UTF-8?B?QmFybmFiw6FzIEN6w6ltw6Fu?= , Bjorn Andersson , Michael Turquette , linux-arm-msm@vger.kernel.org, linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org References: <20231002170021.192740-1-trabarni@gmail.com> <0eebfc14-dbcd-4987-9e94-ea5630b6c268@linaro.org> <07937184481af74c65108bae26526605.sboyd@kernel.org> From: Konrad Dybc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s5IDLAXmW8v3gIDWyIcgYqb2v8QO2Mqx YMqL7UZxVLul4/JbllsQB8F/fNI8AfttmAQL9cwo6C8yDTXKdho920W4WUR9k8NT/OBqWSyk bGqMHex48FVZhexNPYOd58EY9/7mL5u0sJmo+jTeb4JBgIbFPJCFyng4HwbniWgQJZ1WqaUC nas9J77uICis2WH7N8Bs9jy0wQYezNzqS+FxoNXmDQg2jetX8en4bO2Di7Pmx0jXA4TOb9TM izWDgYvmBE8= In-Reply-To: <07937184481af74c65108bae26526605.sboyd@kernel.org> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on agentk.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (agentk.vger.email [0.0.0.0]); Fri, 17 Nov 2023 16:49:13 -0800 (PST) On 24.10.2023 04:59, Stephen Boyd wrote: > Quoting Konrad Dybcio (2023-10-06 16:50:18) >> On 2.10.2023 19:00, Barnabás Czémán wrote: >>> According to downstream dwc3-msm source this clock has FSM dependency on >>> gcc_pcnoc_usb30_clk so enabling it would fail if latter isn't enabled. >>> This patch add works around this issue by changing parent of >>> gcc_usb30_master_clk to gcc_pcnoc_usb30_clk. This is acceptable because >>> both clocks have same parent and are branches/gates. >>> >>> Signed-off-by: Barnabás Czémán >>> --- >> "meh" >> >> There are multiple cases, especially with qcom, where there are some >> magic "dependencies" without parent-child relationship. The common >> clock framework doesn't currently have any good way to handle this, >> other than some mind gymnastics like you had to do here with matching >> them against a common parent/ancestor.. >> >> Stephen, what do you say? >> > > You can't change the parent to be not the actual parent. The consumer of > the branch probably wants to call clk_set_rate() on the branch and have > it propagate up to the parent to set the actual rate. Can the axi clk > simply be left enabled all the time? That seems simpler. Otherwise we > probably need to leave the axi clk control to the interconnect driver > and make sure drivers enable interconnects before enabling this branch. Yeah I'm almost inclined to think adding even more ifs to the icc driver will consume more power than just leaving the AXI hanging.. > > When things start to get this tangled I tend to think that we need to > remove control of the clk from the general drivers and put the logic to > control interconnects and clks into some SoC glue driver and expose a > single interface, like genpd power_on/power_off so that general drivers > can't get the sequence of steps wrong. Instead all they can do is "power > on" their device, and the SoC glue driver can do the proper sequence of > framework calls to power up the device. That too, given the structure of qcom SoCs, it should almost look like: xyznoc-bus { compatible = "simple-pm-bus"; clocks = <&gcc xyznoc_ahb>, <&gcc xyznoc_axi>; ... xyznoc-node@abcd {}; } etc. I've actually discussed this with Bjorn, but we came to a conclusion that it's not trivial to determine which peripheral lives on which NoC + many of them seem to sorta overlap more than one.. Konrad