pmdomain: mediatek: mtk-mfg: use clk_determine_rate_noop()

Drop the driver-specific empty determine_rate() function and use the new
shared clk_determine_rate_noop() helper.

Acked-by: Ulf Hansson <ulfh@kernel.org>
Signed-off-by: Brian Masney <bmasney@redhat.com>
This commit is contained in:
Brian Masney 2026-05-05 20:49:11 -04:00
parent b37966e116
commit e3a9ad35af

View File

@ -310,25 +310,6 @@ static unsigned long mtk_mfg_recalc_rate_gpu(struct clk_hw *hw,
return readl(mfg->shared_mem + GF_REG_FREQ_OUT_GPU) * HZ_PER_KHZ;
}
static int mtk_mfg_determine_rate(struct clk_hw *hw,
struct clk_rate_request *req)
{
/*
* The determine_rate callback needs to be implemented to avoid returning
* the current clock frequency, rather than something even remotely
* close to the frequency that was asked for.
*
* Instead of writing considerable amounts of possibly slow code just to
* somehow figure out which of the three PLLs to round for, or even to
* do a search through one of two OPP tables in order to find the closest
* OPP of a frequency, just return the rate as-is. This avoids devfreq
* "rounding" a request for the lowest frequency to the possibly very
* high current frequency, breaking the powersave governor in the process.
*/
return 0;
}
static unsigned long mtk_mfg_recalc_rate_stack(struct clk_hw *hw,
unsigned long parent_rate)
{
@ -339,12 +320,12 @@ static unsigned long mtk_mfg_recalc_rate_stack(struct clk_hw *hw,
static const struct clk_ops mtk_mfg_clk_gpu_ops = {
.recalc_rate = mtk_mfg_recalc_rate_gpu,
.determine_rate = mtk_mfg_determine_rate,
.determine_rate = clk_determine_rate_noop,
};
static const struct clk_ops mtk_mfg_clk_stack_ops = {
.recalc_rate = mtk_mfg_recalc_rate_stack,
.determine_rate = mtk_mfg_determine_rate,
.determine_rate = clk_determine_rate_noop,
};
static const struct clk_init_data mtk_mfg_clk_gpu_init = {