Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp341002pxj; Thu, 20 May 2021 10:31:14 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxTYZvODELknHWSHFC+bCrGSgrRyRewQg7TEHdDV/NyaOLgNvuqqYFaHPuDiq4ph+l9J8vi X-Received: by 2002:a05:6402:848:: with SMTP id b8mr6199391edz.159.1621531874776; Thu, 20 May 2021 10:31:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621531874; cv=none; d=google.com; s=arc-20160816; b=OlDBmmzzkdBydyUPd4I7TzfFdVDoCGnQXVKmbX7RYUOQf/5M/jTSOWuUJatDujG7bW HPx4kC9EX0k8SmUX+dAXu5cwPhYrWbCirkbEO5xG2kKK1bchH3lTcO3LXAUynKSetZsG ze6HhYvHyygLkfSki8avixoaVdE8yT4tv1bONqhXBosBTHh86ua22CkX7QldsYHMBqGM SPoBEqqiqUFa8PWgoitcSJD45gdrHp2V+w0bi+d+A+iM+z2+3shgxkf1G7T7R3dxD7Hk frHd+D6n/MgLsvjmuC5XafC6ioRNAFfdfYGDSD1nlrIkzDd38Xg8OWuNGbita/tWNweN umZQ== 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=cqQXnDsg4c0pDoPaqqzz+WHmT2WTerVQHsTZf7qesXY=; b=Whj6L432VGhJfwEOyxQzK5M4Jba6MwWScqSIYJ7W9C/sPOZbWe4fbncBPR5ReAbTLb uZOXF/1MJrWF5WHjRIMxCP9MWxfY9MMP2ZiPxskp9RbYknOXePUwB4ApO6lW/UWNZ1DZ wtK8+6M4NAoWR6E0S+67YZ3o4c53BNeWtARrqx9XhOt/igOsb81m0hpA/UoKExe3ZVaH qrGaz41JFyjk+FvSgZIF1xi/NuroKylww3j5+cvE47VdjyBBZzMM8dMT+HOz/D3JSQiW o4aLZ2CLM1KJCGtIsmYe5hfSG14ufZrceMa7vL+y+hx5wdbibrY+okNq32hUmDDUEulW ygzw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=JrVnJq0T; 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 os10si2903198ejb.60.2021.05.20.10.30.51; Thu, 20 May 2021 10:31:14 -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=JrVnJq0T; 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 S234045AbhETJ62 (ORCPT + 99 others); Thu, 20 May 2021 05:58:28 -0400 Received: from mail.kernel.org ([198.145.29.99]:54318 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234859AbhETJyr (ORCPT ); Thu, 20 May 2021 05:54:47 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 2AACA613AF; Thu, 20 May 2021 09:37:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1621503420; bh=IWhuYujvcH09tMcgER42SSgdvRl43EpvttrdkUtxCA4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=JrVnJq0TM2zjqo6AZ61dZ7LEj/I78qQqRnlaW9qnjESPQ77LrU6T35u3FRGSbiZrE xDAbeiqPtDPDoHpDMY0gNXodrmf5IFbWeuWTFGuGVESj9k8kYM3RR/Ys7HQX7Tax21 wEn+bmx569hUjNS4SPw17A2ztvQUJo3InIwcv/Ks= 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 4.19 212/425] cpufreq: armada-37xx: Fix determining base CPU frequency Date: Thu, 20 May 2021 11:19:41 +0200 Message-Id: <20210520092138.383550952@linuxfoundation.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210520092131.308959589@linuxfoundation.org> References: <20210520092131.308959589@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 6a4ac26ac6a8..a36452bd9612 100644 --- a/drivers/cpufreq/armada-37xx-cpufreq.c +++ b/drivers/cpufreq/armada-37xx-cpufreq.c @@ -471,7 +471,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