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=-16.5 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=unavailable 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 71964C433FE for ; Fri, 17 Sep 2021 12:07:55 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 5C98060187 for ; Fri, 17 Sep 2021 12:07:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344331AbhIQMJM (ORCPT ); Fri, 17 Sep 2021 08:09:12 -0400 Received: from esa.microchip.iphmx.com ([68.232.154.123]:52288 "EHLO esa.microchip.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S243628AbhIQMIo (ORCPT ); Fri, 17 Sep 2021 08:08:44 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=microchip.com; i=@microchip.com; q=dns/txt; s=mchp; t=1631880443; x=1663416443; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=bZMQb4xEm45MpshvWcAzyLo2pqQa5xUnhBFD0WqA9bk=; b=H2mtiCg4zOT1W74rZEII1WL5qPvnoZgZdRS8XrDt9/Yjo4RMiVue9VJ0 yFJkbJu0vCHripCiB39xvGg1tmU43LmOGA++5k/87utSEgpXM1ASb9MR1 wt3i1GWXz5BQ850YrLTyYtHOpPE2MeRpH0Q+uEf5gDvTNEO0ok839hoST 1u9aPnlCbgE5i0N0m1bFu507pZXsz685TTd1UCNzbDxLFsX6/04RbViMH ueWDV6DdvOJ59mNb/QQfyzBo+v33ktsNd7XQB/lKiuzOTVXDtlZNMuF+H Kzry+ihAx0/jXVK6JHv8Q/XNZWDv3u7ZZ6oHvk/4bNiMxgCD1xsWLUWGO Q==; IronPort-SDR: MbYRf5iuTP3eWbMu9Uxbm32tExkfqVWUxgwm0A3TdtVjfOhrcwy5VC+17u1o0JapTdp9+yBM+X 41OjXgFrULdY1C2pbqavuUFRu0Xrfzz07uL9s06GJNjvm3fggG3TirxWyOUd6y5ZuPmXrMN/as g0r/qgCALgdVWmGw5+PAUE+mPIHtWYBthSdA+wwHGG/hIFy7TzDC6TvlOWQmT5TUHZPqrPNg2V NEsiGi8LFBr0E+z+8pqJHtjiH/L/s5Ath1n1Zhed9Blx28xjZEHUgvlxA5QNVEH1r3pwjD2os5 CVGjbU6exT9UcUNaKsk7MLfR X-IronPort-AV: E=Sophos;i="5.85,301,1624345200"; d="scan'208";a="132201109" Received: from smtpout.microchip.com (HELO email.microchip.com) ([198.175.253.82]) by esa2.microchip.iphmx.com with ESMTP/TLS/AES256-SHA256; 17 Sep 2021 05:07:22 -0700 Received: from chn-vm-ex03.mchp-main.com (10.10.85.151) by chn-vm-ex03.mchp-main.com (10.10.85.151) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2176.14; Fri, 17 Sep 2021 05:07:22 -0700 Received: from rob-dk-mpu01.microchip.com (10.10.115.15) by chn-vm-ex03.mchp-main.com (10.10.85.151) with Microsoft SMTP Server id 15.1.2176.14 via Frontend Transport; Fri, 17 Sep 2021 05:07:20 -0700 From: Claudiu Beznea To: , , , , CC: , , , Claudiu Beznea Subject: [PATCH v3 15/17] clk: use clk_core_get_rate_recalc() in clk_rate_get() Date: Fri, 17 Sep 2021 15:06:40 +0300 Message-ID: <20210917120642.8993-16-claudiu.beznea@microchip.com> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20210917120642.8993-1-claudiu.beznea@microchip.com> References: <20210917120642.8993-1-claudiu.beznea@microchip.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org In case clock flags contains CLK_GET_RATE_NOCACHE the clk_rate_get() will return the cached rate. Thus, use clk_core_get_rate_recalc() which takes proper action when clock flags contains CLK_GET_RATE_NOCACHE. Signed-off-by: Claudiu Beznea --- drivers/clk/clk.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/clk/clk.c b/drivers/clk/clk.c index 65508eb89ec9..64838754cdef 100644 --- a/drivers/clk/clk.c +++ b/drivers/clk/clk.c @@ -3108,7 +3108,7 @@ static int clk_rate_get(void *data, u64 *val) { struct clk_core *core = data; - *val = core->rate; + *val = clk_core_get_rate_recalc(core); return 0; } -- 2.25.1 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=-17.1 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham 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 BA657C433EF for ; Fri, 17 Sep 2021 12:18:39 +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 773EC61041 for ; Fri, 17 Sep 2021 12:18:39 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 773EC61041 Authentication-Results: mail.kernel.org; dmarc=fail (p=quarantine dis=none) header.from=microchip.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=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:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:CC:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=NSFZEk8m/gMVpDvVWzOJKF3fEpgzyIWP3Hb9wijrWr0=; b=iqUFCSzsHewbSx Jijl+i4ql7EtCkdSo7wc3gLOBxBswDnVxrjsXhoYlJTX7PtlZhIX+JLAddIuqvmhIDWJ+TfS5Reyi Xvo0o3deMsaxSZcWLwX9W2Qg4HvtMVPqjmvoWNsMuN/P7Jxu5k15kL2nGIZzQi/lnt6pGJc1oCGMI 01q0qdGfsFwg11k6QNcM7xl9t7kXhNfbUCXBPgFBqfy1nCP1WFs0FwHjxptV8KpJBMEREMFFoL8vT 8GHMbDx5bQwE+irUqYI7j6JqYr861Zj65qxtD+NDwBCbyIPPVrvFijrvmKsqP18aLD6ttKwfNjtuI HmlqHK5Pz7DOQAtWq8eA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mRCmh-00DzxP-98; Fri, 17 Sep 2021 12:16:04 +0000 Received: from esa.microchip.iphmx.com ([68.232.154.123]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mRCeJ-00Dw6L-4g for linux-arm-kernel@lists.infradead.org; Fri, 17 Sep 2021 12:07:24 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=microchip.com; i=@microchip.com; q=dns/txt; s=mchp; t=1631880443; x=1663416443; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=bZMQb4xEm45MpshvWcAzyLo2pqQa5xUnhBFD0WqA9bk=; b=H2mtiCg4zOT1W74rZEII1WL5qPvnoZgZdRS8XrDt9/Yjo4RMiVue9VJ0 yFJkbJu0vCHripCiB39xvGg1tmU43LmOGA++5k/87utSEgpXM1ASb9MR1 wt3i1GWXz5BQ850YrLTyYtHOpPE2MeRpH0Q+uEf5gDvTNEO0ok839hoST 1u9aPnlCbgE5i0N0m1bFu507pZXsz685TTd1UCNzbDxLFsX6/04RbViMH ueWDV6DdvOJ59mNb/QQfyzBo+v33ktsNd7XQB/lKiuzOTVXDtlZNMuF+H Kzry+ihAx0/jXVK6JHv8Q/XNZWDv3u7ZZ6oHvk/4bNiMxgCD1xsWLUWGO Q==; IronPort-SDR: MbYRf5iuTP3eWbMu9Uxbm32tExkfqVWUxgwm0A3TdtVjfOhrcwy5VC+17u1o0JapTdp9+yBM+X 41OjXgFrULdY1C2pbqavuUFRu0Xrfzz07uL9s06GJNjvm3fggG3TirxWyOUd6y5ZuPmXrMN/as g0r/qgCALgdVWmGw5+PAUE+mPIHtWYBthSdA+wwHGG/hIFy7TzDC6TvlOWQmT5TUHZPqrPNg2V NEsiGi8LFBr0E+z+8pqJHtjiH/L/s5Ath1n1Zhed9Blx28xjZEHUgvlxA5QNVEH1r3pwjD2os5 CVGjbU6exT9UcUNaKsk7MLfR X-IronPort-AV: E=Sophos;i="5.85,301,1624345200"; d="scan'208";a="132201109" Received: from smtpout.microchip.com (HELO email.microchip.com) ([198.175.253.82]) by esa2.microchip.iphmx.com with ESMTP/TLS/AES256-SHA256; 17 Sep 2021 05:07:22 -0700 Received: from chn-vm-ex03.mchp-main.com (10.10.85.151) by chn-vm-ex03.mchp-main.com (10.10.85.151) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2176.14; Fri, 17 Sep 2021 05:07:22 -0700 Received: from rob-dk-mpu01.microchip.com (10.10.115.15) by chn-vm-ex03.mchp-main.com (10.10.85.151) with Microsoft SMTP Server id 15.1.2176.14 via Frontend Transport; Fri, 17 Sep 2021 05:07:20 -0700 From: Claudiu Beznea To: , , , , CC: , , , Claudiu Beznea Subject: [PATCH v3 15/17] clk: use clk_core_get_rate_recalc() in clk_rate_get() Date: Fri, 17 Sep 2021 15:06:40 +0300 Message-ID: <20210917120642.8993-16-claudiu.beznea@microchip.com> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20210917120642.8993-1-claudiu.beznea@microchip.com> References: <20210917120642.8993-1-claudiu.beznea@microchip.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210917_050723_320047_932F6893 X-CRM114-Status: GOOD ( 10.83 ) 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 In case clock flags contains CLK_GET_RATE_NOCACHE the clk_rate_get() will return the cached rate. Thus, use clk_core_get_rate_recalc() which takes proper action when clock flags contains CLK_GET_RATE_NOCACHE. Signed-off-by: Claudiu Beznea --- drivers/clk/clk.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/clk/clk.c b/drivers/clk/clk.c index 65508eb89ec9..64838754cdef 100644 --- a/drivers/clk/clk.c +++ b/drivers/clk/clk.c @@ -3108,7 +3108,7 @@ static int clk_rate_get(void *data, u64 *val) { struct clk_core *core = data; - *val = core->rate; + *val = clk_core_get_rate_recalc(core); return 0; } -- 2.25.1 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel