Received: by 2002:a05:6a10:f3d0:0:0:0:0 with SMTP id a16csp3093499pxv; Sun, 27 Jun 2021 18:48:03 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwkI8uX3/FgKuaWuonhkIJzjxvzqZ4aZC6hwvgtk4yFGL+eJN1/Xztx3jTl2uHQZlksaXRq X-Received: by 2002:a92:c5a9:: with SMTP id r9mr16537996ilt.5.1624844883024; Sun, 27 Jun 2021 18:48:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1624844883; cv=none; d=google.com; s=arc-20160816; b=t9XZ9YXIIVmsZZ3gSN0SVEsMaKpk77rDr4MKq2Rs581C7+ONzEuxII+hx0eBaFguXA fVbenc59PsV4UolyAk7+wCODLvjDCM5Z1vEYkmMFDysBJR2I/EvfTfH5MOUMg7xMnlqg glWF6YxPiQC84jY2+Nq6JIm94YKLcOFohmTm9mva623jR2shtM4wwUF2xRJripZJ1000 I8cU1ClcJ4eZoHVPK0Ld6MzBrUCkUUM6th3ulnyZIV1Uc7w/BGx5z3QEnOKsu3sj/WlL /HmLXZaXG/b6XMlklUcJyFPDr75IjPKZzieo/wreKXXo0RLogQNMXEzdtI4Ba15IosMJ VwRw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:message-id:date:to:cc:from:subject :references:in-reply-to:content-transfer-encoding:mime-version :dkim-signature; bh=P3xejJh59fIYv5c3d+Dn4c5NO9y+v/+68dmTz3i32BI=; b=ANKV3Uidkr21bP7s/wpNL4ngLm6Y8gXzXriIS2aD1KWP4DLQ7wikGzm2PeXX5yjo7M L7pJsjgNzeYJjbZeh1nxWO7D0JAXwFMzGuuq+Pk3Pjw7SaKa2VVhWTDjvz3WYt6xYVeb GRWzoZdbV1YXI0xvReXrlqAPrUYCGII+0mEhXo9KP590f2c9Ie8DOsLJvHANZ8K53K9t eYx6dkSn3IRUjgU+AjrWJPphQeLkeVoTxdpADiduimUexgD5ArVNU9sh9C5FBdK55fml IK3eMKroYaLDH+G3da33HgtVKaWAUqSTlFep1tiz1bTLj8+6DqcY+RBqnoW7x73QColZ 31Mw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=rkeiv1lA; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id b11si19902275ilv.25.2021.06.27.18.47.51; Sun, 27 Jun 2021 18:48:03 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=rkeiv1lA; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231984AbhF1Btd (ORCPT + 99 others); Sun, 27 Jun 2021 21:49:33 -0400 Received: from mail.kernel.org ([198.145.29.99]:43794 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231735AbhF1Btd (ORCPT ); Sun, 27 Jun 2021 21:49:33 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 4163561A1D; Mon, 28 Jun 2021 01:47:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1624844828; bh=Z4+RC7bUNgvDBHdXHzmmcrKvAjJn1x19hgsGdOUgNI8=; h=In-Reply-To:References:Subject:From:Cc:To:Date:From; b=rkeiv1lAoVZwXmP7B6v9RHq0Az/KTTL4u9/eAkB4pM3gg1tU+KOX3nX7/lYGTB66j WvQpjpTpWOrKYBdImup4JovDu7Z2eMZnJDI07U12o5MNHGg1yTSYpo28bo3A0ib3Gi gM4QCUPyxwm3d93d+wupJeaFXUR5X4BNNMOR9cltz2NwB0jkaGTAPtbvcl5S3HstFr 8gED/mrnVsNjxEoo+Vfdh9iN9gymlBhpZ1WhJLtIyp6Ydfl6+CsRPemHuQazCJ9/uM yqHMxEBgirv5FuL57zNwUbMjnnXmJ9vjHH27Zd1Qmkb3VMN5JKYeZNYFNbm8Y4+vpr PeAfpx7FvM8jg== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable In-Reply-To: References: Subject: Re: [PATCH v3 3/6] clk: actions: Fix bisp_factor_table based clocks on Owl S500 SoC From: Stephen Boyd Cc: 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 To: Andreas =?utf-8?q?F=C3=A4rber?= , Cristian Ciocaltea , Edgar Bernardi Righi , Manivannan Sadhasivam , Michael Turquette , Rob Herring Date: Sun, 27 Jun 2021 18:47:07 -0700 Message-ID: <162484482710.3259633.13588609804522862763@swboyd.mtv.corp.google.com> User-Agent: alot/0.9.1 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Quoting Cristian Ciocaltea (2021-06-10 13:05:23) > 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] >=20 > There are several issues involved in this approach: >=20 > * '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. >=20 > * 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. >=20 > Let's fix this by implementing the following: >=20 > * Add new factor tables 'de_factor_table' and 'hde_factor_table' to > properly handle DE[1-2], VCE and VDE clocks. >=20 > * Add a common div table 'std12rate_div_table' for BISP and SENSOR[0-1] > clocks converted to OWL_COMP_DIV. >=20 > * Drop the now unused 'bisp_factor_table[]'. >=20 > Additionally, drop the CLK_IGNORE_UNUSED flag for SENSOR[0-1] since > there is no reason to always keep ON those clocks. >=20 > Fixes: ed6b4795ece4 ("clk: actions: Add clock driver for S500 SoC") > Signed-off-by: Cristian Ciocaltea > Reviewed-by: Manivannan Sadhasivam > --- Applied to clk-next