From patchwork Thu Apr 8 11:42:21 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Pali_Roh=C3=A1r?= X-Patchwork-Id: 418509 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=-19.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, INCLUDES_CR_TRAILER, INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, 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 218BCC433B4 for ; Thu, 8 Apr 2021 11:43:45 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id E13E761154 for ; Thu, 8 Apr 2021 11:43:44 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231299AbhDHLny (ORCPT ); Thu, 8 Apr 2021 07:43:54 -0400 Received: from mail.kernel.org ([198.145.29.99]:40038 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231337AbhDHLnw (ORCPT ); Thu, 8 Apr 2021 07:43:52 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id EB6E461154; Thu, 8 Apr 2021 11:43:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1617882221; bh=VztKX42wnG26u1toPL5fMsj5cTTzN2Qip/AFn/wQabU=; h=From:To:Subject:Date:In-Reply-To:References:From; b=iF7MmUWSHNkw9tsVX5zWYU/Q8vYLPOEozXsV9yGiDAXEPGf2cWoLdwrqcoMGFMBSw fayKDvC9OeBBNQX3fQUuJEvJjFXwd0Kd/wZHd/ZTXjqaKnyF+N8xoxT8NJRkU+57WP qExm/lEYVvs54mrmX95mykXvhjuXeH9u5VFFfKmb+2ccSFlQ5fbQxyuWasGnLOAV45 fQrtleS8DOyzk+yb7v70/7FUKNVjNnDbJxfiuBKwbmXB61YVYJbfMTS/FT6g3/6XXd vN1DRLKktqcjFxWK+KvGxnvFmCWN6cmvypTNeROGR1ammESf9u3FJcE7+G4ZXDhS3U 8mmsl5cA5SIow== Received: by pali.im (Postfix) id DE545EBC; Thu, 8 Apr 2021 13:43:38 +0200 (CEST) From: =?utf-8?q?Pali_Roh=C3=A1r?= To: linux-pm@vger.kernel.org, Viresh Kumar Subject: [RESEND PATCH mvebu v3 08/10] cpufreq: armada-37xx: Fix determining base CPU frequency Date: Thu, 8 Apr 2021 13:42:21 +0200 Message-Id: <20210408114223.8471-8-pali@kernel.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210408114223.8471-1-pali@kernel.org> References: <20210408114223.8471-1-pali@kernel.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org When current CPU load is not L0 then loading armada-37xx-cpufreq.ko driver fails with following error: # modprobe armada-37xx-cpufreq [ 502.702097] Unsupported CPU frequency 250 MHz This issue was partially fixed by commit 8db82563451f ("cpufreq: armada-37xx: fix frequency calculation for opp"), but only for calculating CPU frequency for opp. Fix this also for determination of base CPU frequency. Signed-off-by: Pali Rohár Acked-by: Gregory CLEMENT Tested-by: Tomasz Maciej Nowak Tested-by: Anders Trier Olesen Tested-by: Philip Soares Fixes: 92ce45fb875d ("cpufreq: Add DVFS support for Armada 37xx") Cc: stable@vger.kernel.org # 8db82563451f ("cpufreq: armada-37xx: fix frequency calculation for opp") --- drivers/cpufreq/armada-37xx-cpufreq.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/cpufreq/armada-37xx-cpufreq.c b/drivers/cpufreq/armada-37xx-cpufreq.c index 1ab2113daef5..e4782f562e7a 100644 --- a/drivers/cpufreq/armada-37xx-cpufreq.c +++ b/drivers/cpufreq/armada-37xx-cpufreq.c @@ -469,7 +469,7 @@ static int __init armada37xx_cpufreq_driver_init(void) return -EINVAL; } - dvfs = armada_37xx_cpu_freq_info_get(cur_frequency); + dvfs = armada_37xx_cpu_freq_info_get(base_frequency); if (!dvfs) { clk_put(clk); return -EINVAL;