From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-0.7 required=3.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,DKIM_VALID,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9AB79C4708A for ; Thu, 27 May 2021 13:50:09 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 63D2E61005 for ; Thu, 27 May 2021 13:50:09 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 63D2E61005 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=d6j7Jknb2dxg6Qbe5uI5EryB9ZnVHAwDPU1o5eAPquo=; b=A4ES8TStiACKti oge0qMZF0QDk5ziOxNrNbOmnBIMU86zLIfSDFjh1q0cAx7vHHO5NNlvkqaSDq6KcgS+G+Tf9qjhyz AvVPNUz+JGRpk/MwbYQEKgn21S2r/Q8z1+86gr8RAuglG95uNljtDbjNPwNQYkywXGCIqvThhZgfq L/4ShofBAy+fnAuhQc86meb8odhVVmfTGXiP3orNtmsRi29nnhAx+Rs4fo0cz09YoJF2XFs0tFiF3 nQnD5a4273I/y3gp0kTeLdFkknJFFE0I+qgz5NtqRUS73UeoeP21vohkzFArTQpe1hADLddrfUrh9 442WcmwnQDwpMWXvUtaA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1lmGLM-006PAE-0v; Thu, 27 May 2021 13:46:38 +0000 Received: from mail-ej1-x630.google.com ([2a00:1450:4864:20::630]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1lmGA5-006JmI-Hh; Thu, 27 May 2021 13:34:59 +0000 Received: by mail-ej1-x630.google.com with SMTP id s22so57104ejv.12; Thu, 27 May 2021 06:34:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=VEI5bLvXgbpeUivVBaEMqx+txchbLnpQpbqyYjt+PAM=; b=cwm5LW0GBakp8nRYV1jRDGSh9pRg91ZkgADzzEoCwe6WGyqpBqUwZwOY0Kaa01Rn6E 2eH+iw7H89o8RiEyS3uLIpmFoaKTU9tTkuRLm2Uw+7ZYJeEsv+KtReXC6x3Y8PGfFbSS 2sko2odHhgWqu2WVo6nYS29ZmZhTTAoV5/J8SdRy7Y7/oP4h0NxO2lkTCeGUWnUrCm98 SYJFvX3O0iAG9CAPJDE3c2+2mXJ5sG86j7vl/ajWDh4gESiz5d/1PLfVMLWVQnZjinmV +Ddl8TRlEsPNlCiavUhszTUx+C/vqbFiJaZS0Kh5zbwDsa8te5H0iSF1syEQjLB+x1iz CQ3Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=VEI5bLvXgbpeUivVBaEMqx+txchbLnpQpbqyYjt+PAM=; b=OT+yPz24SYba7+bH3P9gmwX8GS2yNnnd1YuZPSeafgTwV6qFqcuxHxtB/B9Ihagvd8 bMY1XDXII6TVboFA0V2+DegaFRMEmJCVRq/swad8fU33wUGnhNJvK0+du0hS9uC2ZIge q5fTeUSd7Jde4z1tEHj6utL4t0cqniJETaq7Ls5R8DsG2UWuXMXPj05zBsUg3eL+4Gq3 YwmJ58rsJlrTP9sdOepJ5gQxaJJP2KDDRsdPcKnwDSGeD1fO8k+8X+Mb/zw+H6Pjv21Y W1T3jANdBpEBfCBlEelWkuvqVcA3TW+dT+IFHGrDLR6iCWcE2iN7bs3kcjVLMjMTNdCB rHEg== X-Gm-Message-State: AOAM533zSp9F5+P/8QIROL2PbbYVmIINKFcCSQBaDau/kXZrgeeWaBv0 gxH8JWl920g5dPqKcogER/M= X-Google-Smtp-Source: ABdhPJyNoWNmDmTgjQkaLfmJlu3gcChA52ovRWg4GgXNQwjckGRj6Ti+j+d0suc/pmb3jV4D1m44wA== X-Received: by 2002:a17:906:d1d2:: with SMTP id bs18mr3864295ejb.56.1622122495798; Thu, 27 May 2021 06:34:55 -0700 (PDT) Received: from BV030612LT ([188.24.140.160]) by smtp.gmail.com with ESMTPSA id y15sm1011399ejc.48.2021.05.27.06.34.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 27 May 2021 06:34:55 -0700 (PDT) Date: Thu, 27 May 2021 16:34:52 +0300 From: Cristian Ciocaltea To: Manivannan Sadhasivam Cc: Stephen Boyd , Rob Herring , Andreas =?iso-8859-1?Q?F=E4rber?= , Michael Turquette , Edgar Bernardi Righi , linux-clk@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-actions@lists.infradead.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org Subject: Re: [PATCH 3/6] clk: actions: Fix bisp_factor_table based clocks on Owl S500 SoC Message-ID: <20210527133452.GB1300160@BV030612LT> References: <13576ddb604a9097603d95cd2605275c20fb2f56.1615221459.git.cristian.ciocaltea@gmail.com> <20210316041739.GC1798@thinkpad> <20210316183753.GC1111731@BV030612LT> <20210526101830.GE10723@work> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20210526101830.GE10723@work> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210527_063457_660269_8CB945EA X-CRM114-Status: GOOD ( 35.80 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Wed, May 26, 2021 at 03:48:30PM +0530, Manivannan Sadhasivam wrote: > On Tue, Mar 16, 2021 at 08:37:53PM +0200, Cristian Ciocaltea wrote: > > On Tue, Mar 16, 2021 at 09:47:39AM +0530, Manivannan Sadhasivam wrote: > > > On Mon, Mar 08, 2021 at 07:18:28PM +0200, Cristian Ciocaltea wrote: > > > > The following clocks of the Actions Semi Owl S500 SoC have been defined > > > > to use a shared clock factor table 'bisp_factor_table[]': DE[1-2], VCE, > > > > VDE, BISP, SENSOR[0-1] > > > > > > > > There are several issues involved in this approach: > > > > > > > > * 'bisp_factor_table[]' describes the configuration of a regular 8-rates > > > > divider, so its usage is redundant. Additionally, judging by the BISP > > > > clock context, it is incomplete since it maps only 8 out of 12 > > > > possible entries. > > > > > > > > * The clocks mentioned above are not identical in terms of the available > > > > rates, therefore cannot rely on the same factor table. Specifically, > > > > BISP and SENSOR* are standard 12-rate dividers so their configuration > > > > should rely on a proper clock div table, while VCE and VDE require a > > > > factor table that is a actually a subset of the one needed for DE[1-2] > > > > clocks. > > > > > > > > Let's fix this by implementing the following: > > > > > > > > * Add new factor tables 'de_factor_table' and 'hde_factor_table' to > > > > properly handle DE[1-2], VCE and VDE clocks. > > > > > > > > * Add a common div table 'std12rate_div_table' for BISP and SENSOR[0-1] > > > > clocks converted to OWL_COMP_DIV. > > > > > > > > * Drop the now unused 'bisp_factor_table[]'. > > > > > > > > > > Nice! > > > > > > > Additionally, since SENSOR[0-1] are not gated, unset the OWL_GATE_HW > > > > configuration and drop the CLK_IGNORE_UNUSED flag in their definitions. > > > > > > > > > > No. You should not screen the functionality exposed by the hw, that's what the > > > purpose of these CLK_ flags. > > > > I'm not sure I get this, or maybe I wasn't clear enough with my > > explanation regarding the changes to SENSOR clocks: they are not gated > > in hardware, hence the statement 'OWL_GATE_HW(CMU_DEVCLKEN0, 14, 0)' > > was invalid and I replaced it with '{ 0 }'. > > > > This clock is gated in hw as per the datasheet. Again, please don't make > judgements based on the vendor code as it is not upto date with HW. I > know it is silly but that's how things are... Indeed, a newer datasheet states the clock is gated. I fixed the patch accordingly in v2. > > Additionally, I assumed the 'CLK_IGNORE_UNUSED' flag makes sense only > > for the gated clocks. Do I miss something? > > > > CLK_IGNORE_UNUSED is used by the clk framework to essentially skip > gating the clocks which are turned ON by the bootloader and there is no > other driver using it. But I think you can remove this flag because > there is no reason to leave this specific clock to be ON always. Thanks for the explanation, I kept the flag removed in v2. Regards, Cristi > Thanks, > Mani > > > > Other than that, this patch looks good to me. > > > > Thanks, > > Cristi > > > > [...] _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel