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=-5.6 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 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 D7C98C47088 for ; Wed, 26 May 2021 12:40:37 +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 9B16E61378 for ; Wed, 26 May 2021 12:40:37 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 9B16E61378 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org 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=8kc4kBsJsUrA+LjJxj5pOdOMg8QcM3IKHHyhftX9tVI=; b=Qi2mBUA/N0APlE EYDIPp0qNgFuluHDC+kAbyaUInyLJDLECsIOm4O6Yw1UqlITFCoKAA1tPFb2OscNCWEvZMz9n+z4F ONkUwrYHlPvbUkeDD4Y2IL7hxC4njwUcVzrxIRLkfQ1xQBq75BpHiaLMpogVZGUJM2fMbRt3aPcrU sxDtaQJqEtyqNl24MwKGZPqJ3/TzvkFwEEANlFgeVeYi3sQv65qp7yE7Q9pIOUoH3+GQODKy2Edk2 SYWSWp1gOiqPcY4xxZQkF77grOtl3VtJfiqh7ufUK3/3Ju7t9sPk+T0v81l/72kLHJDbr47f3B71w 0ATOE74BN5cFn1bywD6Q==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1llsn8-00E3Qv-62; Wed, 26 May 2021 12:37:44 +0000 Received: from mail-pl1-x62a.google.com ([2607:f8b0:4864:20::62a]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1llqcX-00D9O1-Jp for linux-arm-kernel@lists.infradead.org; Wed, 26 May 2021 10:18:39 +0000 Received: by mail-pl1-x62a.google.com with SMTP id u7so377041plq.4 for ; Wed, 26 May 2021 03:18:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=XSi3eEZGuE/2YFaQr+R0aCzKJxfy8VJGKcJVdLww6Hg=; b=VUW/mY1pRYOS0Oz3reGWDXfF/PieVcGzL47ZKVJA2N8+uUA+pwLwgqo6FB4AlpokDY dmamG3lfFC/ErlYruqqd40vWDP9dzd5oaMlBn1S+URR+JSxJDbjRlgKfdwTJmy8Z/N6o A7uZnaQiNjrACXwgQlRNXIaOiPJL7ahEutdh5+UoB4sa7b8apqR6c+k3Y7U5dUmpac1X WWomYVMU8JgIckH0e7JZeExzlpD+Evt3PdMOasAR62yDySoq/3nX0CdvwxL7xQ5sZrBr a8N98IgWtVGVCxrFG/hLNCkUKCRuOMD6TcKcYXVEOAn5U9epaTU5J+/CPh1Lh10HBse/ ZFyw== 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:user-agent; bh=XSi3eEZGuE/2YFaQr+R0aCzKJxfy8VJGKcJVdLww6Hg=; b=Z3yY6hzRAxBDXoA1eUfw9CsBRdUNWOWlblbBnm0aRQ5v4sjP/H6aRXRe/YsFdD9Wdx us2vjO6Da4YqbuDjdrOLPJet0quUHO7HnzhOXlc3SvRge12INQMPpTtFbDYgDEuHnzZF oP/wI41XdU9vOx8OjH0VwTCrlS684Hl7O/ACo0RLwMibcocaknKWNvcn0FCnxDr5Os8T 0R/2lgpS21dDoNtcw8tLj5xR0xSBWjVMn/OrjechTCuUKIyoBhSDQL84ndobtBOkN7xQ GHKsQmODv1ToPtriGq5RxVZJUh+Vb/3Sy1b3/pSwCD09MmCXwvAINMlm1nmsmgkFJ1fe GLew== X-Gm-Message-State: AOAM532VLo0cLzzIA7VeSU4K7KzGpJH/G7I/STyvlbrQLqjDXY2a6e47 5vU8m7jrnEZrei4PVskG9/18 X-Google-Smtp-Source: ABdhPJwuWcSHpObOVOjzCc0SZHP/m4Ox5RQ4y5X0r3eESQIQEwnY+dMPKWw0wFBV9czZ9+5zlyhldA== X-Received: by 2002:a17:902:34f:b029:ef:3d14:1c27 with SMTP id 73-20020a170902034fb02900ef3d141c27mr35650682pld.65.1622024315280; Wed, 26 May 2021 03:18:35 -0700 (PDT) Received: from work ([120.138.12.4]) by smtp.gmail.com with ESMTPSA id p1sm15306479pfp.137.2021.05.26.03.18.31 (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 26 May 2021 03:18:34 -0700 (PDT) Date: Wed, 26 May 2021 15:48:30 +0530 From: Manivannan Sadhasivam To: Cristian Ciocaltea 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: <20210526101830.GE10723@work> References: <13576ddb604a9097603d95cd2605275c20fb2f56.1615221459.git.cristian.ciocaltea@gmail.com> <20210316041739.GC1798@thinkpad> <20210316183753.GC1111731@BV030612LT> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20210316183753.GC1111731@BV030612LT> User-Agent: Mutt/1.9.4 (2018-02-28) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210526_031837_683504_7D11F6B0 X-CRM114-Status: GOOD ( 33.86 ) 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 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... > 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, 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