NVIDIA: SAUCE: clk: tegra: make nocache for clocks

Clock scaling for specific clocks, such as EMC/SCF/MCF/SMMU clocks
, are managed by the BPMP itself without kernel involvement.

When the clock is updated on BPMP side, and kernel consumer drivers
try to use clk_get_rate to fetch the current clock rate, CCF framework
will return the cached version of the clock rate instead of the correct
one being scaled by the BPMP itself.

This change makes all the clk_get_rate requests "CLK_GET_RATE_NOCACHE"
to force through the requests to BPMP and get the current clock rate.

Bug 5621554

Change-Id: Ib31aa00810aef57cd50cd7aea0b54752a78462d6
Signed-off-by: Johnny Liu <johnliu@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/3rdparty/canonical/linux-noble/+/3479075
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Jon Hunter <jonathanh@nvidia.com>
This commit is contained in:
Johnny Liu
2025-10-29 17:12:40 +00:00
committed by mobile promotions
parent f26de42a86
commit 9340df62f6

View File

@@ -1,6 +1,6 @@
// SPDX-License-Identifier: GPL-2.0-only
/*
* Copyright (C) 2016-2022 NVIDIA Corporation
* Copyright (C) 2016-2025 NVIDIA Corporation
*/
#include <linux/clk-provider.h>
@@ -584,6 +584,7 @@ tegra_bpmp_clk_register(struct tegra_bpmp *bpmp,
}
init.parent_names = parents;
init.flags = CLK_GET_RATE_NOCACHE;
err = devm_clk_hw_register(bpmp->dev, &clk->hw);