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=-7.1 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS 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 03F34C433E4 for ; Fri, 10 Jul 2020 23:50:43 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id CEE522078B for ; Fri, 10 Jul 2020 23:50:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1594425042; bh=pjM63AJEMTvRBufcp7VTgOvAiZiKHrCpskfT6qkNxhI=; h=In-Reply-To:References:Subject:From:Cc:To:Date:List-ID:From; b=CSmJc9M1RwP5cOayHVdwFEdGw9xynIe/YNzQwd3kN1d3PpuYuZOifdY8l4OYSrjP2 qzZT83XIRGBVcorgwKldsXesnMvOn34wWOtGFx50e0sTfuMJOdZsn+yuHuqLAOzlKe JwDFAsiQAdLuagoQcFuvQ9g2aNb9pUJhkYu1oaMc= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726851AbgGJXul (ORCPT ); Fri, 10 Jul 2020 19:50:41 -0400 Received: from mail.kernel.org ([198.145.29.99]:48822 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726581AbgGJXul (ORCPT ); Fri, 10 Jul 2020 19:50:41 -0400 Received: from kernel.org (unknown [104.132.0.74]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id CA46020772; Fri, 10 Jul 2020 23:50:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1594425040; bh=pjM63AJEMTvRBufcp7VTgOvAiZiKHrCpskfT6qkNxhI=; h=In-Reply-To:References:Subject:From:Cc:To:Date:From; b=T7UAW/3AihcPn1mqkSy9Hm3Mgav/sWIXq4FogQrbgTU0trNqJqeqdNb+Iz0M5vNpi XLS+TtaQ9g+9tPSrS/8A0PWmkcfMzA6hWnXxFD0BmWyoHCC6f/Ym+qz9CssPUvK0lP TRlhwa6hm+uYWlcgnCgJI5sq1aV2C8zIHl2k12hc= Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable In-Reply-To: <20200709081705.46084-2-sudeep.holla@arm.com> References: <20200709081705.46084-1-sudeep.holla@arm.com> <20200709081705.46084-2-sudeep.holla@arm.com> Subject: Re: [PATCH v2 2/2] clk: scmi: Fix min and max rate when registering clocks with discrete rates From: Stephen Boyd Cc: Michael Turquette , Dien Pham , linux-kernel@vger.kernel.org, Sudeep Holla To: Sudeep Holla , linux-arm-kernel@lists.infradead.org, linux-clk@vger.kernel.org Date: Fri, 10 Jul 2020 16:50:40 -0700 Message-ID: <159442504011.1987609.3990897866011325023@swboyd.mtv.corp.google.com> User-Agent: alot/0.9 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Quoting Sudeep Holla (2020-07-09 01:17:05) > Currently we are not initializing the scmi clock with discrete rates > correctly. We fetch the min_rate and max_rate value only for clocks with > ranges and ignore the ones with discrete rates. This will lead to wrong > initialization of rate range when clock supports discrete rate. >=20 > Fix this by using the first and the last rate in the sorted list of the > discrete clock rates while registering the clock. >=20 > Link: https://lore.kernel.org/r/20200708110725.18017-2-sudeep.holla@arm.c= om > Fixes: 6d6a1d82eaef7 ("clk: add support for clocks provided by SCMI") > Reported-by: Dien Pham > Signed-off-by: Sudeep Holla > --- > drivers/clk/clk-scmi.c | 22 +++++++++++++++++++--- > 1 file changed, 19 insertions(+), 3 deletions(-) >=20 > Hi Stephen, >=20 > If you are fine, I can take this via ARM SoC along with the change in > firmware driver. However it is also fine if you want to merge this > independently as there is no strict dependency. Let me know either way. I don't mind either way. If you want to send it in along with the firmware change then that's fine. Reviewed-by: Stephen Boyd 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=-7.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,MAILING_LIST_MULTI,SIGNED_OFF_BY,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 AFFCDC433E1 for ; Fri, 10 Jul 2020 23:52:11 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (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 805A220772 for ; Fri, 10 Jul 2020 23:52:11 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="QtQOqKXn"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=kernel.org header.i=@kernel.org header.b="T7UAW/3A" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 805A220772 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.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=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:Message-ID:Date:To:From:Subject:References: In-Reply-To:MIME-Version:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=oWp+AC0WVOzwOamGn3yrx8iZ2ujKhn2iIt1ZnJI9KG4=; b=QtQOqKXnktN0FY+b1NLqRNnm0 2yslAciCBxtiUlvv+DdG36wwO4Wm+Y6c0FNXHcNoGG9WqVnhkHyVK7+mcesLqpMMcX4+IDpB6Tg6T H88qEj3ol8eHX4O2S+dJVCeGu/EXkYHy8HObF4+mOW1GT7zHyzrXaRuPiUq+RE9BuBI9OZwzpW19C vyqXt0j5LM89G8jXegI6xx3XI5sFC8669JlZzMjndx2H3vsqh1ZoW4ncUS14dE9l9kh3vNitSk28k bPa+4eHcnj1z0rft8M7Ow01doo6ZQ9lcEJldO5KcoGQCtDFD441i6IV1+DjoKINaNXdz+jgHedjuY n2JnC4SBA==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1ju2mz-0000Wt-97; Fri, 10 Jul 2020 23:50:45 +0000 Received: from mail.kernel.org ([198.145.29.99]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1ju2mw-0000WX-MM for linux-arm-kernel@lists.infradead.org; Fri, 10 Jul 2020 23:50:43 +0000 Received: from kernel.org (unknown [104.132.0.74]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id CA46020772; Fri, 10 Jul 2020 23:50:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1594425040; bh=pjM63AJEMTvRBufcp7VTgOvAiZiKHrCpskfT6qkNxhI=; h=In-Reply-To:References:Subject:From:Cc:To:Date:From; b=T7UAW/3AihcPn1mqkSy9Hm3Mgav/sWIXq4FogQrbgTU0trNqJqeqdNb+Iz0M5vNpi XLS+TtaQ9g+9tPSrS/8A0PWmkcfMzA6hWnXxFD0BmWyoHCC6f/Ym+qz9CssPUvK0lP TRlhwa6hm+uYWlcgnCgJI5sq1aV2C8zIHl2k12hc= MIME-Version: 1.0 In-Reply-To: <20200709081705.46084-2-sudeep.holla@arm.com> References: <20200709081705.46084-1-sudeep.holla@arm.com> <20200709081705.46084-2-sudeep.holla@arm.com> Subject: Re: [PATCH v2 2/2] clk: scmi: Fix min and max rate when registering clocks with discrete rates From: Stephen Boyd To: Sudeep Holla , linux-arm-kernel@lists.infradead.org, linux-clk@vger.kernel.org Date: Fri, 10 Jul 2020 16:50:40 -0700 Message-ID: <159442504011.1987609.3990897866011325023@swboyd.mtv.corp.google.com> User-Agent: alot/0.9 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200710_195042_791785_BECD51EA X-CRM114-Status: GOOD ( 13.31 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Michael Turquette , Sudeep Holla , linux-kernel@vger.kernel.org, Dien Pham 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 Quoting Sudeep Holla (2020-07-09 01:17:05) > Currently we are not initializing the scmi clock with discrete rates > correctly. We fetch the min_rate and max_rate value only for clocks with > ranges and ignore the ones with discrete rates. This will lead to wrong > initialization of rate range when clock supports discrete rate. > > Fix this by using the first and the last rate in the sorted list of the > discrete clock rates while registering the clock. > > Link: https://lore.kernel.org/r/20200708110725.18017-2-sudeep.holla@arm.com > Fixes: 6d6a1d82eaef7 ("clk: add support for clocks provided by SCMI") > Reported-by: Dien Pham > Signed-off-by: Sudeep Holla > --- > drivers/clk/clk-scmi.c | 22 +++++++++++++++++++--- > 1 file changed, 19 insertions(+), 3 deletions(-) > > Hi Stephen, > > If you are fine, I can take this via ARM SoC along with the change in > firmware driver. However it is also fine if you want to merge this > independently as there is no strict dependency. Let me know either way. I don't mind either way. If you want to send it in along with the firmware change then that's fine. Reviewed-by: Stephen Boyd _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel