Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp1821816pxb; Mon, 22 Feb 2021 11:47:33 -0800 (PST) X-Google-Smtp-Source: ABdhPJxOKM8JIyNIKs+IMaVkgmtlFge6wX4aVa4sB8p1PGZaKfRlr6yQai5SQKyMD9O+Rv/G1WQb X-Received: by 2002:a05:6402:4310:: with SMTP id m16mr24358593edc.207.1614023252904; Mon, 22 Feb 2021 11:47:32 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1614023252; cv=none; d=google.com; s=arc-20160816; b=dhHmmaSNH74el0nnDA6pHyJarXTp+aq4AiJb6cBQs+rJpcffKSEJIwoNPHIPf2nb7x 4zrLNU/7mUCoK7ZDVJnQblH08frPv0OlTBULuLhLgjpV4eY+OrW258bA5eURDNPNbCW3 e9Enl3sA1OPKg1T4q/zw/0IV1YVtUMNawJVTdoShIPEavq9VQEAPAL00FsWCwu9QNW/7 slFtjd1BCRJnH+shbFdU/DvfgMqTMblDjmH4575WTSUbZFdIE70pTu/fy/v4WzpAjy8E KpGkLRt4l2kd4yJkg309FrHLV4ukVFm2MoWTMi7ulAbdAFPOnktsc6zV9c8b66qWnICs YOjw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=mK8j75uMwhFDZP1+xX0q0YYcHGJTnghTDA1MRGNHJs8=; b=m6BoJnkavuK5afraQqPQZ6RK/OsLEIqVoMFYAbyFaZCwt4VNL6TNXH32TQ52n39+Bw xt4jogXlaKKw5A0WBSxm6/ctLNCDZbEe4ufvkfUeM9GibN6WjgCnvdtB3Xx4BWG7mtbJ RdEgCyoL1RMtrrMH5K522+xvZ0BwtcDUWuZO4oz7TalftfMvcCnQj2ZdVbPpP7eskYRa bxmNDz5HoN/e0XyRfbQzOyqgioCUtjfDnALBSHknMzPKqqA8mTlNNiEelqlTEHOgKaeo nFxbxpSzffduc63xow3zvcNfgeLO8ufN1mdEs9XR7eUASry4AH+wGhHgilKpl29DdWFy PK8A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=uLwCgJ+n; 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 a6si12405926edu.356.2021.02.22.11.47.08; Mon, 22 Feb 2021 11:47:32 -0800 (PST) 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=uLwCgJ+n; 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 S231288AbhBVTpJ (ORCPT + 99 others); Mon, 22 Feb 2021 14:45:09 -0500 Received: from mail.kernel.org ([198.145.29.99]:55068 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233277AbhBVTnk (ORCPT ); Mon, 22 Feb 2021 14:43:40 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 0767864E5B; Mon, 22 Feb 2021 19:42:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1614022941; bh=6ZRXacZwBMTVavJ32wJarmiD2obBpZ5uNUZXITH4fqY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=uLwCgJ+ntkkya8r77vm4W3u0cr6CaygbZb4Ul/vCX657VyHj94QoR7AJakjf0TXLQ 12ckfewl+fj3CO+BOvNFrQJrqZp7GcwfLp6xgwQhKVBqG2CNjQODr7qdwoVy1sb9Zy N69DjvXzv/u374VUXPc7uHzEvV1lLDZR3l785ISFzulotECQEaaObNX79i7nnxCF5t sWCH8HyB0U0B9GeT9XESbYC+U747NWGQNTWmzLcrmiubL0mRrlO+T5l2o1VF+YQk9V Q4LC0ZXdiidf2KeL3sS2f8qmS2ul5y0y2GeH+e3E+KGxOlXeZpnathlpp7jK8Ul0Ra W+WXx21wkQ6EQ== Received: by pali.im (Postfix) id 4CB4310B4; Mon, 22 Feb 2021 20:42:18 +0100 (CET) From: =?UTF-8?q?Pali=20Roh=C3=A1r?= To: Gregory Clement , Andrew Lunn , Michael Turquette , Stephen Boyd , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-clk@vger.kernel.org Cc: =?UTF-8?q?Marek=20Beh=C3=BAn?= , Miquel Raynal , Tomasz Maciej Nowak , Luka Perkov , Andre Heider , Vladimir Vid , Russell King , =?UTF-8?q?G=C3=A9rald=20Kerma?= , Konstantin Porotchkin Subject: [PATCH mvebu v3 08/10] cpufreq: armada-37xx: Fix determining base CPU frequency Date: Mon, 22 Feb 2021 20:41:56 +0100 Message-Id: <20210222194158.12342-9-pali@kernel.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210222194158.12342-1-pali@kernel.org> References: <20210114124032.12765-1-pali@kernel.org> <20210222194158.12342-1-pali@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@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 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; -- 2.20.1