Received: by 2002:a05:7412:251c:b0:e2:908c:2ebd with SMTP id w28csp1612896rda; Mon, 23 Oct 2023 19:42:41 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGlLxx/tDCOmoEDX145WKqsyFHrTUw9qZszHgTXSVuPSA4XZl2pC0sq+03MHpDmjDV7QbP6 X-Received: by 2002:a05:6a20:e115:b0:153:78c1:c40f with SMTP id kr21-20020a056a20e11500b0015378c1c40fmr1764558pzb.15.1698115361149; Mon, 23 Oct 2023 19:42:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698115361; cv=none; d=google.com; s=arc-20160816; b=Wu0eXYVgLxIIqlXZXcAYU/ARL14HjNTka8+whOg2sgfEJO+tyYchTtR14jOstO5bsD g1DXx28W13THbSlIP0ufSy0ggJYFxLFVG2qm8losX1fkotcPiOdpYWxm7k9gCU/McoiI WpvElXq34AnUYDo3TcTNy56EndG/4ZG9LnuFERLTlLC3NAmHmre62IFaeMWnZBuoi3T5 fYlSJnjFM9E999UG5FxlMYBau5vEftx3UZ8Pyglxgz4EU0rwx9EaAVtVMI2XBldDIaSt fl730MtttGl2vjF6C/e/piO2taQC2+Xz5g3DehHEuF2RhXnx8XdwFh+t7ss4vp+MgrVm Y7Kw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:date:to:cc:from:subject:references :in-reply-to:content-transfer-encoding:mime-version:message-id :dkim-signature; bh=Axzhu/PU5pIRjTDxygVB5J4OxaQMp9aGqFHCG5Bu1kU=; fh=8egPv9celMFBOXPIU2K0P6RX9/lEEmuQkH1uhFf3Y4U=; b=XogcjwtVrWO6rvCx1KHY4xlyLry7TNWFEmxlvVS9gTYzRxbJZX4MAcGKVS2LrRqhIb fFTkoU5pdRLtmUlgT/qB8l3t7aTxDkIkyj/qAR+12vrVW/5luozZHzEsmRA+qFFiW/2n ujBw5G36YdwSi5kueyIxKONX6vhAq/xoXN76VlqeI54au6JnUV5hSNHJgQnCYYAtPP7w OFQ43h3SYaxn6mcMsRHU+8kupMBoyd40DXn8ujd2P1iy0s+toQggXHXgq6hyCIPdnPxU lEjAD0hDAy2xYbB+cZKz1FvXgp2t/32834fN10GwpIJYS4gIc4GC4lXYrYRft90yB76X Je3w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="oE/fU/s4"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from pete.vger.email (pete.vger.email. [23.128.96.36]) by mx.google.com with ESMTPS id a11-20020a17090ad80b00b00274c8943b59si10259343pjv.64.2023.10.23.19.42.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 23 Oct 2023 19:42:41 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 as permitted sender) client-ip=23.128.96.36; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="oE/fU/s4"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by pete.vger.email (Postfix) with ESMTP id C93BC8087260; Mon, 23 Oct 2023 19:42:35 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at pete.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232197AbjJXCmM (ORCPT + 99 others); Mon, 23 Oct 2023 22:42:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60464 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231913AbjJXCmL (ORCPT ); Mon, 23 Oct 2023 22:42:11 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5897910D0; Mon, 23 Oct 2023 19:42:04 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPSA id DC879C433C8; Tue, 24 Oct 2023 02:42:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1698115324; bh=Axzhu/PU5pIRjTDxygVB5J4OxaQMp9aGqFHCG5Bu1kU=; h=In-Reply-To:References:Subject:From:Cc:To:Date:From; b=oE/fU/s40CdpBaHVlUL5Y0CN8wNwlg+lpdRdYH9dbEdA95IztWccl8K8dxFGEAarM 8k0FuOcks6KJTk5vPaKS0saEx4q0G4n/u/5n1iaW2cd3849kie8qNSwDZPPzhwUK+A Yqmz9otXyyJQe55wZCkG6Th539MCh5Ow1XFay7BBca8GZ3IKnCc6Kk0pmkJvbzDiI3 YJC6x1zFu5PUDYxrMY3a0rAGu3eICRGfvE9/FESbBBHjYoWTEBnioW2aZJmfeqpuq1 BMeQBb0fPaYCVxTs0bxfvTv2xhNXDC1B3PGxuTJJTuNUF6mpxSwd3ImTCuk/PGJjnE TnsZdOOaM+49A== Message-ID: Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable In-Reply-To: References: Subject: Re: Question on pre running clocks From: Stephen Boyd Cc: mturquette@baylibre.com, Arun KS To: Arun KS , linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org Date: Mon, 23 Oct 2023 19:42:01 -0700 User-Agent: alot/0.10 X-Spam-Status: No, score=-1.2 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on pete.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 (pete.vger.email [0.0.0.0]); Mon, 23 Oct 2023 19:42:36 -0700 (PDT) Quoting Arun KS (2023-10-20 00:09:05) > + linux-clk >=20 > On Fri, Oct 20, 2023 at 12:37=E2=80=AFPM Arun KS = wrote: > > > > Hello, > > > > Lets say there is a clock which is enabled by bootloaders and is pre > > running as linux boots. > > Is it mandatory for the client drivers to call clk_prepare_enable() on > > them to initialise the enable_count to 1? Yes. > > > > Or is there a way we can specify to the kernel that this clock is > > already enabled by bootloader and initialise the enable_count for this > > clock to 1. No there isn't. > > > > Because otherwise, clk_disable() prints a WARN() if a client driver > > uses clock handle where clk_prepare_enable() is not called. > > > > I grep through the code, but could find any details. Appreciate any poi= nters. > > > > Regards, > > Arun