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 79BE6C433DB for ; Tue, 16 Mar 2021 18:39:35 +0000 (UTC) Received: from desiato.infradead.org (desiato.infradead.org [90.155.92.199]) (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 EF0846511A for ; Tue, 16 Mar 2021 18:39:34 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org EF0846511A 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=desiato.20200630; 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=WrIUv/OJdff/MNVV6wpRXaIuzNyBnDFdAKmK5+g7SQU=; b=N+mVm80vkJCFbkHc4YoMITqCG bndzEOl0g+gV+v3ttjnh40Gm7wsEwNhbmS2sohM4v2AQ4ydkFf2AALevaXhoJva6OeMPeictyNJuF JL2SxS8/x/F5FqCNYf4mxF5+NQAZdZ3eXPbFn5nbkozz6UcsErjqdu5MzOSYh7ZVoiqVmoRAhKLXn QERdXvUQ9x9NCMuS+VWcwJ6nN2Wslf+cQspuJ8oRfho95QjeNbzFFCwicptvkljvECv45uMEa7wDz cqseX2otZ159I47W1QFKR29A9B9WinbkhEtSBzgkUltt1JtVgON3YObiQRwtbyGh0zdNsTfqQWhrv Jf/VhwlXg==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lMEZw-001dhL-Og; Tue, 16 Mar 2021 18:38:04 +0000 Received: from mail-ej1-x632.google.com ([2a00:1450:4864:20::632]) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lMEZp-001dgI-2F; Tue, 16 Mar 2021 18:38:00 +0000 Received: by mail-ej1-x632.google.com with SMTP id jt13so73919722ejb.0; Tue, 16 Mar 2021 11:37:56 -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=YKhM0XlAMOLzACqYYkiuA73dVilEbBHwLHGpYjZZuLA=; b=LMwP2wyE/NPvLsJ8SINLONbIhkEUHlaQEZLTZykYVn0JYGGzcjfHvWsuRGO4IMYKwj NBW5x249A3uyCyf1PGfYId+o1cj5q+YVEY7K819nBVYgrY7NEBj4EI0Z64vw5f8A0Brb kkHyXyjx+YCo3gdp1MpbYab1bH2uLnwUSSEKhu+hv//uoTPYfR6Akq2ZuTRNSXROfrZs Glxouse4umV8swnd/4knJlh6g4XG9JrETLK1X81Ix8CusVuN1aUyGGRjWeQCwiUVPuAc 9x0+fNib/uHpqm4D67n1hTE2WnMK1YaxsnDXLPZVm1+7rDAz76BA8F8VSpB07DBxtzDX aU+g== 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=YKhM0XlAMOLzACqYYkiuA73dVilEbBHwLHGpYjZZuLA=; b=lEyIhTNlozBcrVc/o1NFwGVD7etmPaiiYF85NcM8S01AQ57FkF1NIVtg6kaSigRHdG vUVcMkv1955AAHqYwWeBkEdXS7woqPKd55KS38Wrg0CZgjK/V337UVEQKeierotmvjoE 52RIRnZgYOV5tukShkmqZqCHV0m4NRHMfK0nAfnw6FeRMfarRGVGO68ZHvMLBcf/8Ctm evAaMgL7mM427OUuIKIt/eJmwxIwBW85wfvuvH2Hy9QaYFQ9t5ceG1DE2WQQIy5jx92R mVhpR8NyWo8vN2AMiqA7bqBwB7bASRvKzIgCSQQcNbRtKMUWEBS5mc9VQq7/xAYP8cXn RsVg== X-Gm-Message-State: AOAM533FSRqbI/UE1THLVDEGfUpx4PJNvBw2uvzpJ1bko216pRKdrqcb ChqixCjmW3QSKbnVZxWzzHE= X-Google-Smtp-Source: ABdhPJxE3Bx8oGOnSfAhjX7BzEscKYYvdLAVXmnu+5BzLmusb25sZLXK+EijAXmBWgIBd3RdtLLQjQ== X-Received: by 2002:a17:906:ef2:: with SMTP id x18mr31817161eji.323.1615919876457; Tue, 16 Mar 2021 11:37:56 -0700 (PDT) Received: from BV030612LT ([188.24.140.160]) by smtp.gmail.com with ESMTPSA id g11sm7412527edw.37.2021.03.16.11.37.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 16 Mar 2021 11:37:55 -0700 (PDT) Date: Tue, 16 Mar 2021 20:37:53 +0200 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: <20210316183753.GC1111731@BV030612LT> References: <13576ddb604a9097603d95cd2605275c20fb2f56.1615221459.git.cristian.ciocaltea@gmail.com> <20210316041739.GC1798@thinkpad> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20210316041739.GC1798@thinkpad> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210316_183758_771805_C9E11249 X-CRM114-Status: GOOD ( 23.73 ) 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 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 }'. Additionally, I assumed the 'CLK_IGNORE_UNUSED' flag makes sense only for the gated clocks. Do I miss something? > 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