Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp1449060iob; Thu, 5 May 2022 01:13:17 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz4jpZdpu6fAWL/QgVhOh7UGVfZEh+CkmKS671mKg5+g+KcprRxfihsjFZjp7jVE4AfbVa0 X-Received: by 2002:a63:d145:0:b0:3c1:4ba0:d890 with SMTP id c5-20020a63d145000000b003c14ba0d890mr20936876pgj.607.1651738396848; Thu, 05 May 2022 01:13:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1651738396; cv=none; d=google.com; s=arc-20160816; b=RknvxdqCHuD3HKDWjh3zhmrNc3TT10egjlNw8vyGOSgOV/V0i+OO7hdRfny+O0gvgi QmulydSoozJKZe84MZT5hy3+ULrhC3XvzYzV17vj0GYTJe8tgZRPTbiZhpTyDBiQkE4Y bn0t4dAb6klTW8IADqnksinG0oyUDMsn324gacgakbimvv/oh6BUuO/EqiMcyp2OjgRD TzJt898egZkO5L26aWkzQD/Z7pu4McyoBrGIgIzHuynWh7R87OMfLcK5qgeLGQzJAoC6 lhfD5GVFP0cj6EUEq7d2zG5oiWGuu+aSrYRZFLxpVmnq00mqdDTzD38AXi8XLmD9G+aR 9eGA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=AkYi5rm3JrkNa6oYMAoWigJsfTCjd2LW4h2+4/5a098=; b=p9L9AVjSGZsZiRkJykAMwaDOsYGjnXAsZ6bKQlJ4/zgRTbilusylNsA2NHNIGVYadc SgqbqISEYUcbq17eRMwiAxvV7xKWr11rCEWMR8ODw63hJuMMQlXFB5eobYUeuBhky5ND Xj5/VATeSL3/lNpavqCaWQIT7Eo4xi1sWnVG2OLT8UMhqLJ4gvZejbvpc0aokss6n8aL CbzH4Npaz790cBslC40aXlsZkHRkGrRszXhd8wMg86y0Bu0TNU+qyzWJuIV9tuF6uz15 MnSQAvgoXakjbFdVcqXreTV2sXViT87kcZqAnmeKVTQZXYmTyj/xgJ7ix0zSHQJB/e4K YZpw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=F9ulL9gH; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id m10-20020a170902768a00b00158951ab205si1039051pll.429.2022.05.05.01.12.59; Thu, 05 May 2022 01:13:16 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=F9ulL9gH; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236386AbiECQ1o (ORCPT + 99 others); Tue, 3 May 2022 12:27:44 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38996 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239538AbiECQ1h (ORCPT ); Tue, 3 May 2022 12:27:37 -0400 Received: from mail-pl1-x62a.google.com (mail-pl1-x62a.google.com [IPv6:2607:f8b0:4864:20::62a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 73B3F3D1DF for ; Tue, 3 May 2022 09:23:57 -0700 (PDT) Received: by mail-pl1-x62a.google.com with SMTP id i1so9259759plg.7 for ; Tue, 03 May 2022 09:23:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=AkYi5rm3JrkNa6oYMAoWigJsfTCjd2LW4h2+4/5a098=; b=F9ulL9gHrJ+nfPD2aVGHUU5AZgG8kVfQ0usoeG3UriqrSG9TU2ZQZwpoQaeP3LRLsh 9PGzJMVyvlkdrCp7fn5YSCLCAKZKhHLzvpekhd0oBFTpAHwSMl2Y9ibPTF8wjdx+mFLU vX+XfDiSk4VtY4tZfNgvNSDuF7y2BRxWALiyPQLwCLyE+hTwyNoUWRVbYEC5l6K7lroZ JZAmGE270RI1vF1nOjx8NHDraKhU0oLXKHxefQzjD4s8yu1t1cvId8/9xPfl5njQUJlr p+0DqWAhcXnN9pzh8MHiPgh7ozdJBGKHMM866XQG0uqANsrp+Qgy08YaOE2lhvs6RFQ8 AzlA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=AkYi5rm3JrkNa6oYMAoWigJsfTCjd2LW4h2+4/5a098=; b=KRkV4M68Ur3TqDPWv4NOX07KrF8H3kP+GoLl0fmihwcQFfs3EdkLM/e3VzszOPpapG VJO/jt89H5ivblqCZa/gZ6ReKyZ4ar8oHVopvzIisClCCeqJX3uH/LOpgDGRvuq/SKpV ZDMfEEGSJts40IzLEhWWHeLjAtUBfNJjDOnYpGCSHNnqw5lX1j79gkwjX7HCnVrWf+v2 OhZscXAW+HvPn/IqtbouHJsz613fAClwc74Kxe6zB0bPwEN5rceWe0FFc+UuyaB0Uyv9 /f4mJnXoSwhpwcdqGwE3eCPlfOwuC4r3oDDYhyGBspUKOvX58qQRH2Iib5hlmEfal6mx +hvg== X-Gm-Message-State: AOAM531Wj7o9FnlP+qEN+UUwxi1h7OjpC1o7/Q7jF+6PiByM97spciXy q3kTi6cpn+cf92WZDdSKyeSutTUXl9lwYG1zc/l1mw== X-Received: by 2002:a17:902:bb8d:b0:156:51a1:3f5a with SMTP id m13-20020a170902bb8d00b0015651a13f5amr17412620pls.65.1651595036939; Tue, 03 May 2022 09:23:56 -0700 (PDT) MIME-Version: 1.0 References: <20220503130448.520470-1-robert.foss@linaro.org> <20220503130448.520470-2-robert.foss@linaro.org> In-Reply-To: From: Robert Foss Date: Tue, 3 May 2022 18:23:45 +0200 Message-ID: Subject: Re: [PATCH v2 2/8] clk: Introduce CLK_ASSUME_ENABLED_WHEN_UNUSED To: Bjorn Andersson Cc: agross@kernel.org, mturquette@baylibre.com, sboyd@kernel.org, robh+dt@kernel.org, krzk+dt@kernel.org, jonathan@marek.ca, tdas@codeaurora.org, anischal@codeaurora.org, linux-arm-msm@vger.kernel.org, linux-clk@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Dmitry Baryshkov Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, 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 lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 3 May 2022 at 17:02, Bjorn Andersson wrote: > > On Tue 03 May 08:04 CDT 2022, Robert Foss wrote: > > > From: Bjorn Andersson > > > > Some clock implementations doesn't provide means of implementing > > is_enabled(), but still requires to be explicitly disabled when found > > unused as part of clk_disable_unused(). > > > > One such set of clocks are Qualcomm's display RCGs. These can be enabled > > and disabled automatically by the hardware, so it's not possible to > > reliably query their configuration. Further more, these clocks need to > > be disabled when unused, to allow them to be "parked" onto a safe > > parent. Failure to disable the RCG results in the hardware locking up as > > clk_disable_unused() traverses up the tree and turns off its source > > clocks. > > > > Add a new flag, CLK_ASSUME_ENABLED_BOOT, which clock drivers can use to > > signal that these clocks should be disabled even if they don't implement > > the is_enabled() ops. > > > > Signed-off-by: Bjorn Andersson > > --- > > > > I discussed this with Stephen a while ago and we agreed that in a > sufficiently complex system with kernel modules booting without > clk_ignore_unused simply isn't supported. > > We will have to design something better. So please drop this patch from > the series. Ack