Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp4597774pxj; Wed, 12 May 2021 08:58:18 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyCa8YSwZYfNeail7RYTkuJf6ysHtYOypPh+QN5pS7xFtmVZUqYxM5f+h0Q2N+XbY8XZ05k X-Received: by 2002:a17:906:4098:: with SMTP id u24mr37447639ejj.228.1620835098379; Wed, 12 May 2021 08:58:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1620835098; cv=none; d=google.com; s=arc-20160816; b=XoVchAdpn9ButvFXAThQAequA5ebu+e27dS3nggj5pAuBRq5r1f/KCc66Privw81yC CsewEzoSff/xn0ArG39aXMxRxHtEnx94do/jqQUrjhesiaW/O/6S0r/xKpIX3QQV56ou D9y9F93EIzN+S6PpgoH5+X6lyh75dNLrAmdUA7vBDwwI9oAPOEPfmJy587EwhPIiSODH n7Lwe771rI9UVL+yQXSwXoqj2bz7f680bQuWkfHQpgY3F/1820FearGZUwVBqA2nXl37 kMMKUr9oqDQVT2fEarMyAozDiF4hbe8uszL3QCRZO5z3UQ8SJrKRPB7brb7WQJaN4EYl 8xog== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=6kZIyrHx+ehyKqb++7uAMddZAd01kCyp/nFVL0g56Ao=; b=pYrdpk0Sf9elOdSlg8qXx/MfE32v7usfaqQSC2/1x3XcIoLrW2PZnQ7ak65OmXVFjd 5Q4J0TBHvkTCnXztbFus3KCDA7EJiagrhaSqIbT4lxWxbJLBwDeCsRAoeqXHMi+Y/hcp 9sWrvtlmRwBImrWIFV0LIlZ71rqTMYi0heflpbi7fJ6SdRsCxEfJEEkopkH9JTXZlP5S Xl/lgQsNQbeDfJbDYldPyyd2wYdyOCmqTKU18P2hFvfzt6uZ9VuaxwA3BnUhiAJ15sSD tv4JuOBMIj6SnFQsCefrUPMI4Id7h25mBhBkOiqnRUAuCd1P/krZY4+7id3cJba9wf6w /1DA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=djfVErEI; 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=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id ga17si244607ejb.144.2021.05.12.08.57.50; Wed, 12 May 2021 08:58:18 -0700 (PDT) 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=@linuxfoundation.org header.s=korg header.b=djfVErEI; 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=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237836AbhELP41 (ORCPT + 99 others); Wed, 12 May 2021 11:56:27 -0400 Received: from mail.kernel.org ([198.145.29.99]:40502 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235270AbhELP1U (ORCPT ); Wed, 12 May 2021 11:27:20 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 1A1E261A30; Wed, 12 May 2021 15:12:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1620832330; bh=xZLQp118NbzM35UY0Cmknz4IGkBTTX/fB8OyO/Sevws=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=djfVErEIO7UauW3YSIjGn+AltEsxVGC4jB+QN0dFJzL+WBtTTgMoaaUn8X+tpB/LV EsES52xaQ2A3MLsD7bZP5KCUSoBKIZ16wtrby9vbgpLbR7RmHOZaD8/QfzJJi0QQyQ FcpMsWgqE5R53Yx7BGMwEzQ8pI/4dCsR4CPejoIc= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, =?UTF-8?q?Pali=20Roh=C3=A1r?= , Gregory CLEMENT , Tomasz Maciej Nowak , Anders Trier Olesen , Philip Soares , Viresh Kumar , Sasha Levin Subject: [PATCH 5.10 236/530] cpufreq: armada-37xx: Fix determining base CPU frequency Date: Wed, 12 May 2021 16:45:46 +0200 Message-Id: <20210512144827.602488064@linuxfoundation.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210512144819.664462530@linuxfoundation.org> References: <20210512144819.664462530@linuxfoundation.org> User-Agent: quilt/0.66 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 From: Pali Rohár [ Upstream commit 8bad3bf23cbc40abe1d24cec08a114df6facf858 ] 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") Signed-off-by: Viresh Kumar Signed-off-by: Sasha Levin --- 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.30.2