From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C95B83081BE; Mon, 13 Oct 2025 14:57:42 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1760367462; cv=none; b=fpBkwN2D7MMb3ZELNzv/PahVY8f5jSoVt2zTgBEHbTuSiaNgtwdWyg8vejzd9o4GrLGQyjWHlH2Sirdu6GV/zcZQpGYk/tVyXwvCJQnOMtHEfB/lHCl8u5UexpTq/LKUKjGOPRC4HT0lWEP2vMoZqD5Bv1WANhAiN9a8xWTF2s0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1760367462; c=relaxed/simple; bh=lrpGl4umK9orrdoWIPi0fyp56X/j1/HLAZiR7XIzYCc=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=ZlmdRaKdRUwRD7M/a9L3A86S6fnqMjngQ6ekmBO1KQZ+jrQwb7D83R3jD1925+9whxlahLbx6wZWbJK8/op71SJuOvwoF6DdCnsCTbln0gJeip9ffzZY2mvIX+XN/YYL8AIC3Xno9Kzgz3i/u8c2GVrqJbah0XM755qpdWwXaC0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=JKSq89h0; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="JKSq89h0" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 56878C4CEE7; Mon, 13 Oct 2025 14:57:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1760367462; bh=lrpGl4umK9orrdoWIPi0fyp56X/j1/HLAZiR7XIzYCc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=JKSq89h0QucMDSuLZ1XdKLpq+hp8pDoJjBX/aWOSChf7tKu6WHupikWXe2sG4Afn7 5wJ1r/QfkhCIq+k23Qvb5XMGOYPIPEv/bXjyBrWfEZqiI1fQIvWfWJPEFkMY6W7Bcs 8JG+FtUpDAi1TmV0lNmnb/hJ02+pthmO8q4TyhA4= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Florian Fainelli , Sudeep Holla , Viresh Kumar , Sasha Levin Subject: [PATCH 6.6 020/196] cpufreq: scmi: Account for malformed DT in scmi_dev_used_by_cpus() Date: Mon, 13 Oct 2025 16:43:31 +0200 Message-ID: <20251013144315.927859851@linuxfoundation.org> X-Mailer: git-send-email 2.51.0 In-Reply-To: <20251013144315.184275491@linuxfoundation.org> References: <20251013144315.184275491@linuxfoundation.org> User-Agent: quilt/0.69 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: patches@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 6.6-stable review patch. If anyone has any objections, please let me know. ------------------ From: Florian Fainelli [ Upstream commit cd5d4621ba846dad9b2e6b0c2d1518d083fcfa13 ] Broadcom STB platforms were early adopters (2017) of the SCMI framework and as a result, not all deployed systems have a Device Tree entry where SCMI protocol 0x13 (PERFORMANCE) is declared as a clock provider, nor are the CPU Device Tree node(s) referencing protocol 0x13 as their clock provider. This was clarified in commit e11c480b6df1 ("dt-bindings: firmware: arm,scmi: Extend bindings for protocol@13") in 2023. For those platforms, we allow the checks done by scmi_dev_used_by_cpus() to continue, and in the event of not having done an early return, we key off the documented compatible string and give them a pass to continue to use scmi-cpufreq. Fixes: 6c9bb8692272 ("cpufreq: scmi: Skip SCMI devices that aren't used by the CPUs") Signed-off-by: Florian Fainelli Reviewed-by: Sudeep Holla Signed-off-by: Viresh Kumar Signed-off-by: Sasha Levin --- drivers/cpufreq/scmi-cpufreq.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/drivers/cpufreq/scmi-cpufreq.c b/drivers/cpufreq/scmi-cpufreq.c index 6ff77003a96ea..68325ebd56fe3 100644 --- a/drivers/cpufreq/scmi-cpufreq.c +++ b/drivers/cpufreq/scmi-cpufreq.c @@ -15,6 +15,7 @@ #include #include #include +#include #include #include #include @@ -330,6 +331,15 @@ static bool scmi_dev_used_by_cpus(struct device *scmi_dev) return true; } + /* + * Older Broadcom STB chips had a "clocks" property for CPU node(s) + * that did not match the SCMI performance protocol node, if we got + * there, it means we had such an older Device Tree, therefore return + * true to preserve backwards compatibility. + */ + if (of_machine_is_compatible("brcm,brcmstb")) + return true; + return false; } -- 2.51.0