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 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 smtp.lore.kernel.org (Postfix) with ESMTPS id 6F505C48297 for ; Tue, 6 Feb 2024 14:16:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:Content-Type: Content-Transfer-Encoding:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:From:References:CC:To:Subject: MIME-Version:Date:Message-ID:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=7lYsoEUR6M3yu7ho3AVj5BrHtjPgy8zXVS2f3IVQuLU=; b=FPJXuXo4QwDZnS FlguT1S6ul8iaml2mbKi3skgQ4ikzFap5fZmaOPkAzmOTKoT/lhrThV0KA3JCe9lG8KQ5vqaT06ea 1sk1DZbSm7O3oj+nnZTC1aAo1vHIGPR0s3V1ThInFmF2jJDT5ypq8vEMb/mx47qCqBcRWd5w2Lcls rFurw0N3h4dYvONqKXQtMDk1WVmqQb2IsH5CMXLuqD0OlsjGmbhHCKCs8vC3GjFXOKVerAJeEyd6u AdrIve2SlqelmZ5Qa+8kAcgHi6yKexDg0lbMCpinwoYqxQE6NMkZ9Z5UaWZBLMKbcCWpdGIKxf5t2 WfhqcFhswPKP8LFqkW/w==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rXMEy-00000007q36-0bTL; Tue, 06 Feb 2024 14:16:00 +0000 Received: from lelv0143.ext.ti.com ([198.47.23.248]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rXMEv-00000007q2Z-10rw for linux-arm-kernel@lists.infradead.org; Tue, 06 Feb 2024 14:15:58 +0000 Received: from lelv0266.itg.ti.com ([10.180.67.225]) by lelv0143.ext.ti.com (8.15.2/8.15.2) with ESMTP id 416EFqxS034992; Tue, 6 Feb 2024 08:15:52 -0600 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1707228952; bh=5nhVmZo58knSfgmGXShQ9V9c5OqXdispK8mj8/jUycU=; h=Date:Subject:To:CC:References:From:In-Reply-To; b=YbhDIhlYxuExrVyCDQ6BPS5QMnHgtsssuDl7F1yQWn8/SpowBxrY/Xp80bvoqBehh J3xwCNaF8+pPkRqI6PSQcT1geK7Se87IvDExEa6V+uEAA1hp3wkgRVYl5TG88wX9Ri yfrBUmPYDQgx28Vt8C4sYMRzvr+zoZuk+e60tFSo= Received: from DLEE113.ent.ti.com (dlee113.ent.ti.com [157.170.170.24]) by lelv0266.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 416EFqu2070971 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Tue, 6 Feb 2024 08:15:52 -0600 Received: from DLEE103.ent.ti.com (157.170.170.33) by DLEE113.ent.ti.com (157.170.170.24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23; Tue, 6 Feb 2024 08:15:52 -0600 Received: from lelvsmtp5.itg.ti.com (10.180.75.250) by DLEE103.ent.ti.com (157.170.170.33) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23 via Frontend Transport; Tue, 6 Feb 2024 08:15:52 -0600 Received: from [10.249.141.75] ([10.249.141.75]) by lelvsmtp5.itg.ti.com (8.15.2/8.15.2) with ESMTP id 416EFlZI104081; Tue, 6 Feb 2024 08:15:48 -0600 Message-ID: Date: Tue, 6 Feb 2024 19:45:47 +0530 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v2] clk: keystone: sci-clk: Adding support for non contiguous clocks Content-Language: en-US To: Kamlesh Gurudasani , Nishanth Menon , CC: , , , , , , , , , References: <20240206104357.3803517-1-u-kumar1@ti.com> <20240206131420.wtitflgav23jto2q@verbally> <871q9pzoiq.fsf@kamlesh.i-did-not-set--mail-host-address--so-tickle-me> From: "Kumar, Udit" In-Reply-To: <871q9pzoiq.fsf@kamlesh.i-did-not-set--mail-host-address--so-tickle-me> X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240206_061557_397224_3B0EFF6D X-CRM114-Status: UNSURE ( 9.14 ) X-CRM114-Notice: Please train this message. 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-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On 2/6/2024 7:24 PM, Kamlesh Gurudasani wrote: > Nishanth Menon writes: > >> On 16:13-20240206, Udit Kumar wrote: >>> Most of clocks and their parents are defined in contiguous range, >>> But in few cases, there is gap in clock numbers[0]. >>> Driver assumes clocks to be in contiguous range, and add their clock >>> ids incrementally. >>> >>> New firmware started returning error while calling get_freq and is_on >>> API for non-available clock ids. >>> >>> In this fix, driver checks and adds only valid clock ids. >>> >>> Fixes: 3c13933c6033 ("clk: keystone: sci-clk: add support for dynamically probing clocks") >>> >>> [0] https://software-dl.ti.com/tisci/esd/latest/5_soc_doc/j7200/clocks.html >>> Section Clocks for NAVSS0_CPTS_0 Device, >>> clock id 12-15 not present. >>> >>> Signed-off-by: Udit Kumar >>> while (num_parents--) { >>> + /* Check if this clock id is valid */ >>> + ret = provider->ops->get_freq(provider->sci, >>> + sci_clk->dev_id, clk_id, &freq); >> get_freq is a bit expensive as it has to walk the clock tree to find >> the clock frequency (at least the first time?). just wondering if >> there is lighter alternative here? >> > How about get_clock? Doesn't read the registers at least. Said API needs, some flags to be passed, Can those flag be set to zero, Chandru ? > Regards, > Kamlesh _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel