Received: by 2002:a05:6a10:2785:0:0:0:0 with SMTP id ia5csp233551pxb; Thu, 14 Jan 2021 04:44:37 -0800 (PST) X-Google-Smtp-Source: ABdhPJwsTo01LQR+7dZjbtbEEFo3E3Dqbxhh4LDMffXqqZmrzHn9djrjYXgERpMNwwFcQBDmGTdj X-Received: by 2002:a17:906:36da:: with SMTP id b26mr4987356ejc.28.1610628277159; Thu, 14 Jan 2021 04:44:37 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1610628277; cv=none; d=google.com; s=arc-20160816; b=Rxzwc7IwuJjo21oPZwAcKSAacinX3CzMWEK0shZR3QAjxn3cHuID3vtuxOEezzGbUl RtWztbklVW6nTG6F1LEexSEy9OUOH2Xay6nf3gSyzUfLQzq3q3iR762gQmxQceUDRan0 F0z7TuMcWQ95VHZrdVXJ+GN3VJ5trBQUYKb+EvUab8Y0j3p6dQBtw8TbS7P81IdPppg3 FOIoPa80ImgpdtU105idFEnq8tx4BGbgfiND7AUfd6JFucuPTbWih9GZYHBbU88TztRa rQRLcDW7Lr9D5zl7ilNuc98hghOwW0C3QtHVnmGC88Kun+qKhFN70lE02kbeHaU6HmXJ 15+w== 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=QwCQBgE5Dj3rduY1SKHjXGmExi8rEbaieq6PjmD9//o=; b=JDdtMswdr2i8qXMaLvfUUNQLeCtamYKXx4NAZ73UcC21b460JnI/sIurQO5VwoHNku UjnGQ6d/+47WoT4uIo9I0yaVH1JwT6Tre0GWO+Uv4/UpfGnj1SdgtNsmFkruuspsW4hd 2oL7D52p8XfJ4RG9I+c6LENkd/un5sv7OB7HAzFsxq0uvXlZb2tWhyAFwL5wIshwdoo0 oNFVz0o7zPYDRkFbBdkM6m2pFNfkBPap+iPjwxgYHICYT4YoB0t8rrKyorPmbe9YcRrB 08ty6B1wckQWgAe6eg4d1DpYh55XXNxdThuif1FVH1iXPvuV0rIRGoRnuTwLsYzU7R2i DU2A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=aXtvzgj4; 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 hr37si2409868ejc.700.2021.01.14.04.44.12; Thu, 14 Jan 2021 04:44:37 -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=aXtvzgj4; 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 S1728979AbhANMmT (ORCPT + 99 others); Thu, 14 Jan 2021 07:42:19 -0500 Received: from mail.kernel.org ([198.145.29.99]:59374 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728898AbhANMmQ (ORCPT ); Thu, 14 Jan 2021 07:42:16 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 46AEB23A77; Thu, 14 Jan 2021 12:40:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1610628057; bh=LdKZoDOyWDT6YlTkOhfHUMj6f5x7Zv3boxD1wlMlooc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=aXtvzgj4d5uf9V1wv+JQw8qCEuFaia5UV6ZdQNH4UyKiIxW82/vKAEY+XT3ojUcgC 7/QD5VKZPhr8qbfjP3AohWu8ZMhzfpO+qUcqjNYCDuLmNFscC+BKYhw0AKXvrms7y2 yALiDpErBQUbBojzT+IDDyQNe595AWw4BquBYKGGPucUfk+AqTfnTvbytYL23+gkD8 J5fY7W93WO36CQcmigUow88z/+1X4eIfuVp7wdrNsebxtbFCl/8CK2aPqK1jzcwwcv DrfCP61QVPJpTSLOKFAKVDeIQ+uxDoNgZBkHlla7BaJ7hcFFIfJaed5LgKH0A17tzF xYE86sRYV+7mw== Received: by pali.im (Postfix) id E859A848; Thu, 14 Jan 2021 13:40:54 +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 v2 08/10] cpufreq: armada-37xx: Fix determining base CPU frequency Date: Thu, 14 Jan 2021 13:40:30 +0100 Message-Id: <20210114124032.12765-9-pali@kernel.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210114124032.12765-1-pali@kernel.org> References: <20210114124032.12765-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 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 002a71775e08..f08281fc525c 100644 --- a/drivers/cpufreq/armada-37xx-cpufreq.c +++ b/drivers/cpufreq/armada-37xx-cpufreq.c @@ -458,7 +458,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